Review a PR, or a PR linked to an issue, for security risks. Check nine categories and report PASS, WARNING, or FAIL. Use when reviewing code for vulnerabilities, secrets, injection, authorization bypasses, or unsafe configuration. Trigger keywords - security review, code review, appsec, vulnerability assessment, security audit, review PR security.
76
95%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Review the changes in a GitHub PR for security. An issue input must identify one open linked PR. Report a verdict for each category.
gh (GitHub CLI) must be installed and authenticated.git must be available.If the user gives a PR or issue URL, extract the owner, repository, and number. Otherwise, ask for the URL.
Supported URL formats:
https://github.com/OWNER/REPO/pull/NUMBERhttps://github.com/OWNER/REPO/issues/NUMBERFor a PR URL, verify the number before Step 2:
gh pr view <number> --repo OWNER/REPO --json number,urlFor an issue URL, list its open closing PRs:
gh issue view <number> --repo OWNER/REPO --json closedByPullRequestsReferences \
--jq '.closedByPullRequestsReferences | map(select(.state == "OPEN")) | .[].number'Continue only when this returns one PR number, and verify that number with gh pr view.
If it returns zero or more than one, stop and ask for the PR URL.
Use the verified PR number in each later command.
Compare gh repo view --json nameWithOwner -q .nameWithOwner with the URL.
If the repositories match, check out the verified PR:
gh pr checkout <number>If the repositories do not match, clone the target to a temporary directory:
REVIEW_DIR=$(mktemp -d)
gh repo clone OWNER/REPO "$REVIEW_DIR"
cd "$REVIEW_DIR"
gh pr checkout <number>List all files changed from the base branch:
git diff main...HEAD --name-statusIf the PR targets another branch, use that branch as the base. Check it with:
gh pr view <number> --json baseRefName -q .baseRefNameRead each changed file. Read its diff:
git diff main...HEAD -- <file>If a PR changes more than 30 files, review them in this order:
Read the canonical Security Rubric. Independently evaluate the completed change against every category, including its trust-boundary questions and expected evidence. Do not rely on planning or implementation conclusions as review evidence.
For each of the nine categories, assign a verdict:
Structure the output as follows:
One paragraph summarizing the risk and whether the PR is safe to merge.
One row per finding:
| # | Category | Severity | File:Line | Description | Recommendation |
|---|
If there are no findings, state that the review found none.
For each category, give its PASS, WARNING, or FAIL verdict and reason.
List every file analyzed.
e987b00
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.