Community코딩 & 개발github.com

owasp-top10-audit

Security audit of a project against the OWASP Top 10 2025 — source code, configuration files, dependencies and CI/CD pipeline — with a report per category (A01 to A10), severity, exact location and a proposed fix. Use this skill whenever the user asks to check, audit, review or scan the security of an application, repository, API or code snippet, or mentions OWASP, "Top 10", security flaws, vulnerabilities, SQL injection, XSS, SSRF, access control, secrets in code, vulnerable dependencies or a pre-production security review, even if they don't name OWASP explicitly.

owasp-top10-audit란 무엇인가요?

owasp-top10-audit is a Claude Code agent skill that security audit of a project against the OWASP Top 10 2025 — source code, configuration files, dependencies and CI/CD pipeline — with a report per category (A01 to A10), severity, exact location and a proposed fix. Use this skill whenever the user asks to check, audit, review or scan the security of an application, repository, API or code snippet, or mentions OWASP, "Top 10", security flaws, vulnerabilities, SQL injection, XSS, SSRF, access control, secrets in code, vulnerable dependencies or a pre-production security review, even if they don't name OWASP explicitly.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/labibi/owasp-top10-audit/tree/HEAD/skills/owasp-top10-audit

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

OWASP Top 10 2025 Audit

This skill checks a real project against the ten categories of the OWASP Top 10 2025. It does not only look at code: in the 2025 edition, Security Misconfiguration (A02) and Software Supply Chain Failures (A03) rank 2nd and 3rd, and those risks live mostly in configuration files, dependency manifests and the build pipeline. An audit that reads only the code misses two of the top three risks.

The expected result is a report the user can read and act on right away: a table of the ten categories, then each issue with its evidence, severity and a concrete fix. The skill proposes fixes but does not modify the code unless the user explicitly asks.

Write the report in the user's language.

The ten categories (2025 edition)

CodeCategoryChange from 2021
A01Broken Access ControlStill #1; now includes SSRF
A02Security MisconfigurationUp from #5 to #2
A03Software Supply Chain FailuresNew; expands "Vulnerable and Outdated Components" to dependencies, build systems and distribution
A04Cryptographic FailuresDown from #2 to #4
A05InjectionDown from #3 to #5; includes XSS
A06Insecure DesignDown from #4 to #6
A07Authentication FailuresRenamed
A08Software or Data Integrity FailuresUnchanged; artifact integrity and trust boundaries
A09Security Logging & Alerting FailuresRenamed to stress alerting
A10Mishandling of Exceptional ConditionsNew: improper error handling, logic errors, failing open

Workflow

0. Check that the edition is still the latest

This skill was written for the 2025 edition. OWASP publishes a new edition roughly every four years (2017, 2021, 2025…). If a web search tool is available, run a quick search ("OWASP Top 10 latest edition") before the audit:

  • If nothing newer than 2025 exists, continue normally.
  • If a newer edition exists, say so in one line at the top of the report, fetch the new list from the official OWASP site and classify the issues according to it. The checks below remain valid: most risks carry over from one edition to the next under a different number or name. Also mention that the skill should be updated.
  • Without web search, use the 2025 edition and state in the scope that the report follows the 2025 edition.

1. Define the scope

Start with a quick inventory so you know what to read and miss nothing:

  • Languages and frameworks (Express, Next.js, Django, Flask, FastAPI, Laravel, Symfony, Spring, Rails, ASP.NET…). The framework matters: many protections (template escaping, CSRF, parameterized ORM queries) exist by default, and a flaw often comes from bypassing them.
  • Entry points: routes, controllers, API endpoints, GraphQL resolvers, jobs, webhooks, CLIs.
  • Configuration: .env*, settings.py, config/*.yml|json, application.properties, appsettings.json, nginx.conf, Dockerfile, docker-compose.yml, Kubernetes manifests, Terraform, next.config.js, vercel.json.
  • Dependencies: package.json + lockfile, requirements*.txt / pyproject.toml / poetry.lock, composer.json / .lock, pom.xml / build.gradle, Gemfile.lock, go.mod, Cargo.toml, .npmrc / pip.conf.
  • CI/CD: .github/workflows/*, .gitlab-ci.yml, Jenkinsfile, deployment scripts.

If the user only gave a code snippet, audit what is there and state clearly in the report which categories could not be checked for lack of configuration or manifests. That is more honest than a misleading "OK".

On a large repository, prioritize: authentication, authorization, endpoints handling sensitive data, file uploads, payments, administration. Say what you left aside.

2. Check each category

For each category, look actively using the pointers below (grep, reading key files). The lists are not exhaustive: they are starting points to guide the reading.

A01 — Access control (+ SSRF)

  • Sensitive routes or endpoints without an authentication or role middleware/decorator; an admin route protected only in the UI.
  • IDOR: an object loaded by an identifier from the request (req.params.id, request.GET['id']) without checking that it belongs to the logged-in user.
  • Role or permissions read from a client-controlled field (body, unsigned cookie, header, hidden field).
  • Mass assignment: Model.update(req.body), **request.data, $request->all() without an allowlist of fields.
  • Path traversal: a file path built from user input without normalization or a root-directory check.
  • CORS: Access-Control-Allow-Origin: * with cookies or credentials, or a reflected origin without an allowlist.
  • SSRF: an HTTP request to a user-supplied URL (fetch(url), requests.get(url), file_get_contents($url)) without an allowlist or blocking of internal addresses (169.254.169.254, localhost, private ranges).
  • No CSRF protection on state-changing actions when authentication relies on cookies.

A02 — Security misconfiguration

  • Debug mode in production: DEBUG = True, app.run(debug=True), APP_DEBUG=true, detailed error traces returned to the client.
  • Default or sample secrets: SECRET_KEY = 'changeme', default admin passwords, a committed .env.
  • Missing security headers (no Helmet or equivalent): CSP, HSTS, X-Content-Type-Options, frame-ancestors / X-Frame-Options.
  • Session cookies without Secure, HttpOnly or SameSite.
  • ALLOWED_HOSTS = ['*'], directory listing enabled, admin console or Swagger exposed without protection.
  • Containers: running as root, :latest image, database ports published on 0.0.0.0, secrets in ENV or ARG in the Dockerfile.
  • Cloud and IaC: public bucket, security group open to 0.0.0.0/0 on admin ports.
  • XML: parsers with external entities enabled (XXE).

A03 — Software supply chain

  • No lockfile, or an uncommitted lockfile; unpinned versions (*, latest, very wide ranges) for critical packages.
  • Versions known to be vulnerable or abandoned. If a tool is available and the network allows it, run it: npm audit --json, pip-audit, composer audit, osv-scanner, mvn dependency-check. Otherwise, report what you know about a specific version, stating that it comes from your own knowledge and must be confirmed against a vulnerability database. Never invent a CVE number.
  • Suspicious package names (typosquatting, a misspelling of a popular package), dependencies installed from a Git URL or tarball, an unofficial registry in .npmrc / pip.conf, --extra-index-url (dependency confusion risk).
  • Unexpected postinstall / preinstall scripts.
  • CI: third-party actions referenced by a branch or mutable tag instead of a SHA, curl … | sh in the build, overly broad GITHUB_TOKEN permissions, pull_request_target running a PR's code.

A04 — Cryptography

  • Passwords hashed with MD5, SHA-1 or SHA-256 without salt or stretching, instead of bcrypt, scrypt or Argon2; passwords stored in plaintext or reversibly encrypted.
  • Weak algorithms: DES, RC4, AES in ECB mode, fixed or reused IVs, hard-coded keys.
  • Non-cryptographic randomness for tokens: Math.random(), random.random(), rand().
  • TLS disabled or unverified: verify=False, rejectUnauthorized: false, NODE_TLS_REJECT_UNAUTHORIZED=0, plain HTTP for sensitive data.
  • Secrets in code: API keys, tokens, private keys. In the report, mask the value (sk_live_****abcd) and recommend revoking it, not just removing it from the code, since it stays in the Git history.

A05 — Injection (including XSS)

  • SQL or NoSQL built by concatenation or interpolation: "SELECT … " + id, f-strings, ${} in query(), ORM raw() / extra(), MongoDB $where or a query object taken straight from the body.
  • System commands: exec, child_process.exec, os.system, subprocess(..., shell=True), shell_exec, Runtime.exec with user input.
  • XSS: innerHTML, dangerouslySetInnerHTML, v-html, |safe, {!! !!}, mark_safe, template escaping disabled, HTML responses built by concatenation.
  • eval, new Function, unsafe deserialization (pickle.loads, yaml.load without SafeLoader, unserialize, ObjectInputStream) of external data.
  • Server-side template injection (SSTI), LDAP, XPath, HTTP header injection (CRLF).
  • LLM-backed applications: prompts built from untrusted data and model output executed or rendered without checks (prompt injection).

A06 — Insecure design This kind of risk rarely shows up line by line. Look at the business logic:

  • No rate limiting on login, password reset, SMS or email sending, expensive endpoints.
  • Bypassable business flows: payment validated client-side, price or quantity sent by the client and accepted as is, skippable steps, negative quantities.
  • Security questions as a recovery method, no tenant separation in a multi-tenant app.
  • Then ask the user at most 3 to 5 targeted design questions about what the code does not show (see step 4).

A07 — Authentication

  • No limit or lockout after repeated failed logins; no MFA available for admin accounts.
  • No password policy; messages that reveal whether an account exists.
  • Sessions: identifier not regenerated after login, no expiry, logout that does not invalidate the session server-side.
  • JWT: alg: none accepted, weak or hard-coded secret, signature not verified (jwt.decode without verification), no expiry, token stored in localStorage while the app has XSS.
  • Predictable, non-expiring or reusable reset tokens; non-constant-time secret comparison.

A08 — Software and data integrity

  • Scripts loaded from a CDN without an integrity attribute (SRI).
  • Updates, plugins or artifacts downloaded and executed without signature or checksum verification.
  • Webhooks accepted without verifying their signature (Stripe, GitHub…).
  • Serialized data, cookies or tokens trusted only because they come from the client, without a signature or MAC.
  • Pipeline: an artifact built in one job and deployed from another without an integrity check; build cache shared between untrusted branches.

A09 — Logging and alerting

  • Security events not logged: failed logins, access denials, permission changes, admin actions.
  • Sensitive data in logs: passwords, tokens, card numbers, full request bodies.
  • Log injection: user input written as is (line breaks).
  • No alerting or monitoring planned (nothing sent to an alerting tool, errors simply swallowed). If the monitoring configuration is not in the repository, mark the category "to confirm" rather than as an issue.

A10 — Mishandling of exceptional conditions

  • Failing open: a try/catch that lets the request through on error (catch { return true }, except: pass in an authorization check, a permissive default when a permissions service does not respond).
  • Exceptions silently swallowed (catch {}, except: pass) in sensitive paths.
  • Error messages or stack traces returned to the client.
  • Resources not released on error (transactions not rolled back, files or locks not released), inconsistent partial states.
  • Missing limits: request or file size, JSON depth, regular expressions vulnerable to ReDoS, missing timeouts on external calls.
  • Unhandled rejected promises, logic errors on edge cases (null, negative, empty, very large values).

3. Confirm each issue before reporting it

A report full of false positives wastes time and the team's trust. Before listing an issue:

  • Trace the data flow: does the data really come from the user? Does a global middleware, upstream validation or a framework default already neutralize it?
  • Check that the code is reachable (not dead code, tests or a documentation example). Test files and fixtures may contain fake secrets: report them only if they look like real credentials.
  • If you are unsure, keep the issue but mark it "To confirm" and explain what should be checked.

Describe the impact in one sentence (what an attacker could achieve), without writing a ready-to-use exploit payload: the goal is to fix, not to attack.

4. Design questions (A06)

After the analysis, add a short section with 3 to 5 questions at most, chosen based on what you saw. They cover what the code cannot show: threat model, sensitive data handled, tenant separation, backups, production monitoring and alerting, production secrets management, dependency update process. No generic questionnaire: each question must relate to this project.

5. Severity

Use four levels and justify each in one sentence:

  • Critical: remotely exploitable without authentication, with serious impact (code execution, SQL injection on a public endpoint, authentication bypass, exposed production secret).
  • High: exploitable with a regular account or under a common condition (IDOR, stored XSS, SSRF, weak password hashing).
  • Medium: requires an extra condition or has limited impact (missing headers, reflected XSS with partial protections, no rate limiting).
  • Low: best practice or defense in depth (version disclosure, incomplete logging).

Report format

Use this structure:

# OWASP Top 10 2025 Audit — <project name>

**Scope:** <what was analyzed: languages, folders, config files, manifests, CI>
**Out of scope / not verified:** <what was missing or left aside>

## Summary

<2 to 4 sentences: overall risk level, the 2 or 3 issues to fix first.>

| Category | Status | Issues |
|---|---|---|
| A01 Broken Access Control | ❌ Issue | 2 (1 critical, 1 high) |
| A02 Security Misconfiguration | ⚠️ To confirm | 1 |
| A03 Software Supply Chain Failures | ✅ Nothing found | 0 |
| … | | |
| A10 Mishandling of Exceptional Conditions | ➖ Not verifiable | — |

Statuses: ❌ Confirmed issue · ⚠️ To confirm · ✅ Nothing found in scope · ➖ Not verifiable (files missing)

## Detailed findings

<Sorted from most to least severe.>

### [A05-1] SQL injection in product search — Critical

- **Location:** `src/routes/products.js:42`
- **Evidence:**
  ```js
  db.query(`SELECT * FROM products WHERE name LIKE '%${req.query.q}%'`)
  • Impact: any visitor can read or modify the database.
  • Fix:
    db.query('SELECT * FROM products WHERE name LIKE ?', [`%${req.query.q}%`])
    

Design questions

  1. …

Next steps

<3 to 5 actions in priority order, and the tools to run to go further (dependency scanner, DAST, penetration test) when relevant.>


A few rules for this report:

- All ten categories always appear in the table, even when empty, so the reader sees what was covered.
- "Nothing found" does not mean "secure": say so in one line in the summary if most statuses are ✅.
- The fix is real code adapted to the project, in its language and framework, not generic advice.
- An issue present in several places gets a single entry listing all locations.
- If the user then asks you to apply the fixes, apply them one at a time and summarize what changed.

관련 스킬