Skip to content
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

feat(#2439): populate CVSS scores in SARIF files #5014

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

schottsfired
Copy link
Collaborator

Addresses #2439.

Adds security-severity to open source and container SARIF output.

@schottsfired schottsfired requested a review from a team as a code owner January 19, 2024 21:33
Copy link
Contributor

@cmars cmars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a request for code comments

src/lib/formatters/open-source-sarif-output.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@cmars cmars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs further discussion with @snyk/cli

@ipanagiotidis
Copy link

ipanagiotidis commented Feb 14, 2024

Hello, what is the status of this PR? We are using both Snyk and Trivy for scans in GIthub Actions and pushing them to Security Dashboard.

The problem with Snyk is that is doesn't report security-severity. This means that all reports by Snyk get a warning or note severity instead of medium or low, which hides them in later pages of github advanced security.

Example: Snyk and Trivy report the same vulnerability but Trivy reports it as Low severity and Snyk as Medium severity. In Github Security Dashboard, Trivy will get correct severity of Low, but Snyk gets a wrong severity of "warning" instead of "medium", and it is placed below the severity of Trivy, thus making us think the severity is Low or below.

@schottsfired
Copy link
Collaborator Author

Hi @ipanagiotidis, apologies for the delay, I've been AFK for a few weeks due to a knee surgery and just returned today. I intend to address the comments in this PR, then move the code to a new branch to prepare for merge. Hang tight! 🙏

@schottsfired schottsfired force-pushed the feat/security-severity branch 4 times, most recently from 61f6aec to 1dff3a8 Compare February 23, 2024 16:19
@PeterSchafer PeterSchafer enabled auto-merge (squash) February 23, 2024 16:42
auto-merge was automatically disabled February 23, 2024 17:15

Pull request was closed

@PeterSchafer PeterSchafer reopened this Feb 23, 2024
@schottsfired schottsfired force-pushed the feat/security-severity branch from 1dff3a8 to 8a2f0c7 Compare February 26, 2024 13:49
@schottsfired schottsfired force-pushed the feat/security-severity branch 3 times, most recently from 01bbcaf to 39cd4a3 Compare March 1, 2024 16:37
@schottsfired schottsfired force-pushed the feat/security-severity branch from 39cd4a3 to 13da263 Compare March 4, 2024 13:33
@schottsfired schottsfired merged commit 8b271cd into snyk:main Mar 4, 2024
18 checks passed
@schottsfired schottsfired deleted the feat/security-severity branch March 4, 2024 14:35
@pgrabowski
Copy link

pgrabowski commented Mar 5, 2024

Unfortunately this broke import of Sarif files to GitHub as it expects quoted string for security-severity as in doc https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#reportingdescriptor-object

@schottsfired
Copy link
Collaborator Author

Darn! Sorry about that @pgrabowski - I overlooked "A string representing a score" 🤦‍♂️

Thanks so much @thisislawatts for the quick fix 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants