Skip to content

feat(report): embed repro block in JSON findings (POST_V01 Item 4)#33

Merged
bugsyhewitt merged 1 commit into
mainfrom
worker-r36-W2-possession
Jun 5, 2026
Merged

feat(report): embed repro block in JSON findings (POST_V01 Item 4)#33
bugsyhewitt merged 1 commit into
mainfrom
worker-r36-W2-possession

Conversation

@bugsyhewitt

Copy link
Copy Markdown
Owner

Summary

  • Adds model.FindingRepro struct (http, curl, differential string fields) to model.Finding as json:"repro,omitempty"
  • Populates repro in scan.go via report.BuildRepro while the in-memory Variant is still live (before it is dropped from serialization)
  • JSON reporter now includes copy-paste reproductions inline on every finding; --repro-creds controls credential redaction as with markdown/html
  • Updates docs/ROADMAP.md and POST_V01.md to mark six already-shipped v1.1 items: jwt-kid-injection, jwt-alg-confusion, jwt-jwks-spoof, jwt-hmac-crack, markdown reporter, and idor-cross-tenant

Test plan

  • go test ./... passes (all 13 packages)
  • TestJSON_FindingWithRepro_ContainsReproBlock — JSON output includes "repro" with "http", "curl", "differential" keys when Finding.Repro is set
  • TestJSON_FindingWithoutRepro_NoReproKey"repro" key absent when Finding.Repro is nil (omitempty)
  • TestJSON_ReproStable_ByteIdentical — repro-containing output is byte-identical across two renders (D26)
  • TestJSON_Repro_ValidJSON — parsed JSON has expected repro shape; second finding has nil repro

🤖 Generated with Claude Code

Add model.FindingRepro (http / curl / differential) to model.Finding
as json:"repro,omitempty". scan.go populates it from report.BuildRepro
while the in-memory Variant is live, so the JSON reporter now includes
copy-paste reproductions inline on every finding — no separate markdown
or HTML render pass required.

Also mark shipped v1.1 items in ROADMAP.md and POST_V01.md: jwt-kid-
injection, jwt-alg-confusion, jwt-jwks-spoof, jwt-hmac-crack, markdown
reporter, and idor-cross-tenant are all already live.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bugsyhewitt bugsyhewitt merged commit 953b2cb into main Jun 5, 2026
2 checks passed
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