Json report from cx cli is same as in cx UI (AST-94779) #1142
+632
−8
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.
I made code changes for new JSON report format by using same approach as PDF.
Command :
For new json report from results show and scan create command.
--report-json-options (Default: All Sections)
Specify the sections that will be included in the jsonReport format report.
This flag can only be used when --report-format is set as jsonReport.
Available sections are: Sast, Sca, Iac-Security, ScanSummary, ExecutiveSummary, and ScanResults.
ScanResults includes results for all scanners (IaC-Security, Sast and Sca).
cx results show --report-format jsonReport --scan-id <scan_id>
cx scan create --project-name <Project_Name> -s <Repo_URL> --branch <branch_name> --report-format jsonReport --report-json-email <email_id> --report-json-options <report_options>