feat(parsers): add Xygeni JSON parser (SAST, SCA, Secrets)#14769
Draft
lmrb-1968 wants to merge 1 commit intoDefectDojo:devfrom
Draft
feat(parsers): add Xygeni JSON parser (SAST, SCA, Secrets)#14769lmrb-1968 wants to merge 1 commit intoDefectDojo:devfrom
lmrb-1968 wants to merge 1 commit intoDefectDojo:devfrom
Conversation
Add a single first-party parser at dojo/tools/xygeni/ that handles three Xygeni JSON report kinds (SAST, SCA, Secrets) by dispatching on metadata.scanType. Mirrors the multi-scan-type pattern of rusty_hog, anchore_grype, checkmarx and sonarqube. Pre-approval: DefectDojo#14755
Member
|
At first glance it looks good, but shouldn't |
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.
Description
This PR adds a single first-party parser for Xygeni JSON reports under
dojo/tools/xygeni/. It dispatches onmetadata.scanTypeand exposes threescan types:
Xygeni SAST Scan,Xygeni SCA Scan,Xygeni Secrets Scan. Thepattern mirrors
rusty_hog,anchore_grype,checkmarx,sonarqube, andmobsf.Xygeni is a Software Supply Chain Security platform that
emits a JSON report per scanner. The full pre-approval discussion (with
field-mapping tables and example JSON per kind) is at #14755.
Opened as a draft because pre-approval is still pending — happy to wait
for maintainer feedback before any further action. The implementation is
provided here so reviewers can evaluate the concrete shape if helpful.
Test results
unittests/tools/test_xygeni_parser.pycovers:(501 SAST + 50 SCA + 61 Secrets findings)
metadata.scanTypefor a synthetic minimal reportmetadata.scanType, unsupported scan typeRun via the project's docker-compose unit-tests setup against real Postgres:
Result:
Ran 10 tests in 0.084s — OK.ruff checkis clean againstdojo/tools/xygeni/andunittests/tools/test_xygeni_parser.py.Documentation
Added at
docs/content/supported_tools/parsers/file/xygeni.md— covers allthree scan types, the common
metadataenvelope, the per-kind payload shapes,and links to the sample fixtures.
Checklist
dev.dev(new parser).Import Scansrequested — cannot self-apply as a non-collaborator.Pre-approval: #14755