Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

security-audit

БесплатноЗапускает вложенные скриптыНе проверен

Comprehensive security audit of any codebase. Maps the project's stack, scans for hardcoded secrets, vulnerable dependencies, injection flaws, auth/authz…

jiayaoqijiaот jiayaoqijia★ 81 звезда на GitHub

Об этом скилле

Security Audit

Full-project, read-only security review that ends in a written report. Works for any language/stack.

Ground rules

  • Read-only. Never modify, delete, move, or "fix" files. Never run destructive or mutating commands. Never actually exploit a finding — reasoning about exploitability on paper is enough.
  • Evidence or it didn't happen. Every finding must cite path/file.ext:line and a short code excerpt you actually read.
  • State the falsifier. A finding is not complete until it names the near-miss condition you ruled out and HOW you ruled it out ("this SharedPreferences hit is not the encryptedSharedPreferences: option — the .getInstance call writes a token"). A hit you cannot falsify is a lead, not a finding: read more context or mark it not-assessed.
  • Verify before reporting. Read surrounding context to kill false positives (test files, examples, fixtures, obviously-fake values).
  • No network required, but if network is available, the dependency-vulns and cve-research skills use live databases.

Mode: fix verification (re-audit)

Use when the user asks to "verify the fixes", "re-audit", "check what's fixed", or an existing SECURITY-AUDIT.md is present from a prior run. Never silently re-scan from zero when prior findings exist — verification comes first.

  1. Load the prior report (SECURITY-AUDIT.md in project root). If missing, run the normal flow.
  2. Verify each prior finding by reading the cited file:line (and its function/route context):
    • FIXED — the offending code is gone or the defense is present (parameterized, allowlisted, guarded, rotated secret + scrubbed history)
    • STILL PRESENT — evidence unchanged
    • MOVED / REGRESSED — code moved: re-cite the new file:line; if the "fix" introduced a new flaw, that's a new finding
    • Secrets: FIXED only after rotation evidence — removing the string from HEAD is not a fix (history + old deployments keep it)
  3. Then scan for NEW findings in changed code since the prior report (git diff <prior-commit>..HEAD if the report records a commit) — full re-scan only if the user asks.
  4. Rewrite SECURITY-AUDIT.md: per-finding status line (FIXED / STILL PRESENT, with the re-checked citation), a summary table (fixed n / open n / new n), and new findings appended with fresh SEC-NNN ids. Keep ids stable across runs — SEC-004 stays SEC-004 whether open or fixed.
  5. Verbal summary: fixed count, still-open worst issue, anything the fix broke.

Mode: incremental (PR / diff) audit — catch gaps when they land

Use when the user says "audit this PR / branch / these commits" or hands you a diff — no prior SECURITY-AUDIT.md needed. Early-stage math: a gap caught in the PR costs an hour; caught at ship time it costs a chain.

  1. Scope the delta (read-only):
    bash ../security-audit/scripts/pr_diff_scope.sh <base-ref>   # default origin/main
    
    It prints BASE, changed files, and which sibling skills apply — verify the BASE line resolved to the ref you expected.
  2. Run ONLY the dispatched skills, plus ALWAYS: ../secrets-detection/SKILL.md over the ADDED lines, and ../dependency-vulns/SKILL.md when any manifest/lockfile changed.
  3. Audit the chain, not the line: a changed route pulls in its controller → model → view; a changed model pulls in every writer. Read the neighborhood of each change.
  4. Delta matrix: disposition every actor×surface cell the delta touches (Completeness gate v2 rules unchanged — a one-file PR still gets its surfaces dispositioned).
  5. Report to SECURITY-AUDIT-PR.md in the project root: findings cited in delta code, the delta matrix, census receipts, and a CI verdict line — VERDICT: BLOCK if any High+ finding is reachable from unauthenticated input, else VERDICT: PASS.

Phase 0 — Recon: build the security map

Do NOT read every file. Probe cheaply first:

rg --files -g '!node_modules' -g '!vendor' -g '!dist' -g '!build' -g '!target' -g '!coverage' | head -100
rg --files -g 'package.json' -g 'package-lock.json' -g 'yarn.lock' -g 'pnpm-lock.yaml' \
   -g 'requirements*.txt' -g 'Pipfile*' -g 'pyproject.toml' -g 'poetry.lock' \
   -g 'Gemfile*' -g 'Cargo.toml' -g 'Cargo.lock' -g 'composer.json' -g 'composer.lock' \
   -g 'go.mod' -g 'go.sum' -g 'pom.xml' -g '*.csproj' -g 'pubspec.yaml' -g 'mix.exs'
rg --files -g 'Dockerfile*' -g 'docker-compose*' -g '*.tf' -g '*.yaml' -g '*.yml' -g '.env*' -g '*.conf' -g 'nginx*' -g '*.toml'
git log --oneline -5 2>/dev/null; git remote -v 2>/dev/null

Record in the report's "Stack" section:

  • Languages + frameworks + versions (from manifests and config)
  • Entry points (HTTP handlers, CLI mains, background jobs, webhooks)
  • Infra: Docker/K8s/Terraform/CI configs, cloud providers
  • Auth mechanism, database(s), external services
  • Repo size class (if huge, sample smartly — prioritize first-party code over vendored/generated code)

Then census the coverage targets — they seed the Phase

Полный SKILL.md на GitHub

Установить security-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSESOURCE.mdTRUST.auto.yamlreferences/external-sources.mdreferences/methodology-mirror.mdreferences/owasp-top10.mdscripts/pr_diff_scope.shscripts/probe_tools.sh

FAQ

Что делает скилл security-audit?

Comprehensive security audit of any codebase. Maps the project's stack, scans for hardcoded secrets, vulnerable dependencies, injection flaws, auth/authz bugs, weak crypto, misconfigurations, container/IaC risks, and data exposure, then writes a prioritized SECURITY-AUDIT.md report with file:line evidence, CWE mapping, and fix recommendations. Use when the user asks for a security audit, security review, vulnerability scan, pentest prep, or project hardening.

Как установить скилл security-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл security-audit запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить security-audit с