Import other scanners' reports
Put the findings of a scanner you already run through the same gate, outputs and annotations as a Keryn scan, so that one exit code and one SARIF file cover all of them. Nothing is re-scanned: Keryn reads the report.
Before you start
Section titled “Before you start”- A scanner report in a supported format, such as Semgrep JSON, Trivy JSON, a gitleaks report, ZAP XML or SARIF.
- The Keryn CLI (install), or Keryn Web for a one-off look.
1. See what it understands
Section titled “1. See what it understands”In Keryn Web, drop the report onto the page, or use Settings, Import. Keryn detects whether the file is source, a scanner report, a binary or a workflow export, and shows the findings next to any scan results.
keryn import --list | awk '$1 == "acunetix" || $1 == "anchore_engine"' acunetix irregular Acunetix Scan anchore_engine json Anchore Engine ScanThe parsers are the DefectDojo parser corpus, ported to Rust and compiled to WebAssembly, and they run locally. Each line is a parser id, the shape of the file, and the scanner’s name. Run keryn import --list without the pipe to see the full list and total for your installed CLI.
2. Import a report
Section titled “2. Import a report”Here is a small report in SARIF, written for this page: another tool found a token in agent.py.
{ "version": "2.1.0", "$schema": "https://www.schemastore.org/sarif-2.1.0.json", "runs": [{ "tool": {"driver": {"name": "othertool", "rules": [{"id": "OT-001", "shortDescription": {"text": "Hard-coded token"}}]}}, "results": [{ "ruleId": "OT-001", "level": "error", "message": {"text": "A token is committed in the source."}, "locations": [{"physicalLocation": {"artifactLocation": {"uri": "agent.py"}, "region": {"startLine": 4}}}] }] }]}keryn import other.sarifimported 1 findings from sarif (SARIF) · 1 observations · <n> ms also claimed by: api_sonarqube, checkmarx, checkov, cppcheck, crunch42, devskim, flawfinder, kubelinter, mozilla_observatory, snyk, snyk_code, sonarqube (pass --parser to use one of them)coverage: 1 observations imported from sarif (SARIF); 1 report file read; no rules executed.result: FAIL (exit 1) - 1 violation(s)/finding(s) at or above 'error'Without --parser, Keryn detects the format from the bytes, and refuses when it cannot tell (it then asks for --parser). Here it recognised SARIF; the line also claimed by names other parsers that accept SARIF-shaped files, and --parser picks one of them or pins your choice (--parser sarif). The coverage line is the honest part: one report was read, no rules executed. An import never claims a scan happened.
3. Use the same gate and outputs
Section titled “3. Use the same gate and outputs”The import takes the scan’s gate and output flags, so the other scanner’s findings can feed the same pipeline:
keryn import other.sarif --parser sarif --fail-on none --sarif - --quiet | jq -c '.runs[0].results[0] | {ruleId, level}'{"ruleId":"othertool:OT-001","level":"error"}The rule id is prefixed with the tool that produced it. --fail-on none turns the gate off for this run (exit 0); the default fails on error, exactly as for a scan. --markdown, --junit, --annotations github and the rest work the same way. No rules run during an import and no AI-BOM is produced, so --aibom is refused.
The following authored reports let you exercise the same adapters locally. Their identifiers and findings are synthetic.
{ "version": "1.0.0", "results": [{ "check_id": "fixture.rule", "path": "agent.py", "start": {"line": 4, "col": 1}, "end": {"line": 4, "col": 12}, "extra": {"message": "Synthetic scanner finding.", "severity": "WARNING"} }], "errors": []}{ "SchemaVersion": 2, "ArtifactName": "fixture", "ArtifactType": "filesystem", "Results": [{ "Target": "requirements.txt", "Class": "lang-pkgs", "Type": "pip", "Vulnerabilities": [{ "VulnerabilityID": "CVE-2099-0001", "PkgName": "openai", "InstalledVersion": "1.0.0", "FixedVersion": "1.0.1", "Severity": "HIGH", "Title": "Synthetic advisory fixture", "Description": "Not a real advisory." }] }]}keryn import semgrep.json --sarif out.sarif --fail-on errorkeryn import trivy.json --parser trivy --markdown summary.mdThe SARIF contains the imported finding, and the Markdown keeps the synthetic Trivy identifier:
jq '.runs[0].results | length' out.sarifgrep -q 'CVE-2099-0001' summary.md1What you just proved
Section titled “What you just proved”An import moves a claim made by another tool into your gate without upgrading it: the finding keeps the other tool’s name in its rule id, the coverage line says no Keryn rule ran, and the proof level is not invented. You get one place that decides pass or fail, and an honest record of where each finding came from.
- Wire the combined gate into a pipeline: CI.
- Record why a finding is accepted: suppressions.
- The formats Keryn writes: formats.