sonatype-nexus-community / nancy

A tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index
Apache License 2.0
562 stars 74 forks source link

Add SARIF support #239

Open markusthoemmes opened 3 years ago

markusthoemmes commented 3 years ago

cc @bhamail / @DarthHater

zendern commented 3 years ago

That would be a cool addition. Should be easy enough to add I would think as an output format.

Might be useful to use this library or maybe there is another to build that Sarif format. https://github.com/owenrumney/go-sarif

re: Actions It looks like our Github action already allows you to customize the command that gets run so if you wanted that sarif output you could and add a step to push to Github Code Analysis.

https://github.com/sonatype-nexus-community/nancy-github-action#nancycommand

Would just want to update the docs to mention how to set it up and add an example that has this in it.

- name: Upload result to GitHub Code Scanning
        uses: github/codeql-action/upload-sarif@v1
        with:
          sarif_file: snyk.sarif

If I get a chance over the next week or so I might try to get a PR rolling on it. I think it might be low hanging fruit but super high value for devs. Thanks for opening the issue @markusthoemmes