How-to guide
Send the results to other tools
Write the findings of a scan as SARIF, JSON, Markdown, or JUnit, and upload them to GitHub code scanning or the test report of your CI system.
Send the results to other tools #
| Format | Command | For |
|---|---|---|
| SARIF | tuxcarectl sca --output sarif > tuxcarectl.sarif | GitHub code scanning and other code-scanning tools. |
| JSON | tuxcarectl sca --output json > findings.json | Your own scripts. The JSON format is stable and has a schema_version. |
| Markdown | tuxcarectl sca --output markdown > findings.md | A comment on a pull request, or a job summary. |
| JUnit | tuxcarectl check --output junit > report.xml | The test report of GitLab and Jenkins. |
To upload the SARIF file to GitHub code scanning, add this step after the scan. The job needs the permission security-events: write:
- uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: tuxcarectl.sarif
From CLI version 0.1.90, the SARIF file links each alert to the portal when the run uploaded its scan to the portal. Each advisory rule links to the advisory page of the workspace (the helpUri of the rule), and the help text of the rule names the same link and the scan page. Each result has the scan page in the property securechain.scan_url. A run with no data URL or with no portal scan, for example a run whose findings do not come from the portal, writes no links.
To read the findings from a dashboard, use the REST API.
Next: Connect an AI assistant