Fix: Don't omit 'run' if empty and fix omitted 'kind' and 'level' attributes in result#106
Merged
owenrumney merged 2 commits intoowenrumney:mainfrom Aug 27, 2025
Conversation
owenrumney
approved these changes
Aug 27, 2025
Owner
owenrumney
left a comment
There was a problem hiding this comment.
THanks @attiasas - this makes sense. I need to do a review of other places where the default is set by go-sarif but may not be set in other tools.
I'll merge this and do a new release in the meantime, thanks
owenrumney
approved these changes
Aug 27, 2025
This was referenced Aug 27, 2025
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.
Following:
Causing a lot of issues, if we are trying to unmarshal a report generated not by this tool or library (for example component written in other languages). making changes and then marshaling it.
We should not omit empty
Runs:if you try to upload to Github
also mentioned in spec that is required:
'level' and 'kind' attributes can be calculated if omitted based on the spec:
If we are loading a report with those missing attributes and marshal again, we are not even getting the default values and only "" (since not omitted).
I'm suggesting those values should be omitted.
Githubcan also proccess them if omitted.