Skip to content

SARIF format cannot be imported into SonarQube #6499

Closed

Description

@ahmadalfy

SonarQube expects the SARIF format to contain the rules key inside the tools object like the following:

"tool": {
        "driver": {
          "name": "SwiftLint",
          "informationUri": "https://github.com/realm/SwiftLint/blob/0.63.2/README.md",
          "rules": [
            {
              "id": "rule-id",
              "shortDescription": {
                "text": "short escription"
              },
              "helpUri": "some-url-for-the-rule",
              "properties": {
                "category": "rule-category"
              }
            }
          ]
        }
      },

The currnet output look like this:

      "tool" : {
        "driver" : {
          "informationUri" : "https://github.com/realm/SwiftLint/blob/0.63.2/README.md",
          "name" : "SwiftLint",
          "semanticVersion" : "0.63.2"
        }
      }

Importing the report gives the following error:

Failed to import a sarif run, error: Cannot invoke "java.util.Set.stream()" because the return value of "org.sonar.core.sarif.Driver.getRules()" is null

The full list of rules should exist in the report

Activity

  1. added
    bug
    on Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions