Skip to content

Add mcp-review-toolbox: pinned scanner image, action, and CI - #4

Merged
garymike merged 1 commit into
mainfrom
feat/mcp-review-toolbox
Jul 3, 2026
Merged

garymike merged 1 commit into
mainfrom
feat/mcp-review-toolbox

Conversation

@garymike

@garymike garymike commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Adds mcp-review-toolbox — a pinned, cosign-signed container image bundling the static security scanners used to review MCP servers — plus a composite Action and CI. Consolidates into this repo per the "one security-automation home" approach.

What's here

  • toolbox/Dockerfile + tools.lock — pinned image: gitleaks 8.30.1, trufflehog 3.95.8, osv-scanner 2.4.0, syft 1.46.0, pip-audit 2.10.1, snyk-agent-scan 0.5.12. Base image digest-pinned; Go tools verified against release-published checksums; Python tools exact-pinned PyPI wheels.
  • actions/mcp-review-toolbox/action.yml — composite action wrapping the image (inputs: path, scanners, fail-on-findings, sbom-output).
  • .github/workflows/build-toolbox.yml — build + SBOM + provenance (mode=max) + cosign keyless sign + push to GHCR; weekly and on change; reports pinned-tool drift.
  • .github/workflows/dogfood-scan.yml — builds the toolbox from source and runs it against this repo on push/PR (also validates the Dockerfile).
  • scripts/check-tool-updates.sh, .gitattributes, README + CHANGELOG (0.2.0).

Design

  • Static analysis only. Dynamic analysis (running an untrusted server, proxy interception) stays in the caller's isolated environment — never centralized, so there's no hosted scan service to abuse.
  • Runs on the consumer's side (image/action).
  • The mcp-security-review skill stays decoupled — it points to this image as an optional fast path, never a dependency.

Notes / follow-ups

  • mcp-scan was renamed to snyk-agent-scan on PyPI (Invariant Labs → Snyk); pinned to the successor at the same 0.5.12 line.
  • Hardening TODO (in toolbox/README.md): bake out-of-band binary SHA-256 pins (currently verified against each release's own checksums file).
  • The dogfood workflow builds the image on this PR, so CI here is the real end-to-end validation of the Dockerfile.

toolbox/ builds a pinned, cosign-signed container image bundling the static
security scanners used to review MCP servers (gitleaks, trufflehog, osv-scanner,
syft, pip-audit, snyk-agent-scan). Base image digest-pinned; Go tools verified
against release-published checksums; Python tools exact-pinned to PyPI wheels.

- actions/mcp-review-toolbox: composite action wrapping the image for CI
- build-toolbox.yml: build + SBOM + provenance + cosign keyless sign + GHCR push
- dogfood-scan.yml: build the toolbox from source and scan this repo
- scripts/check-tool-updates.sh: pinned-vs-latest tool drift check
- README and CHANGELOG updated (0.2.0)

Static analysis only; dynamic analysis stays in the caller's isolated environment.
@garymike
garymike force-pushed the feat/mcp-review-toolbox branch from 1f17f2a to af1dfc4 Compare July 3, 2026 17:32
@garymike
garymike merged commit fbd11e5 into main Jul 3, 2026
1 check passed
@garymike
garymike deleted the feat/mcp-review-toolbox branch July 3, 2026 18:47
garymike added a commit that referenced this pull request Jul 13, 2026
…llSpector v2.3+ reports this surface) (#35)

SkillSpector v2.3+ reports the developer-execution payload but exits 0 (no fail-on); the honest claim is enforce-vs-advise. gate-proof.sh #4 fixed to assert behavior not exit code; README/walkthrough/fixtures/Dockerfile reframed. CHANGELOG 1.3.1.
garymike added a commit that referenced this pull request Sep 8, 2026
The docs said SkillSpector "has no fail-on mode" and "exits 0 regardless".
Both are false, and had been since at least v2.3. It gates on exit code:
exit 1 above a risk_score of 50.

Measured against our own fixtures, on the pinned v2.3.11 and on v2.5.0
(identical results):

  gecko-demo       reviewer.test.ts    typescript / Executable: Yes   73/100  exit 1
  gecko-hook-demo  .husky/pre-commit   other      / Executable: No    28/100  exit 0
  benign-skill     util.test.ts        typescript / Executable: Yes    0/100  exit 0

So SkillSpector blocks half this surface. It finds the payload in both
carriers (PE3 credential access at 90% confidence in the hook too), but
classifies a git hook as non-executable, so the score stays under its own
threshold. The differentiator is carrier coverage, not enforcement versus
advice, and it is narrower than what we published.

Reframed accordingly in the README, walkthrough, threat model, references,
threat profile, both fixtures, the Dockerfile and the gate header. Added a
dated correction under the 1.3.1 changelog entry rather than editing the
record.

gate-proof.sh #4 now pins both halves: SkillSpector must block gecko-demo
and clear gecko-hook-demo. The old one-sided assertion could not have
caught this. Verified passing against both images.

Co-authored-by: Claude Opus 5 <[email protected]>
garymike added a commit that referenced this pull request Oct 19, 2026
Eight releases behind, because the drift check exempted it. Bumping it
changes measured behaviour, so the pin, the proof and the docs move
together.

Re-measured against our own fixtures (files forced to git modes; podman's
Windows mount presents 777 and v2.11+ reads mode & 0o111, which inflates
every score):

  gecko-demo             64/100  exit 1  BLOCKS
  gecko-hook-demo        76/100  exit 1  BLOCKS   (was 28/100 exit 0)
  config-injection-demo 100/100  exit 1  BLOCKS
  sibling-config-demo    51/100  exit 1  BLOCKS   (was 28/100 exit 0)
  memory-poisoning-demo   0/100  exit 0  SAFE

So four of the five carriers the gate was built for are now blocked
upstream too. The .husky/ gap closed in v2.11, which added a shebang/mode
fallback to the executable classification. Said plainly in the docs rather
than reworded.

One carrier is left. A test file that appends to MEMORY.md scores 0/100
SAFE, "no security issues detected", at Coverage 100.0% with the file typed
Executable: Yes. Holding the mechanism fixed and varying the payload: 0/100
inert, 35/100 with a literal injection string, against 27/100 for that same
string as inert SKILL.md prose with no write at all. The write is worth ~8
points of prose matching and nothing blocks.

gate-proof.sh #4 used to hard-assert that SkillSpector clears the git-hook
carrier, so this bump would have turned the dogfood build red. It now
hard-asserts only the memory-write carrier and prints the live score and
verdict for all five. sibling-config-demo clears the threshold of 50 by one
point, so asserting it would go red on any upstream rescoring.

Also: the drift check is a real gate for skillspector now. It was advisory
because upstream "publishes no releases" and a HEAD-tracking pin would
drift on every push. Upstream tags monthly since v2.10.0, so that premise
expired and the exemption is what let it fall eight behind. Kept out of
--emit-drift on purpose: apply-tool-bumps.py would rewrite tools.lock and
leave SKILLSPECTOR_REF alone, since the ARG is a SHA not <TOOL>_VERSION.
Added a lock-vs-ARG cross-check and verified it fires on a simulated
half-bump.

Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant