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

SARIF report not compliant #5716

Closed
antoinedeschenes opened this issue May 4, 2021 · 1 comment · Fixed by #5718
Closed

SARIF report not compliant #5716

antoinedeschenes opened this issue May 4, 2021 · 1 comment · Fixed by #5718

Comments

@antoinedeschenes
Copy link

Hi,

GitHub suggests to use the Microsoft SARIF validator to check reports when there are issues. I just scanned a report file and it has compliance errors

results.sarif file:

{"version":"2.1.0","runs":[{"tool":{"driver":{"name":"Psalm","informationUri":"https:\/\/psalm.dev","version":"4.7.2@83a0325c0a95c0ab531d6b90c877068b464377b5"}},"results":[]}]}

produces

SARIF2008: : The SARIF log file does not contain a '$schema' property. Add a '$schema' property that refers to the final, OASIS standard version of the SARIF 2.1.0 schema. This enables IDEs to provide Intellisense for SARIF log files.

The $schema property is missing as should be found here:
https://github.com/microsoft/sarif-tutorials/blob/main/samples/1-Introduction/simple-example.sarif#L3

@weirdan
Copy link
Collaborator

weirdan commented May 4, 2021

The schema URL should probably be https://json.schemastore.org/sarif-2.1.0.json (and not the RTM version shown in that example).

weirdan added a commit to weirdan/psalm that referenced this issue May 4, 2021
weirdan added a commit to weirdan/psalm that referenced this issue May 4, 2021
weirdan added a commit to weirdan/psalm that referenced this issue May 5, 2021
muglug pushed a commit that referenced this issue May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants