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

GH1017 providing erroneous advice #2821

Open
3flex opened this issue Sep 28, 2024 · 0 comments
Open

GH1017 providing erroneous advice #2821

3flex opened this issue Sep 28, 2024 · 0 comments

Comments

@3flex
Copy link

3flex commented Sep 28, 2024

Using the online validator at https://sarifweb.azurewebsites.net/Validation (and apologies if this repo isn't being used in the backend of that tool, but I can't find anything else in Microsoft's GitHub org) I see GH1017 reported for the example below.

The report in the online validator says:

Provide the 'region' property, along with the appropriate region properties. This property is required by the GitHub Advanced Security service. Provide the 'artifactLocation' property. This property is required by the GitHub Advanced Security service.

However, region and artifactLocation are both provided as shown, so this should not be reported for this sample, unless there's something I've missed?

Possibly related to #2822

{
  "$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json",
  "version": "2.1.0",
  "runs": [
    {
      "results": [
        {
          "level": "error",
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "TestFile.kt",
                  "uriBaseId": "%SRCROOT%"
                },
                "region": {
                  "endColumn": 3,
                  "endLine": 2,
                  "startColumn": 1,
                  "startLine": 1
                }
              }
            }
          ],
          "message": {
            "text": "TestMessage"
          },
          "ruleId": "detekt.RuleSet1.TestSmellA/id"
        },
        {
          "level": "warning",
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "TestFile.kt",
                  "uriBaseId": "%SRCROOT%"
                },
                "region": {
                  "endColumn": 5,
                  "endLine": 3,
                  "startColumn": 5,
                  "startLine": 3
                }
              }
            }
          ],
          "message": {
            "text": "TestMessage"
          },
          "ruleId": "detekt.RuleSet2.TestSmellB/id"
        },
        {
          "level": "note",
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "TestFile.kt",
                  "uriBaseId": "%SRCROOT%"
                },
                "region": {
                  "endColumn": 1,
                  "endLine": 3,
                  "startColumn": 1,
                  "startLine": 2
                }
              }
            }
          ],
          "message": {
            "text": "TestMessage"
          },
          "ruleId": "detekt.RuleSet2.TestSmellC/id"
        }
      ],
      "tool": {
        "driver": {
          "downloadUri": "https://github.com/detekt/detekt/releases/download/v1.16.0/detekt",
          "fullName": "detekt",
          "guid": "022ca8c2-f6a2-4c95-b107-bb72c43263f3",
          "informationUri": "https://detekt.dev",
          "language": "en",
          "name": "detekt",
          "organization": "detekt",
          "rules": [
            {
              "defaultConfiguration": {
                "level": "error"
              },
              "helpUri": "https://detekt.dev/test.html#testrule",
              "id": "detekt.test.TestRule",
              "name": "TestRule",
              "shortDescription": {
                "text": ""
              }
            }
          ],
          "semanticVersion": "1.16.0",
          "version": "1.16.0"
        }
      }
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant