Skip to content

Expand --report JSON into a compliance audit sidecar - #83

Merged
ababic merged 2 commits into
mainfrom
cursor/audit-report-sidecar-87aa
Aug 14, 2026
Merged

ababic merged 2 commits into
mainfrom
cursor/audit-report-sidecar-87aa

Conversation

@ababic

@ababic ababic commented Aug 14, 2026 •

Copy link
Copy Markdown
Owner

Implements the narrower scope of #13: treat dump seals as provenance on the SQL artifact, and expand --report into the compliance sidecar (not a second copy of the policy fingerprint).

--report audit sidecar

When --report is set, the JSON file records:

  • dumpling_version
  • run_id / started_at (instance metadata; will not match on re-runs)
  • config_source + config_sha256 (SHA-256 of the loaded config file bytes)
  • Streaming input_sha256 / output_sha256 of the SQL streams Dumpling actually read/wrote (output_sha256 omitted in --check)
  • seal_sha256 — the same digest as dump-seal sha256= (cross-link report ↔ dump)
  • flags for gates (check, strict_coverage, scan_output, fail_on_findings, no_seal, …)
  • outcomes (strict_coverage_passed, output_scan_passed when those gates ran, trusted_passthrough)

I/O hashing is enabled only when --report is requested.

--no-seal

Skip writing the -- dumpling-seal: SQL comment (useful for stdin/stdout pipelines). Incoming seals are still recognized. --report still records seal_sha256.

cat dump.sql | dumpling --no-seal --report report.json > sanitized.sql

Docs

Testing

  • Unit tests for streaming SHA-256 wrappers and report serialization
  • CLI integration: two seeded runs share fingerprint/checksum fields and differ on run_id; --check omits output_sha256; --no-seal omits the SQL comment but keeps seal_sha256
  • --help contains Examples, --no-seal, and --report
  • cargo fmt --all -- --check, cargo clippy --all-targets --all-features, cargo test --all-targets --all-features (172 tests)

Closes #13

Open in Web Open in Cursor 

Record Dumpling version, run id/timestamp, config path + checksum,
streaming I/O SHA-256, dump-seal digest, gate flags, and coverage/scan
outcomes in the JSON --report so reviewers do not reconstruct chain-of-
custody from CI logs. Instance fields (run_id, started_at) differ across
re-runs; seal_sha256 matches the dump-seal sha256= field.

Co-authored-by: andy <andy@wearecrew.com>
@ababic
ababic marked this pull request as ready for review August 14, 2026 16:19
Skip the dump-seal SQL comment for stdin/stdout pipelines while still
recording seal_sha256 in --report. Document both flags in --help
Examples, the configuration guide, README, and CI audit-evidence docs.

Co-authored-by: andy <andy@wearecrew.com>
@ababic
ababic enabled auto-merge (squash) August 14, 2026 16:25
@ababic
ababic merged commit 499b112 into main Aug 14, 2026
10 checks passed
@ababic
ababic deleted the cursor/audit-report-sidecar-87aa branch August 14, 2026 16:26
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.

[MEDIUM] Expand run report into compliance-ready audit artifact

2 participants