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

Adding output handler for SARIF JSON format #1727

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alfespa17
Copy link

This PR will allow to generate the output using SARIF JSON format when using the following command

node index.js --cloud aws --config ./config.js --sarif=output.sarif.json --console=none --plugin s3Encryption

Basically it just adding a new parameter "sarif=filename"

The output handle will generate the following format:

{
  "version": "2.1.0",
  "$schema": "http://json.schemastore.org/sarif-2.1.0",
  "runs": [
    {
      "tool": {
        "driver": {
          "name": "cloudsploit",
          "version": "3.1.0",
          "informationUri": "https://github.com/aquasecurity/cloudsploit"
        }
      },
      "results": [
        {
          "level": "error",
          "message": {
            "text": "No bucket policy found; encryption not enforced"
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "arn:aws:s3:::sfqdwr"
                }
              }
            }
          ],
          "ruleId": "S3-S3ENCRYPTION"
        }
      ]
    }
  ]
}

This is a valid SARIF file, check here

Fix #1726

@CLAassistant
Copy link

CLAassistant commented Sep 29, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

SARIF output handler
2 participants