Skip to content

feat(report): add json findings report with -json#313

Open
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:feat/json-report
Open

feat(report): add json findings report with -json#313
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:feat/json-report

Conversation

@TBX3D

@TBX3D TBX3D commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

adds a -json <path> flag that writes the run's normalized findings as a json array, one object per finding with its target, module, severity, key, title and evidence. sarif and markdown were the only structured exports and both drop the per-item detail the finding model already carries.

detection confidence is threaded onto the finding model so framework detections report their score; it rides into the json report and is omitted for scanners that carry none.

the -silent line format and the diff snapshot on-disk shape stay unchanged: the report uses a dedicated json view rather than marshalling the finding struct directly.

verified end to end by running a scan against a local server with -json out.json and parsing the result, plus unit tests for the json shape, omitted-zero-confidence, and the confidence threading.

sarif and markdown were the only structured exports and both drop the
per-item detail the normalized finding model already holds. add a -json
flag that writes the run's findings as a json array, one object per
finding with its target, module, severity, key, title and evidence.

carry detection confidence onto the finding model too so framework
detections report their score. it rides into the json report and is
omitted for scanners that carry none. the -silent line format and the
snapshot on-disk shape stay unchanged, since the report uses a dedicated
json view rather than marshalling the finding struct directly.
@TBX3D TBX3D requested a review from vmfunc as a code owner July 3, 2026 22:38
@github-actions github-actions Bot added size/m <200 lines changed tests test changes config configuration changes labels Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

pr summary

6 files changed (+171 -12)

category files
go source 6
tests 2

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 66.66667% with 11 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@7ea1cd2). Learn more about missing BASE report.

Files with missing lines Patch % Lines
sif.go 0.00% 11 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #313   +/-   ##
=======================================
  Coverage        ?   54.80%           
=======================================
  Files           ?       82           
  Lines           ?     6901           
  Branches        ?        0           
=======================================
  Hits            ?     3782           
  Misses          ?     2851           
  Partials        ?      268           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config configuration changes size/m <200 lines changed tests test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants