본문으로 건너뛰기
cccskills
무료GitHub에 공개한국어 소개

security-and-hardening

웹 앱의 입력 처리, 인증, 외부 연동을 점검하고 취약점 대응을 정리합니다. 의존 패키지, 개인정보, LLM 출력 처리 방식까지 확인합니다.

원문원문 설명 보기

Hardens code against vulnerabilities. Use when auditing an input handler for vulnerabilities, when handling user input, authentication, data storage, or external integrations, or when checking a login flow is safe against the OWASP Top Ten. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services. Use when auditing dependencies for known vulnerabilities, triaging package-manager audit findings, or assessing supply-chain risk in a new package. Use when personal data or privacy compliance (GDPR, CCPA) is involved.

AI 평가90점/ 100설치 방법 보기

이럴 때 유용합니다

  • 로그인과 접근 권한 점검
  • 파일 업로드와 외부 API 연동 확인
  • 출시 전 의존 패키지 감사
  • 개인정보 보관 및 삭제 설계 확인
  • AI 기능의 모델 출력 처리 점검

한국어 소개

할 수 있는 일

웹 앱의 취약점을 점검하고 설계와 코드 양쪽에서 대응합니다. 외부 데이터가 들어오는 지점과 보호할 정보를 파악하고, 사칭이나 정보 유출 등의 위협을 정리합니다. 입력 검증, 인증과 권한 확인, 세션, 파일 업로드, 비밀 정보 관리를 점검합니다. 의존 패키지의 알려진 취약점, 개인정보 보관 기간과 삭제 경로, LLM 출력 검증도 다룹니다.

이럴 때 유용합니다

로그인 기능이나 외부 API 연동을 추가할 때, 출시 전에 안전성을 다시 검토할 때 적합합니다. AI 기능이 생성한 문자열을 쿼리나 파일 작업에 전달하는 처리도 확인할 수 있습니다.

사용 예시

  • “로그인 처리의 인증, 권한 확인, 세션 관리를 점검해 주세요.”
  • “의존 패키지 감사 결과를 영향받는 기능과 수정 가능 여부에 따라 정리해 주세요.”
  • “개인정보 수집 목적, 보관 기간, 삭제 경로를 확인해 주세요.”

주의 사항

의존성 확인에는 프로젝트에서 사용하는 패키지 관리자의 감사 기능을 사용합니다. 감사만으로는 알려지지 않은 악성 패키지를 탐지할 수 없습니다. 인증 방식 변경이나 새로운 민감 정보 저장 등은 사람의 승인을 받은 뒤 진행합니다.

이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.

객관 평가

AI가 SKILL.md의 내용만을 근거로 4가지 관점에서 판정했습니다. 스타 수나 인기도는 판정에 넣지 않았습니다.

지시의 명확성언제 쓰고 무엇을 하는지 알 수 있는가
A양호입력, 인증, 저장, 외부 연동의 점검 상황과 위협 분석 흐름이 명시되어 있습니다.
절차의 구체성절차·입출력·예시가 구체적으로 적혀 있는가
A양호신뢰 경계 파악, STRIDE 분석, 입력 검증과 세션 설정의 구체적 조치를 제시합니다.
안전성전송·삭제·명령 실행 등을 명시하고 있는가
A양호인증 변경, 민감 정보 저장, 외부 연동 등에 사람의 승인이 필요하다고 명시합니다.
도입의 용이성필요한 도구나 API 키가 적고 적혀 있는가
B일부 부족패키지 관리자의 감사 기능이 필요하지만 실행 명령은 제시하지 않습니다.

총점은 각 항목을 A=25점, B=15점, C=5점으로 더한 값입니다. 2026년 10월 20일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.

평가가 다르다고 생각되면 재검토를 요청하기

어느 항목이 왜 다르다고 생각하는지 적어 주세요. 로그인은 필요 없습니다. SKILL.md와 대조해 평가를 다시 만들고 이곳에 반영합니다.

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

포함된 파일(2)

  • SKILL.md17.1 KB
  • references/hardening-patterns.md12.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Security and Hardening

Overview

Security-first development practices for web applications. Treat every external input as hostile, every secret as sacred, and every authorization check as mandatory. Security isn't a phase — it's a constraint on every line of code that touches user data, authentication, or external systems.

When to Use

  • Building anything that accepts user input
  • Implementing authentication or authorization
  • Storing or transmitting sensitive data
  • Integrating with external APIs or services
  • Adding file uploads, webhooks, or callbacks
  • Handling payment or PII data

Process: Threat Model First

Controls bolted on without a threat model are guesses. Before hardening, spend five minutes thinking like an attacker:

  1. Map the trust boundaries. Where does untrusted data cross into your system? HTTP requests, form fields, file uploads, webhooks, third-party APIs, message queues, and LLM output — plus the local values that look internal because the OS handed them to you: another process's command line or environment, filenames on a shared volume, a path in a job payload. Trust follows who wrote a value, not which channel delivered it. Every boundary is attack surface.
  2. Name the assets. What's worth stealing or breaking? Credentials, PII, payment data, admin actions, money movement.
  3. Run STRIDE over each boundary — a quick lens, not a ceremony:
ThreatAskTypical mitigation
SpoofingCan someone impersonate a user/service?Authentication, signature verification
TamperingCan data be altered in transit or at rest?Integrity checks, parameterized queries, HTTPS
RepudiationCan an action be denied later?Audit logging of security events
Information disclosureCan data leak?Encryption, field allowlists, generic errors
Denial of serviceCan it be overwhelmed?Rate limiting, input size caps, timeouts
Elevation of privilegeCan a user gain rights they shouldn't?Authorization checks, least privilege
  1. Write abuse cases next to use cases. For each feature, ask "how would I misuse this?" — then make that your first test.

If you can't name the trust boundaries for a feature, you're not ready to secure it. This is OWASP A04: Insecure Design — most breaches begin in design, not code.

The Three-Tier Boundary System

Always Do (No Exceptions)

  • Validate all external input at the system boundary (API routes, form handlers)
  • Parameterize all database queries — never concatenate user input into SQL
  • Encode output to prevent XSS (use framework auto-escaping, don't bypass it)
  • Use HTTPS for all external communication
  • Hash passwords with bcrypt/scrypt/argon2 (never store plaintext)
  • Set security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
  • Use httpOnly, secure, sameSite cookies for sessions
  • Run the detected package manager's native audit against the committed lockfile before every release

Ask First (Requires Human Approval)

  • Adding new authentication flows or changing auth logic
  • Storing new categories of sensitive data (PII, payment info)
  • Adding new external service integrations
  • Changing CORS configuration
  • Adding file upload handlers
  • Modifying rate limiting or throttling
  • Granting elevated permissions or roles

Never Do

  • Never commit secrets to version control (API keys, passwords, tokens)
  • Never log sensitive data (passwords, tokens, full credit card numbers)
  • Never trust client-side validation as a security boundary
  • Never disable security headers for convenience
  • Never use eval() or innerHTML with user-provided data
  • Never store sessions in client-accessible storage (localStorage for auth tokens)
  • Never expose stack traces or internal error details to users

Hardening Controls

The rules below are the workflow; a concrete implementation of each lives in references/hardening-patterns.md. Open the section you need when you reach that code, not before.

Injection, XSS, and access control

  • Parameterize every query. Never build SQL, NoSQL, or shell commands from input strings.
  • Encode output through the framework's auto-escaping. If raw HTML is unavoidable, sanitize with an allowlist sanitizer first.
  • Check authorization on every request, not just authentication: the authenticated user must own, or be permitted on, the specific resource (A01, IDOR).

Patterns: Injection, XSS, Access control.

Authentication and sessions

  • Hash passwords with bcrypt (≥12 rounds), scrypt, or argon2. The session secret comes from the environment, never from code.
  • Session cookies are httpOnly, secure, and sameSite: 'lax' or 'strict' (the CSRF defense; 'none' sends the cookie on cross-site requests), with a bounded maxAge.

Pattern: Authentication.

Headers, CORS, and responses

  • Security headers on every response (helmet or the framework equivalent); CSP starts from default-src 'self' and is tightened, not loosened.
  • CORS restricted to an explicit origin list from configuration. Never * with credentials.
  • Strip sensitive fields (passwordHash, reset tokens) before any response. Error bodies are generic; internals go to server logs only.

Patterns: Misconfiguration, Sensitive data exposure.

Input validation and uploads

  • Validate at the boundary with a schema: allowlisted shape, lengths, enums, formats. Reject with 422 and structured details; downstream code uses only the parsed, typed value.
  • Uploads: allowlist MIME types, cap size, verify content (magic bytes) when it matters. The extension proves nothing.

Patterns: Schema validation, File upload.

Server-side fetches (SSRF)

Any URL the user influences — webhooks, import-from-URL, image proxies, link previews — can be aimed at internal services. Allowlist scheme and host, resolve all DNS records and reject any private or reserved address (loopback, link-local 169.254.169.254, private, unique-local, for IPv4 and IPv6), and forbid redirects. That check still has a DNS-rebinding TOCTOU gap: for high-risk surfaces, pin the resolved IP or put a filtering agent in front.

Pattern: SSRF.

Destructive operations on derived paths

A delete, move, or overwrite is only as safe as the value naming its target, and trust follows who wrote that value, not which channel delivered it: another process's command line is as attacker-controlled as a form field. A shape check proves well-formedness, not authorization. Before the call, require all three: the resolved target (symlinks resolved) sits under an allowlisted root; it is at least one level below that root; and it carries ownership evidence read before the operation. On refusal, log the rejected target and stop; never fall back to a broader default path.

Why the check is weaker than it reads (marker self-attestation, check/use races): Destructive paths. Worked code: ../../references/security-checklist.md.

Rate limiting

Limit the API generally and auth endpoints strictly (about 10 attempts per 15 minutes). Once more than one process serves traffic, in-memory counters silently become max × instances, or never fire on serverless: back the limiter with a shared store.

Pattern: Rate limiting.

Secrets

Secrets come from the environment. .env.example is committed with placeholders; real .env* files and key material are gitignored; grep the staged diff before committing. A secret that reaches a remote is compromised the moment it lands: rotate it first, then purge history.

Pattern: Secrets management.

Dependencies and supply chain

  1. Find the installation boundary and manager. Use the workspace root that owns the lockfile, or an independent nested project only when it is outside that workspace. Corroborate packageManager (when present), the lockfile, and CI; stop on disagreement or competing lockfiles. Pin the manager version.
  2. Block dependency scripts before first execution. Bootstrap with scripts disabled or a documented fail-closed policy, inspect the pending script source, approve only the minimum, commit the policy, then verify with a clean frozen/immutable install. Never blanket-approve.
  3. Run the native audit against the committed lockfile before every release. Triage critical/high by reachability (runtime, build, test, deploy paths) and fix availability. Never apply forced remediation (npm audit fix --force or equivalent) automatically, since forced fixes may cross declared dependency ranges; preview, read changelogs, test each upgrade. Document every deferral with a reason and a review date.
  4. Audits only match known advisories. They do not catch a newly malicious or typosquatted package (cross-env vs crossenv). Review new dependencies, lockfile diffs, and script-policy changes together: ownership, maintenance, release age, provenance, transitive graph. Verify registry signatures where supported (npm audit signatures, pnpm audit signatures) and treat their absence as a signal to investigate, not automatic proof of compromise (A06, LLM03).

Triage decision tree: Dependency audit triage. Manager matrix and install-script gate: ../../references/security-checklist.md.

Personal data and privacy

Hardening asks "can an attacker read it?" Privacy asks "should we hold it at all, and for how long?" The cheapest data to protect, breach, and comply over is the data you never collected; treat personal data as a liability to minimize.

  • Classify fields as you add them (non-personal, PII, sensitive) and handle each class accordingly. You cannot protect, or honor a deletion request for, data you cannot find.
  • Collect only against a stated purpose. "Might be useful later" is latent breach scope, not a purpose. Keep PII out of telemetry (the observability-and-instrumentation skill makes the same point from the ops side).
  • Set retention up front, then actually delete. Every personal-data store needs a TTL and a working deletion path, including backups, caches, search indexes, and analytics copies.
  • Support the data-subject rights your jurisdiction requires (GDPR, CCPA, and kin): export, correct, delete. Design the schema so a user's data is findable and erasable, not smeared irreversibly across systems.
  • Consent gates collection and third-party sharing, and is auditable. Sending PII to an analytics, ad, or LLM vendor is sharing; the vendor needs a data-processing agreement. Make region a configurable policy, not a hardcoded assumption.

Classification table: Data classification. A privacy incident starts the breach-notification clock; run the postmortem with the debugging-and-error-recovery skill.

AI / LLM features

Calling an LLM — chatbots, summarizers, agents, RAG — adds a new attack surface; map it to the OWASP Top 10 for LLM Applications (2025):

  • Model output is untrusted input (LLM05). Never into eval, SQL, a shell, innerHTML, or a file path; parse defensively, validate against a schema, then encode.
  • Prompts can be hijacked (LLM01). Untrusted text in the context — a user message, a fetched page, a PDF — can carry instructions. The system prompt is not a security boundary; enforce permissions in code.
  • Keep secrets, other tenants' data, and the full system prompt out of the context window (LLM02, LLM07); scope tool permissions, validate every tool argument, and confirm destructive actions (LLM06); cap tokens, request rate, and recursion depth (LLM10); partition RAG embeddings per tenant and validate documents before indexing (LLM08).

Pattern: LLM output handling.

Review Checklist

Before sign-off, walk ../../references/security-checklist.md: it covers authentication, authorization, input, data protection and privacy, headers and CORS, dependencies and supply chain, AI/LLM, and error handling, plus the OWASP quick-reference tables.

Common Rationalizations

RationalizationReality
"This is an internal tool, security doesn't matter"Internal tools get compromised. Attackers target the weakest link.
"We'll add security later"Security retrofitting is 10x harder than building it in. Add it now.
"No one would try to exploit this"Automated scanners will find it. Security by obscurity is not security.
"The framework handles security"Frameworks provide tools, not guarantees. You still need to use them correctly.
"It's just a prototype"Prototypes become production. Security habits from day one.
"Threat modeling is overkill here"Five minutes of "how would I attack this?" prevents the design flaws no control can patch later.
"It's just LLM output, it's only text"That "text" can be a SQL statement, a script tag, or a shell command. Treat it like any untrusted input.
"The audit passed, so the dependency is safe"Audits match known advisories. They do not detect a newly malicious package or make unreviewed install scripts safe to execute.
"Collect it now, we might need it later"Data you don't hold can't be breached, subpoenaed, or mis-deleted. "Might need it" is breach scope, not a purpose.
"We'll handle deletion requests manually"Manual erasure misses backups, caches, and analytics copies. If the schema can't find a user's data, you can't honor the request — design for it.
"Compliance is legal's problem, not ours"Export, deletion, retention, and consent are schema and code. Legal can't bolt them on after you've smeared PII across ten systems.

Red Flags

  • User input passed directly to database queries, shell commands, or HTML rendering
  • A delete, move, or overwrite whose target comes from a payload, a config value, or another process's command line, guarded only by a shape check on the path
  • Secrets in source code or commit history
  • API endpoints without authentication or authorization checks
  • Missing CORS configuration or wildcard (*) origins
  • No rate limiting on authentication endpoints, or an in-memory limiter in front of more than one instance
  • Stack traces or internal errors exposed to users
  • Dependencies with known critical vulnerabilities, competing lockfiles at one installation boundary, non-reproducible installs, or blanket-approved scripts
  • Server fetches user-supplied URLs without an allowlist (SSRF)
  • LLM/model output passed into a query, the DOM, a shell, or eval
  • Secrets, PII, or the full system prompt placed inside an LLM context window
  • Personal data collected with no stated purpose, retention limit, or deletion path
  • PII sent to analytics/ad/LLM vendors with no consent or data-processing agreement
  • "Delete my account" that only flips a flag while the personal data lingers in stores and backups

Verification

After implementing security-relevant code:

  • The native audit has no unmitigated reachable critical/high findings; CI preserves the authoritative lockfile and blocks unreviewed dependency scripts
  • No secrets in source code or git history
  • All user input validated at system boundaries
  • Destructive filesystem operations resolve symlinks, then verify allowlisted root, minimum depth, and ownership before running
  • Authentication and authorization checked on every protected endpoint
  • Security headers present in response (check with browser DevTools)
  • Error responses don't expose internal details
  • Rate limiting active on auth endpoints, backed by a shared store when more than one instance serves traffic
  • Server-side URL fetches validated against an allowlist (no SSRF)
  • LLM/model output validated and encoded before use (if AI features present)
  • Personal data is classified, minimized to a stated purpose, and has a retention limit
  • Deletion and export requests work end-to-end (including backups, caches, and analytics copies)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

api-and-interface-design

무료요약 있음AI 평가 100점

API와 모듈 사이의 입출력을 정의하고 이름, 오류 형식, 입력 검증을 통일합니다. 기존 호출 측과의 호환성과 재시도로 인한 중복 처리도 고려합니다.

  • 새 REST API를 설계합니다
  • 화면과 서버 사이의 데이터 규격을 정합니다
  • 호환성을 유지하며 API를 확장합니다
addyosmani/agent-skills11만2026년 10월 14일 업데이트

browser-testing-with-devtools

무료요약 있음AI 평가 100점

실제 브라우저에서 화면과 동작을 검증하고 오류, 통신, 로딩 속도를 조사합니다. 수정 전후의 스크린샷 비교와 접근성 확인도 지원합니다.

  • 레이아웃과 스타일 문제 조사
  • 브라우저 오류와 API 통신 확인
  • 수정 전후 화면 비교
addyosmani/agent-skills11만2026년 10월 14일 업데이트

ci-cd-and-automation

무료요약 있음AI 평가 80점

코드 변경 시 테스트, 타입 검사, 빌드를 자동 실행해 배포 전 품질 확인 절차를 마련합니다. GitHub Actions 설정부터 단계적 배포와 롤백 절차까지 다룹니다.

  • 새 프로젝트에 CI 도입하기
  • 테스트와 품질 검사 자동화하기
  • 단계적 배포와 롤백 설계하기
addyosmani/agent-skills11만2026년 10월 14일 업데이트

code-review-and-quality

무료요약 있음AI 평가 90점

병합 전에 코드 변경을 정확성, 가독성, 설계, 보안, 성능의 다섯 기준으로 검토합니다. 필수 수정과 선택 제안을 구분하고 구체적인 개선 방법을 제시합니다.

  • 병합 전 풀 리퀘스트 검토
  • 인공지능이 작성한 코드 확인
  • 리팩터링의 개선 효과 확인
addyosmani/agent-skills11만2026년 10월 14일 업데이트

code-simplification

무료요약 있음AI 평가 100점

동작을 바꾸지 않고 깊은 조건 분기, 긴 함수, 중복, 모호한 이름을 정리합니다. 기존 규칙과 테스트를 확인하고 가독성을 기준으로 작은 변경을 이어 갑니다.

  • 작동하는 기능의 코드 가독성을 높입니다
  • 리뷰에서 지적된 복잡성을 정리합니다
  • 깊은 조건 분기와 긴 함수를 정리합니다
addyosmani/agent-skills11만2026년 10월 14일 업데이트

constraint-driven-development

무료요약 있음AI 평가 80점

프로젝트 품질 기준을 수치와 확인 방법으로 문서화합니다. 변경 내역에서 테스트 생략, 경고 억제, 기준 하향을 점검해 에이전트 개발의 품질을 유지합니다.

  • 에이전트 개발의 품질 기준 설정
  • 커버리지와 성능 목표 선택
  • 테스트 생략과 경고 억제 발견
addyosmani/agent-skills11만2026년 10월 14일 업데이트

addyosmani의 스킬 모두 보기

이 스킬의 문제 신고