Skip to content

    Type a page, a command such as keryn scan, or a rule id.

    Import other scanners' reports

    View as Markdown

    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.

    • 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.

    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.

    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}}}]
    }]
    }]
    }
    Terminal window
    keryn import other.sarif
    imported 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.

    The import takes the scan’s gate and output flags, so the other scanner’s findings can feed the same pipeline:

    Terminal window
    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."
    }]
    }]
    }
    Terminal window
    keryn import semgrep.json --sarif out.sarif --fail-on error
    keryn import trivy.json --parser trivy --markdown summary.md

    The SARIF contains the imported finding, and the Markdown keeps the synthetic Trivy identifier:

    Terminal window
    jq '.runs[0].results | length' out.sarif
    grep -q 'CVE-2099-0001' summary.md
    1

    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.