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

Xray SCA scan - always show results with location on Sarif output #1021

Merged
merged 4 commits into from
Nov 8, 2023

Conversation

attiasas
Copy link
Contributor

@attiasas attiasas commented Nov 8, 2023

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

For all Xray SCA scans (audit, docker scan...) with Sarif format output:

If location can't be determined show location with default value: Package Descriptor

  • Fixes Github integration validation

Before:

{
          "ruleId": "CVE-2023-5363_debian:bookworm:openssl_3.0.11-1~deb12u1",
          "ruleIndex": 43,
          "level": "none",
          "message": {
            "text": "[CVE-2023-5363] sha256__6cd9f01fb9e511a9e611c6592d62412c0fead4b2b09dc3de7fbf6b50a8df0eed.tar"
          }
}

After:

{
          "ruleId": "CVE-2023-5363_debian:bookworm:openssl_3.0.11-1~deb12u1",
          "ruleIndex": 43,
          "level": "none",
          "message": {
            "text": "[CVE-2023-5363] sha256__6cd9f01fb9e511a9e611c6592d62412c0fead4b2b09dc3de7fbf6b50a8df0eed.tar"
          },
         "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "Package Descriptor"
                }
              }
            }
          ]
}

Copy link
Member

@yahavi yahavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Well done @attiasas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants