feat(report): add json findings report with -json#313
Open
TBX3D wants to merge 1 commit into
Open
Conversation
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.
pr summary6 files changed (+171 -12)
|
|
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
-silentline 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.jsonand parsing the result, plus unit tests for the json shape, omitted-zero-confidence, and the confidence threading.