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 output doesn't refer to final version of schema #3916

Closed
john-d8r opened this issue Mar 28, 2023 · 1 comment · Fixed by #4378
Closed

Sarif output doesn't refer to final version of schema #3916

john-d8r opened this issue Mar 28, 2023 · 1 comment · Fixed by #4378
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@john-d8r
Copy link

john-d8r commented Mar 28, 2023

Description

When validating the sarif output generated by trivy (using https://sarifweb.azurewebsites.net/Validation) it complain about the $schema not pointing to the final version of SARIF 2.1.0 schema

SARIF1011: $schema: The '$schema' property value 'https://json.schemastore.org/sarif-2.1.0-rtm.5.json' does not refer to the final version of the SARIF 2.1.0 schema. If you are using an earlier version of the SARIF format, consider upgrading your analysis tool to produce the final version. If this file does in fact conform to the final version of the schema, upgrade the tool to populate the '$schema' property with a URL that refers to the final version of the schema.

What did you expect to happen?

Sarif output validated with no error. (i.e) $schema pointing to the final version
"$schema": "https://json.schemastore.org/sarif-2.1.0.json",

What happened instead?

Sarif output validated with one error. Due to the version the $schema points to
"$schema": "https://json.schemastore.org/sarif-2.1.0-rtm.5.json",

Output of run with -debug:

(paste your output here)

Output of trivy -v:

Version: 0.38.3
Vulnerability DB:
  Version: 2
  UpdatedAt: 2023-03-28 12:23:07.618855714 +0000 UTC
  NextUpdate: 2023-03-28 18:23:07.618855414 +0000 UTC
  DownloadedAt: 2023-03-28 12:29:12.483755586 +0000 UTC

Additional details (base image name, container registry info...):

base image name: node

Sarif report

{
  "version": "2.1.0",
  "$schema": "https://json.schemastore.org/sarif-2.1.0-rtm.5.json",
  "runs": [
    {
      "tool": {
        "driver": {
          "fullName": "Trivy Vulnerability Scanner",
          "informationUri": "https://github.com/aquasecurity/trivy",
          "name": "Trivy",
          "rules": [
            {...
@john-d8r john-d8r added the kind/bug Categorizes issue or PR as related to a bug. label Mar 28, 2023
@DmitriyLewen
Copy link
Contributor

Hello @john-d8r
Thanks for your report!

Looks like sarif-2.1.0-rtm.5.json is latest version.
I created #58 to sort out this case.

Regards, Dmitriy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants