Skip to content

feat: sensitive-data and supply-chain evidence in Plan and Verify (preview) - #697

Merged
aryamthecodebreaker merged 1 commit into
mainfrom
claude/cranky-tharp-4c222a
Nov 23, 2026
Merged

aryamthecodebreaker merged 1 commit into
mainfrom
claude/cranky-tharp-4c222a

Conversation

@aryamthecodebreaker

Copy link
Copy Markdown
Owner

Closes the "showing it in Plan and Verify" remainder of two v0.10.0 ledger rows. Both surfaces are opt-in, additive, validated, and catalogued as previews. Nothing here uses the network, executes scanned code, or runs a scanner.

Ledger row: Sensitive-data flow evidence

  • fixmap plan --sensitive-data / fixmap verify --sensitive-data, plus MCP sensitiveData: true on fixmap_plan and fixmap_verify.
  • Runs the existing local fixmap-sensitive-data provider. The collector is now a synchronous collectSensitiveDataSignals, and the provider wraps it. Flows are attached when either end touches the report's ranked, impact or changed paths (Verify also includes the diff's changed paths and the recalculated impact). Same-file and direct-import flows are capped at 50, and omittedFlows counts the rest.
  • Each end records path, first matching line, category and rule ids only. Matched values never enter the report. The validator also rejects rule ids that don't match [a-z0-9-], so a tampered report can't smuggle a value through that field.
  • Verify rebuilds each changed file's pre-change lines from the unified diff (current lines minus + lines plus - lines; the rules are single-line) and reruns the classifier and import graph. Flows that are absent before the change get introducedByDiff: true and produce an advisory info finding, sensitive-data-flow-introduced, so --fail-on warning gates are unaffected. A flow created only by a newly added import is caught as well. If the diff was sampled (diff-text-truncated), the check reports introducedCheck: "unavailable-diff-truncated" and raises no finding.
  • Markdown: a "Sensitive Data" section in both Plan and Verify, which says it is lexical evidence and not a taint proof.

Ledger row: Supply-chain evidence

  • fixmap plan --supply-chain <bundle.json> and MCP supplyChain on fixmap_plan. Verify rejects --supply-chain as a plan-only option.
  • The bundle is read before any checkout, validated with the existing validateSupplyChainEvidenceBundle, and hashed over its exact bytes. Errors print the validator message and never the file contents.
  • Findings are attached when their component's manifest path is among the report's paths. I read this literally: a manifest must be ranked, an impact file, or changed, as when a plan includes a package.json edit. Governing manifests of ranked source files are not included. Each finding carries the package (name, version, purl), the matching manifest paths, advisory, fixed version, license and policy. report.supplyChain.source records tool, tool version, database version, the producer's document fingerprint, generatedAt and the bundle SHA-256. The cap is 50 findings, and omittedFindings counts the rest.
  • Markdown: a "Supply-Chain Evidence" section with the provenance and a note that the claims are shown as supplied.

Shared

  • validateFixMapReport checks both fields (isReportSensitiveData and isReportSupplyChain).
  • Feature catalog adds the previews "Sensitive-data flows" and "Supply-chain in plans".
  • isRepositoryRelativePath moved to paths.ts and inlineProse to markdown.ts, so the new modules can share them without an import cycle. reportPaths() is extracted from report-evidence.ts.
  • packages/action/dist/index.mjs was rebuilt (npm run build:action). packages/action/src is untouched.

Tests

  • Core report-sensitive-supply.test.ts: attachment and omission, with and without the flag. The whole report JSON and Markdown are checked for the absence of the fixture secrets. Verify cases: a newly introduced same-file flow, a flow from a new import, a pre-existing flow (not flagged), a truncated diff, and the flag off. Supply-chain attachment, omission and provenance are covered, as are malformed bundles and tampered fields for both report blocks.
  • CLI: flag parsing and pass-through, rejected duplicate and valued forms, verify rejecting --supply-chain, and a malformed bundle error that leaks no contents. The preview-set test is updated.
  • MCP: end-to-end plan, then a working-tree verify with both options (bundle SHA checked, new-flow finding, no secret in JSON or Markdown). Also argument validation and the updated plan/verify schema key sets.

Local runs: typecheck, lint, Core 908 passed (1 skipped), CLI 374 passed, and check:action-bundle passed. The full npm run ci was not run locally; GitHub CI is the gate.

Follow-up I noticed but left alone: --evidence is documented as repeatable but sits in SINGLE_VALUE_FLAGS, so a second --evidence is rejected.

🤖 Generated with Claude Code

…eview)

fixmap plan/verify --sensitive-data (MCP sensitiveData on fixmap_plan and
fixmap_verify) attach lexical source-to-sink flows from the local
fixmap-sensitive-data provider that touch the report's ranked, impact or
changed paths: file, line, category and rule ids only, never matched values.
Verify reconstructs each changed file's pre-change lines from the diff and
adds an advisory (info) sensitive-data-flow-introduced finding for flows the
diff added, including flows created by a new import.

fixmap plan --supply-chain <bundle.json> (MCP supplyChain) attaches findings
from a validated normalized scanner/SBOM bundle for packages declared in
manifests among the report's paths, with tool, database, document
fingerprint and bundle SHA-256 provenance.

Both are additive report fields checked by validateFixMapReport and listed
as previews in the feature catalog. isRepositoryRelativePath and inlineProse
moved to shared modules so the new validators and renderers reuse them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
fixmap Ready Ready Preview Nov 23, 2026 2:24pm UTC

@aryamthecodebreaker
aryamthecodebreaker merged commit 62b0558 into main Nov 23, 2026
7 of 8 checks passed

This branch was successfully deployed

1 active deployment
Preview — 65b8c9e6 Deployed Nov 23, 2026 by vercel[bot]
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