Skip to content

feat: add 'primary' locations - #328

Merged
woodruffw merged 1 commit into
mainfrom
ww/primary
Dec 19, 2024
Merged

feat: add 'primary' locations#328
woodruffw merged 1 commit into
mainfrom
ww/primary

Conversation

@woodruffw

@woodruffw woodruffw commented Dec 19, 2024

Copy link
Copy Markdown
Member

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
@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