-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Split Github Vulnerability Scan into separate SCA & SAST parsers #12773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
@Maffooch All linting errors should be fixed now, thanks for bearing with. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment posted above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two nits about import placement, but otherwise looks great; approving because they're not blockers imho.
Responded |
2ffb18d
to
82ed3f8
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
…django-DefectDojo into github-vuln-parser-improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
Description
Hello! The current parser implementation for GitHub code scanning results is baked into the "Github Vulnerability Scan" scan type, which is a parser originally meant to be used for GitHub SCA (Dependabot) vulnerabilities. Since these two scan types are exceptionally different, issues can arise especially around the fields used for deduplication in the hash code. This PR splits out GitHub code scanning into its own
GithubSASTParser
, with a scan-type string called ""Github SAST Scan." I have included documentation, unit tests, and a new list of fields for hash code deduplication.I also included several improvements for the original Github Vulnerability Scan parser. These improvements include:
cvssSeverities
which will replace thecvss
field in GitHub's graphql response in October, 2025.dependabotUpdate
field to the finding descriptionepss
percentage and percentile tofinding.epss_score
andfinding.epss_percentile
finding fieldsfinding.url
to GitHub Dependabot alert hyperlink for conveniencefinding.cve
andfinding.vuln_id_from_tool
fields before falling back tounsaved_vulnerability_ids
)finding.component_version
was only being set when thevulnerableRequirements
str started with=
.get()
to access fieldsBackward compatibility: existing users of the “Github Vulnerability Scan” scan type (driven by GithubVulnerabilityParser) for SCA imports will see no change. If you’d been using it to ingest SAST/code-scanning JSON, you’ll need to switch your import to the new “Github SAST Scan” scan type (driven by GithubSASTParser).
Ref links: