-
-
Notifications
You must be signed in to change notification settings - Fork 696
SARIF: add partialFingerprints, tags/precision, and ensure absolute Windows paths in artifactLocation.uri #1297
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: main
Are you sure you want to change the base?
SARIF: add partialFingerprints, tags/precision, and ensure absolute Windows paths in artifactLocation.uri #1297
Conversation
Hi, I am still hoping my PR gets reviewed |
@sigmavirus24 , @ericwb , @lukehinds It adds partialFingerprints, tags/precision, preserves Windows absolute paths, and unit tests/unit/formatters/ pass. Could one of you kindly review when you have a moment? Thanks |
…indows paths in artifactLocation.uri
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
15e97ad
to
87da4ed
Compare
for more information, see https://pre-commit.ci
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.
There's a lot of particularly bad LLM slop here. I was promised they were good at writing python because of how much python was out there. I feel lied to.
@sigmavirus24, @ericwb I’ll address the points you raised (docstring/reST fixes, variable naming consistency, removing the empty except, simplifying confidence/CWE handling, and trimming unnecessary comments) and push the updates immediately I have done the corrections. I’ll be available to iterate further if anything else comes up. @gpotter2 |
…empty except; simplify CWE/precision mapping; trim comments; keep SARIF output unchanged
for more information, see https://pre-commit.ci
Updates:
Validation:
|
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.
There is still a lot wrong here.
Co-authored-by: Ian Stapleton Cordasco <[email protected]>
Co-authored-by: Ian Stapleton Cordasco <[email protected]>
Co-authored-by: Ian Stapleton Cordasco <[email protected]>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
Import modules not classes or functions
import typing as t
Co-authored-by: Ian Stapleton Cordasco <[email protected]>
for more information, see https://pre-commit.ci
Co-authored-by: Ian Stapleton Cordasco <[email protected]>
for more information, see https://pre-commit.ci
@sigmavirus24 |
This PR improves the SARIF formatter with the following changes:
partialFingerprints
(primaryLocationLineHash
) for stable deduplication across runs/refactors.tags
for better rule categorization.precision
based on Bandit’s confidence levels (HIGH/MEDIUM/LOW → high/medium/low).artifactLocation.uri
to match test expectations.original_path
property for clarity and debugging.~ All unit tests in
tests/unit/formatters/
pass.~ Functional tests are unchanged by this PR.
This should make Bandit’s SARIF output more compliant and interoperable with tools that consume SARIF logs.
Closes #646
Related to #737