Skip to content
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

Improve SARIF output #34

Open
bradlarsen opened this issue Mar 2, 2023 · 2 comments
Open

Improve SARIF output #34

bradlarsen opened this issue Mar 2, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed reporting Related to reporting of findings

Comments

@bradlarsen
Copy link
Collaborator

SARIF support was recently added (#33, #4), adding a new output format to Nosey Parker's report command. This support is preliminary, but good enough that viewers like the VSCode SARIF plugin can do something useful with the output in some cases.

However, I want Nosey Parker to do something useful in all cases. The end goal is that Nosey Parker's SARIF output is complete enough that common viewers can usefully render all findings.

Viewers of particular interest:

  • GitHub Code Analysis (so that SARIF output can be automatically shown in pull requests)
  • VSCode SARIF Viewer
  • The sarif-fmt command-line program

Rough edges and opportunities for improvement:

  1. Findings in blobs from Git repositories don't have useful location information associated with them.
  2. Nosey Parker rules don't have a stable and machine-friendly ID associated with them, just a name.
  3. Nosey Parker rules don't have a long description, severity, or precision associated with them.
  4. Currently, the VSCode SARIF Viewer's functionality to annotate findings as false positives crashes with Nosey Parker-generated output, probably due to some missing field.
  5. The location info in SARIF results is for the entire regex match rather than just the match group.
@bradlarsen bradlarsen added enhancement New feature or request reporting Related to reporting of findings labels Mar 2, 2023
@bradlarsen
Copy link
Collaborator Author

See this for requirements and suggestions related to GitHub Code Analysis SARIF support: https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning

@bradlarsen
Copy link
Collaborator Author

I asked for help in understanding how best to represent Nosey Parker's findings in SARIF: oasis-tcs/sarif-spec#564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed reporting Related to reporting of findings
Projects
None yet
Development

No branches or pull requests

1 participant