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: add 'primary' locations #328

Merged
merged 1 commit into from
Dec 19, 2024
Merged

feat: add 'primary' locations #328

merged 1 commit into from
Dec 19, 2024

Conversation

woodruffw
Copy link
Owner

@woodruffw woodruffw commented Dec 19, 2024

This was pointed out by @fcasal: the current model assumes that all locations are equal, while SARIF distinguishes between "primary" locations (i.e. those in locations) and "secondary" locations (i.e. those in relatedLocations). This is especially relevant for SARIF presentation tools like GH itself, which assume that locations only contains a single member.

This tweaks our models and updates all audits to emit a "primary" location for the most salient part of each finding. The salient part of each finding is subjective.

This should improve the presentation quality for our SARIF outputs. One downside to this approach is that every audit needs to explicitly annotate a primary location.

Fixes #66.

Signed-off-by: William Woodruff <william@yossarian.net>
@woodruffw woodruffw added the enhancement New feature or request label Dec 19, 2024
@woodruffw woodruffw self-assigned this Dec 19, 2024
@woodruffw woodruffw merged commit f2f787f into main Dec 19, 2024
5 checks passed
@woodruffw woodruffw deleted the ww/primary branch December 19, 2024 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SARIF files are missing detailed finding information
1 participant