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

Improve SARIF path handling and severity #686

Merged
merged 3 commits into from Mar 22, 2022

Conversation

kzantow
Copy link
Contributor

@kzantow kzantow commented Mar 22, 2022

In SARIF output, which is used by GitHub to display security findings, we need to best represent the files found during directory scans so they may match files within a repository, this corrects one case and adds a number of test cases for different Grype invocations: cwd, relative, and absolute paths.

Additionally, we don't really need a lot of precision for the severity, so we now limit this to 1 decimal place.

Signed-off-by: Keith Zantow <kzantow@gmail.com>
@kzantow kzantow self-assigned this Mar 22, 2022
@kzantow kzantow added the bug Something isn't working label Mar 22, 2022
@kzantow kzantow requested a review from a team March 22, 2022 13:49
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
@kzantow kzantow changed the title Add more SARIF path handling coverage Improve SARIF path handling and severity Mar 22, 2022
Copy link
Contributor

@luhring luhring left a comment

Choose a reason for hiding this comment

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

LGTM!

@kzantow kzantow merged commit b2e66d3 into anchore:main Mar 22, 2022
@kzantow kzantow deleted the more-sarif-location-handling branch March 22, 2022 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants