/shipwright:security-scanfrom shipwright
Runs a three-tier security scan on a GitHub repo: secrets (gitleaks), dependency/container CVEs (grype/syft), GitHub Actions issues (zizmor), authn/authz anti-patterns, and posture gaps. Read-only, records findings in task store.
Ships in shipwright. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run a report-only, three-tier security scan against a single repo (named by the required
--repo) and record the findings as PatrolFindings in the task store, with one run and its
metrics. All finding detail lives in the store; nothing is written to any repo path. This skill
makes no code changes — it reads, runs read-only tools, and records only. A companion /security-fix skill (not this one) acts
on the findings.
The three tiers are:
gitleaks (secret
scan, full history), grype + syft (container CVE scan +
SBOM generation), and zizmor (GitHub Actions workflow lint). Two further Tier 1 inputs are
not binaries: Step 3.6 reads the Grype reports the repo's own image-scan.yml workflow
publishes as the image-scan-report artifact (published-image CVEs), and Step 3.7 reads the
osv-scanner report its dependency-scan.yml workflow publishes as the dependency-scan-report
artifact (lockfile CVEs). This skill never runs osv-scanner itself. Each tool has an explicit
per-tool fallback — if its download or checksum step fails, that one tool's findings are
skipped, the gap is noted in the summary, and the scan continues. A single tool's download
failure must never fail or abort the whole scan.SECURITY.md, an SBOM artifact (from
Tier 1's syft output), branch-protection status, and image-scan posture (workflow present,
fresh, and on the current Grype pin — only for repos that publish images).Trivy is deliberately excluded. Trivy is a very common container/SBOM scanner, so its absence here is intentional and worth documenting: Trivy suffered a supply-chain compromise in March 2026 (advisory GHSA-69fq-xp46-6x23). Until that is fully resolved and re-audited, this skill uses Grype + Syft (both Anchore projects) instead for container CVE scanning and SBOM generation. Published-image CVE scanning follows the same rule: it is the Grype-based image-scan flow (the repo's
image-scan.ymlworkflow, read in Step 3.6), never Trivy. Do not reintroduce Trivy here without an explicit security review.
--repo org/repo — required (see Step 2; a usage error is printed without it)--cron ID — the system-cron id for the recorded run (default security-patrol)--init — copy the default security-scan principles file to the project and exit (no scan)--summary — print counts only--dry-run — run the full scan and diff but record nothing; print what would be recorded--init FlagIf the --init flag was passed:
.claude/shipwright/security-principles.md already exists in the project root.
.claude/shipwright/security-principles.md. Edit it to customize security checks for this project." and stop.references/principles.md (relative to the plugin root — the plugin's own shared security principles file).claude/shipwright/security-principles.md in the project root.claude/shipwright/security-principles.md. Edit it to customize security checks for this project. Re-run /security-scan to start scanning."See references/principles-pattern.md (relative to the plugin root) for the canonical
description of this override pattern — schema, override semantics, and init flow —
shared with entropy-scan.
repo-slugThis skill scans exactly one repo per invocation, named by the required --repo org/repo
argument (e.g. app-vitals/shipwright). If --repo is missing or not org/repo, print and stop:
Usage: /security-scan --repo org/repo [--cron ID] [--summary] [--dry-run] [--init]
Error: --repo is required.
Set REPO to the --repo value and CRON_ID to the --cron value (the system-cron id the
scheduler passes; default security-patrol). cd into the repo's local clone
before Step 3.
Derive repo-slug: the last path segment, lowercased — e.g. app-vitals/shipwright →
shipwright. Compute the ISO week as YYYY-Www (e.g. 2026-W29) from the current UTC date.
Why this matters (critical): finding fingerprints are namespaced as
security-{rule}-{repo-slug}-{YYYY-Www} — rule + repo-slug + ISO week — not just
{rule}-{YYYY-Www}. This avoids the known entropy-fix task-ID collision bug: when an
ID is built from rule + week only, the same rule firing in two repos in the same ISO week
produces an identical ID, and the second repo's run silently no-ops.
Each tool below follows the exact same pinned-version + sha256sum-verify + extract pattern
as .github/workflows/ci.yml's existing gitleaks step:
curl -sSfL "<pinned release asset URL>" -o <archive>
echo "<sha256> <archive>" | sha256sum -c
tar -xz -f <archive> <binary> # (or chmod +x for a bare binary)
./<binary> <read-only scan command>
Per-tool fallback (applies to every tool in this step): wrap each tool's
download+checksum in its own guarded block. If the curl download or the sha256sum -c
verification fails for a specific tool, do not abort the scan. Instead:
tools_skipped and note it in the summary, e.g.
gitleaks: download failed, skipped — see error above.The overall scan must never fail just because one tool's binary couldn't be fetched or verified.
Stage tool binaries outside the scan target. Before Step 3.1's gitleaks download, create one staging directory for all four tools' downloads and reuse it for the rest of Step 3:
TOOLS_DIR="$(mktemp -d)"
Every tool's curl -o, tar -xz -f ... -C, chmod +x, and binary-invocation path below uses
$TOOLS_DIR — never a bare filename in the repo root. This matters because grype's and
syft's dir:. scans (Step 3.3/3.4) walk the entire repo-root filesystem tree. If a tool's
own downloaded archive/binary is sitting in the repo root when dir:. runs, grype's binary
classifier detects that binary's own embedded Go module info (e.g. github.com/anchore/syft,
github.com/google/osv-scalibr, github.com/go-git/go-git) and reports CVEs against it as if
it were repo code — self-pollution that has inflated raw grype match counts by 10-20x in past
runs. Staging every tool's download in $TOOLS_DIR (outside the repo root, and never itself a
scan target) fixes this at the root for all four tools at once, including gitleaks/
zizmor's binaries, which also currently land in the repo root before grype/syft run. The
--exclude './node_modules/**' --exclude './worktrees/**' flags on grype/syft (Step 3.0) are
unrelated environment-noise fixes and stay as-is — grype/syft still scan . (the real repo
root); only the tool binaries' own location moves.
Checksum provenance. All four checksums below were independently verified — downloaded and hashed locally, then cross-checked against each vendor's published manifest (
gitleaks:ci.yml's existing value;grype/syft:{tool}_{version}_checksums.txt;zizmor: no vendor checksums.txt is published for this release, so its digest is GitHub's own release-asset SHA256, confirmed by an independent local download+hash). Whenever a pinned version is bumped, the new checksum must be re-verified the same way — download the asset,sha256sumit locally, and cross-check against the vendor's manifest where one exists. Never substitute a plausible-looking but unverified hash. If a tool's checksum cannot be verified, treat that tool as unavailable and use its per-tool fallback rather than shipping a fake hash.
Two non-codebase environment artifacts have repeatedly caused false-positive grype-cve /
osv-cve noise across weekly scans: a stale node_modules/ left over from a previously-fixed
dependency pin, and a leftover worktrees/ side-checkout nested inside the repo root (e.g.
from a worktree created with a relative instead of absolute target path). Neither is
codebase content — both must be excluded from every Tier 1 scan target so environment
staleness never masquerades as a new/regressed finding:
dir: mode) do not respect .gitignore at all — they walk the full
filesystem tree under the given path. Both accept repeatable --exclude <glob> flags
(verified independently by running each tool against a fixture with a lockfile nested
under node_modules/ and worktrees/ — the flag suppresses matches from both without
affecting real source paths). Always pass:
--exclude './node_modules/**' --exclude './worktrees/**'
node_modules//worktrees/ directories never appear
in its results.Unlike ci.yml (which runs --no-git on the working tree), this skill runs a full-history
secret scan so secrets committed and later removed are still caught.
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v8.27.2/gitleaks_8.27.2_linux_x64.tar.gz" -o "$TOOLS_DIR/gitleaks.tar.gz"
echo "141c3b2dede46d8b3a53b47116da756bd223decc0374797559a6b50ecba5590c $TOOLS_DIR/gitleaks.tar.gz" | sha256sum -c
tar -xz -f "$TOOLS_DIR/gitleaks.tar.gz" -C "$TOOLS_DIR" gitleaks
"$TOOLS_DIR/gitleaks" detect --source . --redact --report-format json --report-path "$TOOLS_DIR/gitleaks-report.json"
(Full-history mode: run gitleaks detect without --no-git so it walks the git log.)
Record each finding in the common finding-record shape (Step 6).
Suppression via
.gitleaksignore. This invocation auto-discovers and respects a.gitleaksignorefile at the scan source root (gitleaks natively defaults-i/--gitleaks-ignore-pathto.— no flag change is needed). Entries in.gitleaksignoreuse the fingerprint formatcommit:file:rule:startLine. Suppression entries are only added when a human confirms a false-positive finding while closing a HITL task via/shipwright:hitl(see GLB-2.2), never automatically.
Anchore projects publish grype_{version}_linux_amd64.tar.gz plus a
grype_{version}_checksums.txt manifest per release.
curl -sSfL "https://github.com/anchore/grype/releases/download/v0.116.0/grype_0.116.0_linux_amd64.tar.gz" -o "$TOOLS_DIR/grype.tar.gz"
echo "40aff724297312f91ea390d003bed8d8651c74cc7f5b26732db80b3a408d2fc5 $TOOLS_DIR/grype.tar.gz" | sha256sum -c
tar -xz -f "$TOOLS_DIR/grype.tar.gz" -C "$TOOLS_DIR" grype
"$TOOLS_DIR/grype" dir:. --exclude './node_modules/**' --exclude './worktrees/**' -o json --file "$TOOLS_DIR/grype-report.json"
Syft is the second Anchore project; same asset/checksum naming as grype
(syft_{version}_linux_amd64.tar.gz + syft_{version}_checksums.txt). Syft's SBOM output
feeds Tier 3's SBOM-presence posture check.
curl -sSfL "https://github.com/anchore/syft/releases/download/v1.27.1/syft_1.27.1_linux_amd64.tar.gz" -o "$TOOLS_DIR/syft.tar.gz"
echo "c2cb5867a238baf41adf15f7e01e28cbd886378859eed81e52c080ca0346eefe $TOOLS_DIR/syft.tar.gz" | sha256sum -c
tar -xz -f "$TOOLS_DIR/syft.tar.gz" -C "$TOOLS_DIR" syft
"$TOOLS_DIR/syft" dir:. --exclude './node_modules/**' --exclude './worktrees/**' -o cyclonedx-json="$TOOLS_DIR/sbom.cyclonedx.json"
The generated sbom.cyclonedx.json is the SBOM artifact Tier 3 checks for. Note: this SBOM's
package cataloger currently produces zero pkg:npm/ entries for Bun-lockfile repos (see
the osv-cve authority note in Step 3.7) — it is complete for container/filesystem CVE-scan
posture purposes, but is not a reliable source for enumerating npm/bun dependencies.
zizmor is a Rust/cargo-dist project; it moved from woodruffw/zizmor to the zizmorcore/zizmor
org, and its linux release asset is zizmor-x86_64-unknown-linux-gnu.tar.gz (no version in
the filename, and the tarball contains the zizmor binary directly — no subdirectory to
strip). No vendor checksums.txt is published for this release; GitHub computes and exposes
a SHA256 digest for each release asset, which was independently confirmed by downloading the
asset and hashing it locally.
curl -sSfL "https://github.com/zizmorcore/zizmor/releases/download/v1.27.0/zizmor-x86_64-unknown-linux-gnu.tar.gz" -o "$TOOLS_DIR/zizmor.tar.gz"
echo "277f2bd8fd37cf60c42ab7afca6faa884e65440fa31e02b44bdaae60f62a358f $TOOLS_DIR/zizmor.tar.gz" | sha256sum -c
tar -xz -f "$TOOLS_DIR/zizmor.tar.gz" -C "$TOOLS_DIR" zizmor
"$TOOLS_DIR/zizmor" --format json .github/workflows/ > "$TOOLS_DIR/zizmor-report.json"
If the repo has no .github/workflows/ directory, record "no workflows to scan" — not a
failure.
.github/zizmor.ymlzizmor supports its own ignore config in .github/zizmor.yml, keyed by exact file:line.
That native matching is fragile for this purpose: it pins an exact line number, and any
commit that shifts lines above an ignored step — even an unrelated change elsewhere in the
workflow file — moves the finding to a new line and breaks the exact match. When that
happens, a finding a human already reviewed and explicitly accepted as risk silently
resurfaces in zizmor-report.json as if it were new, purely from line drift, not from any
change to the risk decision itself. This step applies a drift-tolerant suppression filter on
top of zizmor's raw output before any zizmor finding reaches Step 6 — so a reader skimming
Step 6 should know zizmor findings have already been filtered by the time they get there.
.github/zizmor.yml. If the file does not exist in the repo, skip this filter
entirely — proceed with every zizmor finding unfiltered.ignore list into
{rule, file, line, stepName} tuples. Each entry is {file}:{line} followed by a
trailing # "Step Name" — reason comment — the step name is the quoted text immediately
after the #. For example, this repo's own .github/zizmor.yml has entries like:
artipacked:
ignore:
- auto-bump-chart.yml:178 # "Checkout main" — pushed from by `git push -u origin "$BRANCH"`
which parses to {rule: "artipacked", file: "auto-bump-chart.yml", line: 178, stepName: "Checkout main"}.stepName still exists
at/near the finding's actual line (handles drift larger than the tolerance).image-cve)Images a repo publishes are scanned by the repo's own .github/workflows/image-scan.yml
(schedule + workflow_dispatch; contract in references/image-scan-workflow-template.md),
which uploads the artifact image-scan-report holding one Grype JSON report per image,
grype-<image>.json. The workflow never fails on findings, so a green run says nothing about
CVEs — this step reads the reports. No binary is downloaded here (the reports were produced
by the workflow's pinned Grype).
image-scan.yml (Step 5 handles the posture side):
gh run list --repo "$REPO" --workflow image-scan.yml --status success --limit 1 \
--json databaseId,createdAt,conclusion
IMG_DIR="$TOOLS_DIR/image-scan-report"
gh run download "$RUN_ID" --repo "$REPO" --name image-scan-report --dir "$IMG_DIR"
grype-<image>.json, take every entry of matches[] where
vulnerability.severity is High or Critical and vulnerability.fix.state is
"fixed" (a fix exists). Unfixed/not-fixed/wont-fix/unknown matches and lower
severities are not recorded — nothing actionable. Each match becomes one entry
{file: <image>, line: 0, description: "<CVE id> <package>@<version> (fixed in <fix.versions>)"},
deduped by CVE, package and image: only true repeats (the same CVE in the same package of
the same image, e.g. across layers) collapse to one entry. The same CVE in two packages of
one image (e.g. libssl and libcrypto) is two entries, and the same CVE in two images is
two entries, so every entry carries a real package for Step 5.5's cve + package
suppression match. Severity is the highest of the deduped entries.image-cve (tier 1) via Step 6 ($RUN_ID is the databaseId of the
run from step 1). Diff/resolve is Step 7 and works per rule record like every other rule: when
later reports no longer contain any qualifying CVE the image-cve record is absent and resolves;
while some remain, the shrinking detail.count/findings list reflects the ones that vanished.gh run list or gh run download fails
(token lacks actions: read, 403/404, no successful run yet, artifact expired or missing
image-scan-report, unparseable JSON), count it in tools_skipped, name it in the Step 9
skipped list (e.g. image-scan artifact), set an inconclusive note for Step 5's
image-scan posture check, and continue — never abort the scan. A skipped run produces no
image-cve findings and must not resolve existing ones: when this step is skipped,
carry the prior image-cve finding forward unchanged (omit it from the resolve set in Step 7).osv-cve)Repos scan their own lockfiles in .github/workflows/dependency-scan.yml (schedule +
pull_request + workflow_dispatch; contract in references/dependency-scan-workflow-template.md),
which uploads the artifact dependency-scan-report holding one osv-scanner JSON report,
osv-report.json. The workflow never fails on findings, so a green run says nothing about
CVEs — this step reads the report. It is the only source of osv-cve findings: the skill
does not scan the checkout's lockfiles itself. The rule, fingerprint
(security-osv-cve-{repo-slug}-{YYYY-Www}) and entry shape are unchanged, so findings already
in the store dedupe. A repo with no dependency-scan.yml gets no osv-cve findings until its
add-the-workflow task merges; Step 5's posture-cve-scan-missing queues that task.
dependency-scan.yml, this step
is skipped, not empty: count it in tools_skipped, name it in the Step 9 skipped list
(dependency-scan artifact: no workflow), produce no entries, and keep every existing
osv-cve finding — never resolve one because the workflow is missing (Step 5's
posture-cve-scan-missing handles the posture side):
gh run list --repo "$REPO" --workflow dependency-scan.yml --status success --limit 1 \
--json databaseId,createdAt,conclusion
DEP_DIR="$TOOLS_DIR/dependency-scan-report"
gh run download "$RUN_ID" --repo "$REPO" --name dependency-scan-report --dir "$DEP_DIR"
$DEP_DIR/osv-report.json (osv-scanner's JSON report format):
every vulnerability in results[].packages[] whose severity is High or Critical
(groups[].max_severity / database_specific.severity) and that has a fixed version
(affected[].ranges[].events[].fixed) becomes one entry
{file: <lockfile path>, line: 0, description: "<CVE id> <package>@<version> (fixed in <fixed version>)"}.
Unfixable and lower-severity vulnerabilities are not recorded. The CVE id is the CVE-* entry of
the vulnerability's aliases (fall back to its id when none), so every entry carries a
real CVE and package for Step 5.5's cve + package match.osv-cve (tier 1) via Step 6. Diff/resolve is Step 7, per rule record.gh run list or gh run download fails (token lacks
actions: read, 403/404, no successful run yet, artifact expired or missing
dependency-scan-report, unparseable JSON), count it in tools_skipped, name it in the
Step 9 skipped list (dependency-scan artifact), set an inconclusive note for Step 5's
dependency-scan posture check, and continue. A skipped read produces no entries and must
not resolve existing osv-cve findings that only this step could confirm.osv-cve is authoritative for Bun-lockfile dependency CVEs. For repos using
bun.lock, treatosv-cvefindings (the dependency-scan artifact) as the authoritative dependency-CVE source, not grype'sgrype-cvefindings on lockfile-derived (npm/bun) packages. Confirmed root cause: syft's package cataloger and grype's own embedded lockfile reader both only partially parse this org'sbun.lockformat — a generatedsbom.cyclonedx.jsonhad zeropkg:npm/entries despite hundreds of packages actually present in the lockfile across multiple repos scanned, and grype's lockfile reader itself extracted only 2-5 packages out of hundreds. osv-scanner's dedicatedbun.lockparser is comprehensive by comparison (dozens of unique CVEs found vs. grype's 1-2 packages in the same runs). Until upstream syft/grypebun.locksupport improves, anygrype-cvefinding on an npm/bun package is a narrow, non-independent subset of osv-scanner's results — it does not corroborate or add confidence beyond what osv-cve already reports; absence of a matching grype-cve finding means nothing about a real CVE's presence, since grype is undercounting, not disagreeing.
These are judgment-based Read/Grep passes — no binaries. Keep this tier lightweight: Grep and Read for common anti-patterns that Tier 1's tools do not catch, and record each finding in the same finding-record shape (Step 6).
== / === on a secret
instead of a constant-time compare). Read the surrounding handler to confirm the check is
genuinely absent before recording — do not flag on a bare keyword match.Record each Tier 2 finding with rule values like authz-missing-check,
secret-weak-compare, or hardcoded-credential.
Presence/configuration checks, each recorded as a finding when absent/misconfigured:
SECURITY.md present. Check for SECURITY.md at the repo root (or .github/SECURITY.md).
If absent, record a finding (rule: posture-security-md-missing).sbom.cyclonedx.json. If syft was
skipped (fallback) or produced no SBOM, record a finding (rule: posture-sbom-missing),
noting whether the cause was a syft download failure./protection endpoint):
gh api "repos/{org}/{repo}/branches/{default-branch}" 2>/dev/null # .protected, .protection
gh api "repos/{org}/{repo}/rules/branches/{default-branch}" 2>/dev/null # rulesets
The branch is protected if .protected is true or the rules list is non-empty. If both
report unprotected, record a finding (rule: posture-branch-protection-missing). If a call
fails for lack of token/permission (not a genuine "unprotected" signal), record it as an
inconclusive posture note, not a confirmed finding — do not assert "unprotected" when
you merely couldn't check.Dockerfile (outside node_modules/,
worktrees/, test fixtures) and a workflow under .github/workflows/ that builds and
pushes it (docker/build-push-action with push: true, docker push, or an equivalent
publish step to GHCR/Docker Hub/ECR). Dockerfiles that are only used for local dev or CI
are not publishing. A repo that publishes no images produces none of the three
rules below — no finding and no inconclusive note.
posture-image-scan-missing: the repo publishes images but
.github/workflows/image-scan.yml does not exist.posture-image-scan-stale: the workflow exists but its latest run is stale or
failing (stale or failed). Using gh run list --repo "$REPO" --workflow image-scan.yml --limit 5 --json databaseId,createdAt,conclusion,status:
record a finding if there is no completed successful run, if the most recent
successful run is older than 14 days, or if the latest completed run's
conclusion is failure (even when an older success is fresh). Note which of the three
applied. If the listing fails (token/permission, as in Step 3.6), record an
inconclusive posture note instead — never assert "stale" when you couldn't check.posture-image-scan-grype-pin: the workflow's env GRYPE_VERSION (read from
.github/workflows/image-scan.yml) differs from the current pin in
references/image-scan-workflow-template.md (its GRYPE_VERSION= line). Report both
versions. A workflow with no readable GRYPE_VERSION is also a finding (unpinned).package.json, bun.lock, go.mod, Cargo.toml,
requirements*.txt, Gemfile.lock, outside node_modules/, worktrees/, test fixtures);
otherwise produce neither rule below.
posture-cve-scan-missing: no .github/workflows/dependency-scan.yml and the
shared cve-scan-ci detector finds no dependency scanner in any CI workflow. Run the
detector through the read-only reader, never a second regex:
bun -e 'const [root, plugin] = process.argv.slice(1);
const {dirReader} = await import(`${plugin}/scripts/agent-readiness-scorer.ts`);
const {detectCveScanCi} = await import(`${plugin}/scripts/readiness-detectors.ts`);
console.log(detectCveScanCi(dirReader(root)))' "$SCAN_ROOT" "$CLAUDE_PLUGIN_ROOT"
Record the finding only on fail. A repo that scans dependencies another way (the detector
passes) gets no finding.posture-cve-scan-stale: the workflow exists but its latest successful run is older
than 14 days (the image-scan staleness rule), or there is no completed successful
run. Use gh run list --repo "$REPO" --workflow dependency-scan.yml --limit 5 --json databaseId,createdAt,conclusion,status.
Note which applied. If the listing fails or Step 3.7 was skipped as unreadable, record an
inconclusive posture note instead — never a confirmed finding when you couldn't check.Runs once, after Tier 1-3 have produced their raw findings and before any of them becomes a
Step 6 record. Suppressions are human-reviewed entries in .shipwright/suppressions.yml in
the scanned repo (schema: references/suppressions-schema.md). This is in addition to,
not a replacement for, the tool-native handling that already ran: .gitleaksignore
(gitleaks) and .github/zizmor.yml (Step 3.5a) are unchanged.
Build the candidate list. For each finding from grype, the image-scan artifact (Step 3.6), the dependency-scan artifact (Step 3.7) and the Tier 3
posture checks, emit one object with the suppression rule and its match-key fields
(never a line number):
| Scanner rule | Suppression rule | Match-key fields |
|---|---|---|
osv-cve | osv | cve, package |
grype-cve | grype | cve, package |
image-cve | grype | cve, package |
posture-* | posture | path |
osv-cve entries (Step 3.7) use the osv rule and cve + package
keys, so one osv suppression covers every lockfile entry for that CVE and package.
image-cve has no schema of its own; the grype rule (same Grype CVE + package match
key) is reused, so one grype entry suppresses the CVE+package in both the filesystem
scan and published images. Each deduped image-cve entry (one per CVE + package + image) is its own candidate,
so suppressing one package never hides the same CVE in another package.
Findings from rules with no suppression schema (gitleaks, zizmor, authn/authz, hardcoded-credential) are not candidates and pass through unchanged.
Filter. Write the candidates to a temp JSON array and run the shared script from the repo being scanned:
bun "$CLAUDE_PLUGIN_ROOT/scripts/suppressions.ts" --filter .shipwright/suppressions.yml candidates.json
It prints {kept, suppressed, expired}. A missing suppressions file is valid (nothing
suppressed). A non-zero exit means the file is invalid — print the error, treat it as
"no suppressions applied", and note it as a skipped-tool-style gap; never
abort the scan.
Drop suppressed findings here. Every finding in suppressed is removed before Step 6:
it gets no finding record, is never recorded (Step 8). Step 7's "open in the store but absent this run ⇒
resolved" logic covers a finding that becomes suppressed on a later run.
Track the counts for Step 9: suppressed_count = suppressed.length, and the
expired entries (rule, match key, expires). Expired entries stop suppressing, so their
findings stay in kept and surface normally.
zizmor findings reach this step only after passing the Step 3.5a suppression filter —
anything matching an accepted-risk entry in .github/zizmor.yml was already dropped and
never gets a record here.
Group the findings by rule: one record per rule per repo per ISO week. Each record is one
PatrolFinding in the task store — all finding detail lives there, never in a repo file:
{
"fingerprint": "security-{rule}-{repo-slug}-{YYYY-Www}",
"status": "open",
"detail": {
"rule": "<gitleaks-secret | osv-cve | grype-cve | image-cve | zizmor-lint | authz-missing-check | secret-weak-compare | hardcoded-credential | posture-security-md-missing | posture-image-scan-missing | posture-image-scan-stale | posture-image-scan-grype-pin | posture-cve-scan-missing | posture-cve-scan-stale | ...>",
"tier": "1 | 2 | 3",
"severity": "critical | high | medium | low",
"count": 0,
"findings": [{ "file": "<path>", "line": 0, "description": "<CVE id, secret rule, ...>" }]
}
}
The fingerprint is repo-namespaced (security-{rule}-{repo-slug}-{YYYY-Www}) exactly as
described in Step 2 — it is the collision-safe finding identifier and /security-fix reuses
it as the task id.
Load prior state from the task store (read-only; works in --dry-run too):
bun "${CLAUDE_PLUGIN_ROOT}/scripts/cron-run-recorder.ts" prior --cron "$CRON_ID" --repo "$REPO" \
--legacy-shape security-patrol-ledger
It prints {latest, findings, imported}; findings are this repo's PatrolFindings for the
cron. Classify each Step 6 record by its fingerprint:
status was resolved, or it was open and
the current detail.count is greater than the stored detail.count.open and the count has not grown. Reflected only in summary counts.open but absent from this run (a finding that became suppressed
lands here too; so does an image-cve record whose CVEs have all vanished from a later
image-scan-report, but not when Step 3.6 was skipped; an osv-cve entry seen only via the dependency-scan artifact is likewise kept when Step 3.7 was skipped, including when the repo has no dependency-scan.yml). Re-send it with status: "resolved" so the next run can detect a regression.The --legacy-shape security-patrol-ledger flag above is the one-time import (PCR-2.1). When
the store has no run for this cron+repo yet, the recorder reads the agent-local
state/security-patrol-ledger.json, keeps only entries for this repo (other repos' entries are
ignored), posts them as PatrolFindings, and deletes the file after both posts succeed — a
failed post leaves it for a retry. The old state/security-patrol-last-run.json marker is
superseded by the recorded run. This skill never reads or writes either file directly and
never creates them.
Skip this step if --dry-run was passed (dry runs record nothing). --summary alone does
not skip it.
RESULT="$(mktemp -d)/security-result.json"
Content: {"outcome": "ok", "metrics": {"new": N, "regressed": N, "unchanged": N, "resolved": N, "suppressed": N, "tools_skipped": N}, "findings": [<Step 6 records for new/regressed/unchanged, plus resolved ones>]}. Use "outcome": "no_op" when nothing
new, regressed or resolved.bun "${CLAUDE_PLUGIN_ROOT}/scripts/cron-run-recorder.ts" record --cron "$CRON_ID" --repo "$REPO" \
--commit "$(git rev-parse HEAD)" --result "$RESULT" --legacy-shape security-patrol-ledger
Findings are upserted by fingerprint, so a re-run in the same week is idempotent.
Print a summary only — no file is written. Cron runs post this to a channel where nobody can reply in the moment, so cap the final response at 3-5 lines: a status line, the counts, and a hint. The full detail stays in the store's PatrolFindings — never repeat it here.
SECURITY SCAN COMPLETE — {org/repo} ({YYYY-Www}): {N} new, {M} regressed (suppressed: {N})
Tools run: {N} / 6 incl. image-scan and dependency-scan artifacts (skipped: {list})
{If new/regressed: "Next: /security-fix --repo {org/repo} to route findings."} {If zero: "✓ No new or regressed findings."}
{If expired suppressions: "Expired suppressions: {N}."}
{If --dry-run: "Dry run — nothing recorded."} {Else: "Recorded to the task store."}
--repo is required. No fallback to the current directory or a repo list.$TOOLS_DIR /
a temp dir (gitleaks-report.json, grype-report.json,
sbom.cyclonedx.json, zizmor-report.json, the downloaded image-scan-report artifact
($TOOLS_DIR/image-scan-report/) and dependency-scan-report artifact ($TOOLS_DIR/dependency-scan-report/), never in the repo, the Step 8 result file), never committed.PatrolFinding; the
hand-off to /security-fix is the store, not a file.security-scan never creates PRs or tasks — routing findings into
task-store tasks belongs to /security-fix.tools_skipped, inconclusive posture note) and must not
resolve existing image-cve findings..github/zizmor.yml (Step 3.5a) or
.shipwright/suppressions.yml (Step 5.5) — it is dropped before Step 6. Expired entries are
not suppressions: report them in the summary and let their findings through.security-{rule}-{repo-slug}-{YYYY-Www} — never
{rule}-{YYYY-Www} — so same-week multi-repo runs never collide (the entropy-fix task-ID
collision bug).--dry-run records nothing. Everything that would be recorded is printed instead.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub app-vitals/shipwright --plugin shipwright27 skills in this plugin
/agent-readinessScore one repo against the agent-readiness catalogue (docs/readiness.md) with the deterministic scorer, post one ReadinessSnapshot and record one run. Requires --repo org/repo. No model judgment, no task creation, no repo files./canary-executionCross-cutting contract for the test-readiness pipeline. Defines how canary-eligible test code runs in two modes — `local` (boot dependencies inline, hit localhost) and `canary` (skip the boot, hit a deployed `TEST_TARGET_URL`) — via a dedicated entry point separate from the local smoke runner. Specifies eligibility rules (read-only or self-cleaning, smoke/E2E only, critical/high tier only, zero DB-dependent tests) and the deploy-gate budget (<60s wall time). Referenced by the inventory, system-design, migration, and roadmap skills.
/Other plugins' skills for the same job