chainsaw pr-scan
Diff manifest/lockfile changes and flag added or upgraded dependencies
Diff manifest/lockfile changes and flag added or upgraded dependencies
chainsaw pr-scan [flags]
Compares manifest and lockfile files between two git refs and reports every newly added or upgraded dependency coordinate (name@version). For each coordinate the offline signal engine emits supply-chain signals; the final verdict is “allow”, “warn”, or “block”.
Changed GitHub Actions workflows (.github/workflows/.yml, action.yml) are inspected too: every added or changed uses: ref gets the scan-actions signals (action.); a known-compromised action blocks, so does a name that imitates a known-good action under another owner, so does any action referenced by tag or branch instead of a commit SHA, GitHub’s and Chain305’s own included, and so does an action from a publisher outside the known-publisher list, even when SHA-pinned. Known-compromised actions come from the same sources as scan-actions: the built-in seed plus the local GitHub Actions OSV snapshot when present. The scan-actions workflow lint also runs; a dangerous shape the PR introduces (pwn request, unguarded comment trigger, script injection, a run: step that decodes a payload into a shell or interpreter) is a blocking row named after the workflow file.
A changed .vscode/tasks.json or .vscode/settings.json that newly runs a task when the folder is opened (runOn: folderOpen, task.allowAutomaticTasks: on) blocks: that code runs on a reviewer’s machine as soon as they open the checkout.
Intended as a required-status-check companion to chainsaw scan-repo: scan-repo catches committed bypass config; pr-scan catches newly introduced packages.
Verdicts use offline heuristics only — run “chainsaw scan” for full signals.
Exit codes: 0 clean — no warn or block findings 10 one or more warning-level findings 20 one or more blocking findings (also exit 20 with –strict + any warning) 30 one or more monitored manifests failed to parse (dependencies dropped)
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--base | string | — | Base git ref or SHA to diff from (required) |
--head | string | HEAD | Head git ref or SHA to diff to (default: HEAD) |
--output-file | string | — | Write the report to this path (JSON by default; SARIF with –format=sarif) |
--repo-path | string | . | Path to the git repository |
--strict | bool | — | Escalate warnings to blocking (exit 20 instead of 10) |
The global flags apply here too.