perform-security-review
БесплатноБез исполняемых скриптовНе проверенPerforms a security-focused code review by launching multiple specialized agents and a verification agent to ensure comprehensive coverage and accurate…
от bitwarden★ 167 звёзд на GitHubОб этом скилле
Parameters
--base-ref <ref>: Branch comparison mode only. Use this ref as the diff base instead of probing for one. It still passes all three checks in step 1-A2, so an unresolvable or disconnected ref is rejected rather than trusted. Supply this when the probes in step 1-A2 would resolve the wrong base — a non-default trunk such as rc, or a repository where gh is unauthenticated so candidate 2 is unavailable. It does not rescue a default actions/checkout; references/base-ref-resolution.md says why and what does.
--output-dir <path>: When using --output file, write the report to <path>/security-review-YYYY-MM-DD-{identifier}.md instead of the current working directory. Tip: use --output-dir ~/.claude/security-reviews/ to keep reports outside git repos.
Security Review Mode
Determine review mode from the invocation. A PR number, commit SHA, or duration argument selects its own mode, and --base-ref selects branch comparison mode when no positional argument is given.
If a positional argument and --base-ref are both present, stop and report the conflict, naming both and asking for one. Launch no agents. Write the report to the resolved output destination, as the step 1-A2 abort does.
- PR mode (PR number or URL):
gh pr view <number>for context,gh pr diff <number>for the diff. - Commit mode (commit SHA):
git diff <sha>..HEAD— reviews all changes after that commit. - Time-based mode (duration, e.g., "last 48 hours"): find the oldest commit in range with
git log --since="<duration>" --reverse --format=%H | head -1, thengit diff <sha>^..HEADto include it. - Local changes mode (no PR, commit, or duration argument, no
--base-ref, and pending changes exist):git diff HEADfor staged + unstaged changes. - Branch comparison mode (no positional argument, and either
--base-ref <ref>is given or the tree has no pending changes):git diff <base-ref>...HEAD— changes since the branch diverged from the base, resolved in sub-step A2 rather than assumed to bemain.--base-refselects this mode outright, so it works in a dirty tree, but a three-dot diff compares commits and leaves pending changes unreviewed. Rungit diff --quiet HEADhere too and add the step 5 header'sPending changes:line when it reports dirty; without--base-ref, pending changes route to local changes mode instead.
Two of those modes turn on whether the tree is dirty. Test it with git diff --quiet HEAD, which exits 1 when pending changes exist.
Security Review Process
Model selection: If --model is specified, use that model for all agents. Otherwise, default to opus.
Execute these steps in order. Do not skip, reorder, or combine them. Three places stop the run early, and taking them is following this rule: the mode-conflict stop above, the step 1-A2 abort, and the step 1B stops.
Gather context. Run all of these before launching any agents.
A.) Resolve repo identity. Run each of these as its own Bash call — do NOT chain with
&&,||,;, or pipes:git remote get-url origin— parseownerandrepofrom the output. Handle both HTTPS (https://github.com/owner/repo.git) and SSH ([email protected]:owner/repo.git) formats.git branch --show-current— capture the current branch name.
A2.) Resolve the base ref. Branch comparison mode only; skip for every other mode. Run each command as its own Bash call.
references/base-ref-resolution.mdexplains why each check below exists.A caller may supply
--base-ref <ref>. When present it is the only candidate: do not probe for others, and if it fails any of the three checks below, go straight to the abort. Falling through toorigin/HEADwould review a base the caller did not ask for. Use the ref exactly as given — never rewrite it — but a baremainresolves to the local branch rather thanorigin/main, so name the ref you used in the step 5 header, where a stale local base is at least visible.Otherwise, candidates in order:
git rev-parse --abbrev-ref origin/HEAD— its output, when the command exits 0. Key on the exit status, never the output.gh repo view --json defaultBranchRef --jq .defaultBranchRef.name, givingorigin/<default_branch>. Notgh api; seereferences/tool-grants.md. Build it whenever candidate 1 does not yield a base ref — either its command exited non-zero, so there is no candidate 1 at all, or its output failed one of the three checks. If the API call itself fails, candidate 2 does not exist.
Every candidate passes all three checks, in this order, whatever its source. A probe candidate that fails any check is discarded and resolution falls through to the next probe. A caller-supplied
--base-refhas no next candidate, so it goes straight to the abort.- It matches
^[A-Za-z0-9_][A-Za-z0-9._/-]*$, checked before the value is placed in any command. The reference file covers what that catches and
Установить perform-security-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(gh pr diff:*)Bash(gh pr view:*)Bash(gh repo view --json defaultBranchRef:*)Bash(git branch --show-current:*)Bash(git diff:*)Bash(git log:*)Bash(git merge-base:*)Bash(git remote get-url:*)Bash(git rev-parse:*)Bash(printenv GITHUB_ACTIONS)ReadSkillTaskWritemcp__plugin_aikido_aikido-mcp__aikido_issues_listВложенные файлы
FAQ
Что делает скилл perform-security-review?
Performs a security-focused code review by launching multiple specialized agents and a verification agent to ensure comprehensive coverage and accurate findings. Use this skill when the user asks for a "perform-security-review", "bitwarden-security-review", "execute a security review", "run a comprehensive security audit", "perform an end-to-end security assessment", or needs to coordinate multiple security checks across code, dependencies, secrets, and configurations. The skill manages the workflow, delegates tasks to specialized agents, and presents final findings to the user.
Как установить скилл perform-security-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл perform-security-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic