`A pull request can pass its tests and still remove useful coverage, broaden workflow permissions or introduce destructive SQL.
I built PatchScope to help reviewers find those changes and decide what to inspect next.
It turns a Git diff into an actionable review checklist, with an explanation of what matched, why it matters and what to check.
Install from GitHub Marketplace · Try the browser demo · Source code
What does it look for?
PatchScope uses deterministic rules to identify review signals such as:
- Removed test files.
- Skipped or exclusive tests.
- Broad GitHub Actions permissions.
- Potentially destructive SQL.
- Dependency changes that deserve a reproducibility check.
- Known TLS verification bypass patterns.
Each finding becomes a concrete review prompt.
These are heuristics for human review, not confirmed vulnerabilities. A match can be intentional, and an empty report does not establish that a patch is safe.
One engine, three ways to use it
| Environment | What you get |
|---|---|
| Browser | Interactive diff exploration and a review checklist |
| CLI | Markdown, JSON or SARIF reports |
| GitHub Actions | A job summary and report files for your workflow |
No AI API keys, model subscription or application account is required. Analysis runs locally in the browser, terminal or CI runner.
Try it before installing
Open the browser demo and click Explore the example.
The bundled synthetic patch changes four files and produces five prompts, covering workflow privileges, destructive SQL, removed tests, workflow behavior and dependency reproducibility.
You can also watch the 18-second illustrated walkthrough. It uses actual fixture output; the CI section illustrates the integration rather than recording the GitHub interface.
Add it to a pull request workflow
Save this as .github/workflows/patchscope.yml:
`yaml
name: PatchScope PR review
on:
pull_request:
permissions:
contents: read
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Create pull request diff
shell: bash
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
git diff --no-ext-diff --no-color \
"$BASE_SHA...$HEAD_SHA" \
> "$RUNNER_TEMP/patchscope.diff"
- name: Build review checklist
id: review
uses: brunnojob/patchscope@v2.0.1
with:
diff-file: ${{ runner.temp }}/patchscope.diff
- name: Keep review reports
uses: actions/upload-artifact@v4
with:
name: patchscope-review
retention-days: 7
path: |
${{ steps.review.outputs.report-markdown }}
${{ steps.review.outputs.report-json }}
${{ steps.review.outputs.report-sarif }}
`
The workflow compares the PR head against its merge base with the target branch.
It uses read-only repository permissions and does not install project dependencies or execute PR source code. For production, pin this and other third-party Actions to reviewed full commit SHAs.
After the run, read the checklist in the job summary or download the report artifacts.
Findings are advisory: they do not fail the Action. A green job means analysis completed, not that the patch is safe.
Prefer the terminal?
With Node.js 22+ and Git:
`bash
git clone https://github.com/brunnojob/patchscope.git
cd patchscope
Analyze the bundled example
node scripts/cli.mjs docs/example.diff --format markdown
Export structured results
node scripts/cli.mjs docs/example.diff --format json
node scripts/cli.mjs docs/example.diff --format sarif
`
To inspect changes in another repository:
`bash
git diff --no-ext-diff --no-color HEAD > change.diff
node /path/to/patchscope/scripts/cli.mjs \
change.diff --format markdown
`
The CLI also supports explicit severity thresholds, configurable rule priorities and suppressions with documented reasons.
Where it helps—and its limits
PatchScope is useful when you want an inspectable starting point for reviewing a change.
It does not understand an entire application, measure test coverage, execute tests or replace secret scanning. Its dependency and test prompts describe the patch, including the context missing from unchanged files.
Reports omit raw patch lines and detected credential values. Filenames and configured suppression reasons can still be sensitive, so review exports before sharing.
Try it on a real review
PatchScope is free and MIT licensed.
- Install the GitHub Action
- Try the browser workbench
- Read the documentation
- Report a sanitized edge case
What recurring change would you want a review checklist to highlight—and what would make that prompt useful rather than noisy?
If PatchScope helps your workflow, you can optionally support its maintenance through Stripe. All features remain free.`

Top comments (0)