Skip to content

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

    CLI

    Describes Keryn 0.5.2 and keryn-rules 0.8.0. Changelog

    View as Markdown

    Generated from the CLI help. Run keryn <command> --help for the same text on your machine. Commands marked next release are on main and not in Keryn 0.5.2, the latest release.

    Command What it does
    keryn graph Throughline graph pipeline over an evidence project: attack paths, defensive breakpoints, report (local only)
    keryn diff-scan attack paths introduced or resolved between two git refs of a repository
    keryn report final report artifacts (report.md, manifest, split reports) from an existing scan output directory
    keryn evidence build or inspect the evidence bundle of a finding
    keryn validate generate or check a local-only validation plan for a finding candidate
    keryn triage apply the false-positive downgrade rules to a candidate finding
    keryn verify reproduce a finding in a hardened sandbox container: Confirmed, Refuted or Indeterminate
    keryn adjudicate run a reviewer over ledger findings, see the queue, inspect one finding per reviewer (claims, never decisions)
    keryn remediate propose fixes for ledger findings and check the code each one names is there (never writes a repository)
    keryn explore read the ledger: findings, scans, targets, judgements, fixes, retests, rulings, disclosures (JSON)
    keryn measure measure the estate: coverage, observation-to-disclosure funnel, reviewer spend, source value
    keryn retention enforce a retention window on the local profile, or erase it
    keryn analyze enrich one partner finding from a JSON file (the POST /v1/analysis engine)
    keryn dom-analysis captured DOM -> AI overread, PII exposure and prompt injection report
    keryn doctor check (and safely fix) the local Keryn environment
    keryn attest sign evidence, a Verify packet or an AI-BOM as an in-toto statement in a DSSE envelope; attest keygen
    keryn verify-attestation verify an attestation signature and that the evidence in hand is what was signed
    keryn oscal OSCAL 1.2 assessment results for a scan result (observations only, not a compliance determination)
    keryn nday-db update the known-fix (n-day) signature database from a signed release
    keryn sca-assess (next release) assess OSV records and package queries from one bounded JSON batch on stdin
    keryn sca-inventory (next release) inventory lockfile/metadata text from stdin (no files, network or state; 1 MiB cap)
    keryn sca-match (next release) match lockfile/metadata text from stdin against supplied OSV records
    keryn sca-requirements (next release) check installed npm declarations in a package-lock v2/v3 on stdin
    keryn sca-project-assets (next release) observe one recorded NuGet graph from a bounded project.assets.json on stdin
    keryn fw-policy-observe (next release) observe fixed package-firewall predicates from bounded raw job JSON on stdin
    keryn jvm-liveness (next release) physical-cell liveness of one method in JVM class or JAR bytes on stdin
    keryn scan inventory + rules -> AI-BOM, findings, policy
    keryn bom AI-BOM only (fast path); prints CycloneDX to stdout by default
    keryn sbom (next release) dependency SBOM: every locked package with purl, licence and graph, CycloneDX 1.6 or SPDX 2.3 (no rules, offline)
    keryn decide release decision (Go / Go with accepted risk / Hold) from a scan and .keryn/decisions.yml; exit 1 on Hold
    keryn decide sign a person signs a Go: appends a hash-chained record to .keryn/releases.jsonl (never from CI)
    keryn decide key (next release) your release-signing key and its entry for release.signers in the policy (never from CI)
    keryn decide migrate suppress: entries and policy waivers -> .keryn/decisions.yml (–write, –remove-legacy)
    keryn decide export open GitHub (–github) or GitLab (–gitlab) issues for the Holds, one per chain or chokepoint (–dry-run, –record)
    keryn export .keryn/decisions.yml as OpenVEX 0.2.0 or CycloneDX 1.6 VEX
    keryn policy check evaluate a policy against an existing BOM (–policy required)
    keryn policy lint validate a policy file against the policy schema
    keryn diff components/findings added/removed vs a base
    keryn bundle scan (or –from result.json) -> tamper-evident evidence bundle <out>.bundle.json (keryn-core)
    keryn verify-bundle recompute every digest in a bundle; exit 0 only when ok and publishable
    keryn rules lint check rule files (structure, and what this engine can run)
    keryn controls findings mapped to OWASP LLM/Agentic, MITRE ATLAS, NIST AI RMF, ISO 42001, EU AI Act, NIST 800-53, ISO 27001, CWE
    keryn posture what the scan pre-fills in the AI product security posture assessment
    keryn handoff hand-off report: gaps | evidence | tools | posture (one self-contained HTML file)
    keryn explain a rule’s message, severity, confidence, edge, CWE/OWASP/NIST, remediation, references (offline)
    keryn ai (next release) model-proposed triage, summary, threat model, exception drafts, ship-or-hold advice; nothing applied (recorded example without a key)
    keryn evidence-import modelscan (next release) exact-bound offline evidence import
    keryn evidence-import promptfoo (next release) exact-bound offline evidence import
    keryn evidence-import candidate (next release) exact-bound offline evidence import
    keryn revalidate inputs (next release) offline: which deployment an advisory may affect, what to retest after a change, whether a fix was verified
    keryn revalidate affectedness (next release) offline: which deployment an advisory may affect, what to retest after a change, whether a fix was verified
    keryn revalidate plan (next release) offline: which deployment an advisory may affect, what to retest after a change, whether a fix was verified
    keryn revalidate apply (next release) offline: which deployment an advisory may affect, what to retest after a change, whether a fix was verified
    keryn revalidate intervention (next release) offline: which deployment an advisory may affect, what to retest after a change, whether a fix was verified
    keryn detection replay (next release) offline Sigma single-event replay with a sealed detection-quality receipt
    keryn detection validate (next release) offline Sigma single-event replay with a sealed detection-quality receipt
    keryn docs offline docs: command help, exit codes, formats, the eight edge kinds
    keryn runtime init (next release) Keryn Runtime (IAST, RASP, request inspection): install the agent into an application, verify it, report its events
    keryn runtime check (next release) Keryn Runtime (IAST, RASP, request inspection): install the agent into an application, verify it, report its events
    keryn runtime report (next release) Keryn Runtime (IAST, RASP, request inspection): install the agent into an application, verify it, report its events
    keryn import third-party scanner report (Semgrep, Trivy, SARIF, gitleaks, ZAP, …) -> findings, outputs, gate; captured HTTP traffic (HAR, Burp items, ZAP messages) -> findings of 63 ZAP-compatible passive rules (cookies, headers, CSP, leaks), gate
    keryn import runtime (next release) decisions and request-filter matches a Keryn Runtime agent reported (refused, flagged in shadow mode) -> findings, outputs, gate
    keryn sca fix (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca malicious (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca image (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca db (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca collect (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca scan (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca import (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca inventory (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca assess (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca deno (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn sca sbom (next release) OSV-Scanner execution, SCA report intake with completion receipts, complete-package inventory, offline advisory assessment, Deno inventory, SBOM-to-files comparison
    keryn dast ownership mint (next release) mint and freshly verify a public ownership challenge
    keryn dast ownership check (next release) mint and freshly verify a public ownership challenge
    keryn dast plan (next release) incremental web checks from URLs/spec/HAR/sitemap, scoped ZAP execution, Burp/ZAP XML intake, one-GET Nuclei public profiles, offline HAR boundary checks
    keryn dast test (next release) incremental web checks from URLs/spec/HAR/sitemap, scoped ZAP execution, Burp/ZAP XML intake, one-GET Nuclei public profiles, offline HAR boundary checks
    keryn dast scan (next release) incremental web checks from URLs/spec/HAR/sitemap, scoped ZAP execution, Burp/ZAP XML intake, one-GET Nuclei public profiles, offline HAR boundary checks
    keryn dast import (next release) incremental web checks from URLs/spec/HAR/sitemap, scoped ZAP execution, Burp/ZAP XML intake, one-GET Nuclei public profiles, offline HAR boundary checks
    keryn dast nuclei (next release) incremental web checks from URLs/spec/HAR/sitemap, scoped ZAP execution, Burp/ZAP XML intake, one-GET Nuclei public profiles, offline HAR boundary checks
    keryn dast boundaries (next release) incremental web checks from URLs/spec/HAR/sitemap, scoped ZAP execution, Burp/ZAP XML intake, one-GET Nuclei public profiles, offline HAR boundary checks
    keryn api import (next release) author API security regressions from OpenAPI or HAR
    keryn api compile (next release) author API security regressions from OpenAPI or HAR
    keryn api validate (next release) author API security regressions from OpenAPI or HAR
    keryn api run (next release) author API security regressions from OpenAPI or HAR
    keryn api review (next release) author API security regressions from OpenAPI or HAR
    keryn agents inspect (next release) inspect local agent declarations and compare reviewed evidence
    keryn knowledge probe (next release) verify selected-source and assistant retrieval boundaries
    keryn knowledge compile (next release) verify selected-source and assistant retrieval boundaries
    keryn knowledge run (next release) verify selected-source and assistant retrieval boundaries
    keryn knowledge review (next release) verify selected-source and assistant retrieval boundaries
    keryn ai-test run (next release) authenticated security regressions and comparable fix evidence
    keryn ai-test validate (next release) authenticated security regressions and comparable fix evidence
    keryn ai-test capture (next release) authenticated security regressions and comparable fix evidence
    keryn ai-test verify (next release) authenticated security regressions and comparable fix evidence
    keryn ai-test packs (next release) reusable observed-behavior regression packs
    keryn ai-test init (next release) reusable observed-behavior regression packs
    keryn capabilities inspect (next release) inspect AI/MCP declarations and gate capability expansion
    keryn review (next release) verify a recorded fix, review capability changes, export a PR summary
    keryn ci (next release) source checks plus requested SCA/DAST stages, artifacts and one CI exit
    keryn ledger build (next release) one merged, deduplicated, reproducible findings ledger from ci/stage directories; compare two ledgers
    keryn ledger diff (next release) one merged, deduplicated, reproducible findings ledger from ci/stage directories; compare two ledgers
    keryn application validate (next release) check an application profile (.keryn/application.yml) and show the stages keryn ci would run for it
    keryn application show (next release) check an application profile (.keryn/application.yml) and show the stages keryn ci would run for it
    keryn aspm snapshot (next release) application posture from ledgers and scanner reports: recorded snapshots, what changed without calling absence a repair, a pipeline gate that is blocked when a stage did not run, an ordered work list with its basis
    keryn aspm compare (next release) application posture from ledgers and scanner reports: recorded snapshots, what changed without calling absence a repair, a pipeline gate that is blocked when a stage did not run, an ordered work list with its basis
    keryn aspm gate (next release) application posture from ledgers and scanner reports: recorded snapshots, what changed without calling absence a repair, a pipeline gate that is blocked when a stage did not run, an ordered work list with its basis
    keryn aspm priority (next release) application posture from ledgers and scanner reports: recorded snapshots, what changed without calling absence a repair, a pipeline gate that is blocked when a stage did not run, an ordered work list with its basis
    keryn aspm report (next release) application posture from ledgers and scanner reports: recorded snapshots, what changed without calling absence a repair, a pipeline gate that is blocked when a stage did not run, an ordered work list with its basis
    keryn authority propose runtime tool-call authority: policy from findings, decisions, tamper-evident records
    keryn authority decide runtime tool-call authority: policy from findings, decisions, tamper-evident records
    keryn authority verify runtime tool-call authority: policy from findings, decisions, tamper-evident records
    keryn authority compile (next release) runtime tool-call authority: policy from findings, decisions, tamper-evident records
    keryn authority vocabulary (next release) runtime tool-call authority: policy from findings, decisions, tamper-evident records
    keryn workflow analyze n8n / Flowise / Langflow / SimStudio / MCP / OpenAPI / CrewAI / LangChain / OpenAI Agents export -> findings, evidence, gate
    keryn workflow platforms the workflow export formats the analyzer reads
    keryn artifact analyze binary / strings triage (MCP servers, agent helpers, CLIs) and model files (pickle, safetensors, GGUF, ONNX): capabilities, secrets, prompts -> findings, reports, gate
    keryn artifact rules the artifact rule set this build runs
    keryn trust scan public trust surface scorecard of a website from a prepared input (the browser extension crawls; the CLI never fetches)
    keryn trust detectors the trust-surface detectors and what each checks
    keryn trust-graph trust graph derived from a repository scan (routes, agents, tools, providers, MCP servers, secrets): JSON for the trust canvas, or a keryn-export/1 file
    keryn forge scan (next release) Forge over compiled code: scan a jar, class directory or .NET assembly with every shipped rule (findings, SARIF, gate); facts, KSQL queries, graph export (local only)
    keryn forge capabilities (next release) Forge over compiled code: scan a jar, class directory or .NET assembly with every shipped rule (findings, SARIF, gate); facts, KSQL queries, graph export (local only)
    keryn forge analyze (next release) Forge over compiled code: scan a jar, class directory or .NET assembly with every shipped rule (findings, SARIF, gate); facts, KSQL queries, graph export (local only)
    keryn forge query (next release) Forge over compiled code: scan a jar, class directory or .NET assembly with every shipped rule (findings, SARIF, gate); facts, KSQL queries, graph export (local only)
    keryn forge dfd (next release) Forge over compiled code: scan a jar, class directory or .NET assembly with every shipped rule (findings, SARIF, gate); facts, KSQL queries, graph export (local only)
    keryn forge export (next release) Forge over compiled code: scan a jar, class directory or .NET assembly with every shipped rule (findings, SARIF, gate); facts, KSQL queries, graph export (local only)
    keryn stack analyze AI technologies a captured web page loads (1,000+ entry catalog) + DOM exposure -> AI-BOM (basis observed-in-browser), findings, policy, gate
    keryn stack catalog the AI technology catalog the page-stack analysis matches against
    keryn forensics scan AI forensics of a repository tree (repo-ai-forensics: stacks, prompt files, tool definitions, RAG, model artifacts, routes, controls, risks) -> findings, gate
    keryn forensics report the forensics engine’s JSON for a repository tree
    keryn attribution scan (next release) AI tool use and AI-assisted commits of a repository, per repo, developer and org, with time series -> findings, report, gate
    keryn attribution pr (next release) report AI attribution and evaluate policy for a GitHub pull request
    keryn attribution org (next release) several repositories’ attribution reports -> the organisation’s numbers and series
    keryn attribution rules (next release) the attribution rule catalogue: tools, signals, confidence
    keryn mcp inventory MCP tools from a tools/list response judged for risk (schema, permissions, side effects) -> findings, gate; ‘mcp servers <dir>’ lists the servers the repo’s client configs name
    keryn mcp pin pin and check tool definitions, screen manifests, list configured servers, audit, wrap or guard a server
    keryn mcp check pin and check tool definitions, screen manifests, list configured servers, audit, wrap or guard a server
    keryn mcp manifest pin and check tool definitions, screen manifests, list configured servers, audit, wrap or guard a server
    keryn mcp servers pin and check tool definitions, screen manifests, list configured servers, audit, wrap or guard a server
    keryn mcp audit pin and check tool definitions, screen manifests, list configured servers, audit, wrap or guard a server
    keryn mcp wrap (next release) pin and check tool definitions, screen manifests, list configured servers, audit, wrap or guard a server
    keryn mcp guard pin and check tool definitions, screen manifests, list configured servers, audit, wrap or guard a server
    keryn surface classify self-hosted AI infrastructure (Ollama, vLLM, LiteLLM, Flowise, n8n, Jupyter, Qdrant, MCP, …) classified from observed ports -> AI-BOM (basis observed-on-network), findings, policy, gate
    keryn surface signatures the service signatures surface classification uses
    keryn cache clear the rescan cache: results of an unchanged tree are reused; clear deletes them
    keryn cache stats the rescan cache: results of an unchanged tree are reused; clear deletes them
    keryn cache path the rescan cache: results of an unchanged tree are reused; clear deletes them
    keryn init write .keryn.yml and .keryn/policy.yml
    keryn login (next release) sign this machine in to your organization (device code); release builds need it to scan
    keryn logout (next release) forget the sign-in on this machine
    keryn whoami (next release) organization, team, account, plan, features and entitlement expiry
    keryn update (next release) check for a newer release available to your organization; reports only
    keryn licence status (next release) offline licence of a contract customer, bound to this machine, no phone-home; usage prints the local count for a true-up and sends nothing
    keryn licence request (next release) offline licence of a contract customer, bound to this machine, no phone-home; usage prints the local count for a true-up and sends nothing
    keryn licence install (next release) offline licence of a contract customer, bound to this machine, no phone-home; usage prints the local count for a true-up and sends nothing
    keryn licence usage (next release) offline licence of a contract customer, bound to this machine, no phone-home; usage prints the local count for a true-up and sends nothing
    keryn version
    keryn lsp Language Server (https://keryn.dev/docs/reference/lsp/)
    Code Meaning
    0 pass
    1 policy violations, or findings at or above --fail-on
    2 usage or configuration error
    3 coverage incomplete: rules were unsupported, partial or timed out (--allow-incomplete turns this off)
    4 internal error or timeout; Keryn never passes silently
    10 pass with warnings, only with --exit-warn

    Some commands define their own codes (for example the keryn sca actions); each command page lists the codes it uses.