chore(sarif): Bump go-sarif version#3074
Merged
javirln merged 1 commit intochainloop-dev:mainfrom Apr 24, 2026
Merged
Conversation
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="pkg/attestation/crafter/materials/sarif.go">
<violation number="1" location="pkg/attestation/crafter/materials/sarif.go:155">
P1: Guard `run.tool` and `run.tool.driver` before dereferencing to avoid a panic on partially populated SARIF runs.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
migmartri
requested changes
Apr 24, 2026
Member
migmartri
left a comment
There was a problem hiding this comment.
I am worried that this will become a precedent of us modifying a file before uploading it, changing digest, can't we fix the generator instead?
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
Member
Author
We definitely don't modify any incoming file, I'll revert those changes |
migmartri
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the handling of SARIF files in the attestation crafter, improving compatibility with SARIF v3, enhancing annotation extraction, and updating dependencies accordingly. It also refines test cases and adds a new SARIF test file.
Dependency updates:
github.com/owenrumney/go-sarif/v3(v3.3.0) instead of the older v1.1.1, and changed import paths insarif.goto match the new version. [1] [2] [3]github.com/xeipuuv/gojsonschema v1.2.0as an indirect dependency.SARIF file handling improvements:
Craft()for SARIF files by including the underlying error in the returned message and clarifying schema validation.injectAnnotations()to handle pointer fields and missing data safely, ensuring tool name and version are correctly extracted from SARIF v3 files.Testing improvements:
sarif_test.goto allow for expected digest and name assertions, and removed an outdated test case. [1] [2] [3]testdatafor more robust test coverage.