-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Replace Sarif JSON structs with owenrumney/go-sarif/sarif #460
base: master
Are you sure you want to change the base?
Conversation
79ce4ed
to
7934df8
Compare
Looks like the code doesn't compile anymore, I'm guessing that we need to make some alterations to our
|
Yes. I'll have a look during the weekend to fix it. I've been a bit occupied the last few days to fix everything, and should have waited to open the PR. |
Ah, ok, no worries! :-D |
I have something working locally 🎉 https://sarifweb.azurewebsites.net/Validation complains that the output doesn't contain the https://gist.github.com/atombrella/8371135f661e48b465d666a01801a31d is the generated output. I used ./kube-score score --output-format=sarif score/testdata/pod-probes-all-missing.yaml > errors.sarif Looking at this, it'd be nice to include some tests for the generated output, but perhaps it's a bit out of scope for this PR. It also looks a bit funky with the line numbers that appear to be always 1. |
sarif.NewSimpleArtifactLocation("file://" + v.FileLocation.Name), | ||
).WithRegion( | ||
sarif.NewSimpleRegion( | ||
v.FileLocation.Line, |
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.
These appear to be 1 regardless of the test file I try with.
455eb5e
to
0dcbaf3
Compare
@zegl Do you have time to give some feedback? There's an unanswered question for Regarding bors, I think it'd be nice to add |
RELNOTE: Replace Sarif JSON structs with owenrumney/go-sarif/sarif
This addresses #447 It doesn't seem to require more than simply replacing the import, and deleting the go file with the structs. The library in favor contains a more elaborate definition of the structs for the Sarif standard.
Note that I haven't checked the code coverage for the
--output-format sarif
flag.