# Workbench commands

Describes Keryn 0.5.2 and keryn-rules 0.8.0.

> Commands keryn runs in keryn-native, which the CLI archives ship beside keryn.

Source: https://keryn.dev/docs/reference/cli/workbench/

These commands run in `keryn-native`, the Rust binary that the CLI archives ship beside `keryn`. Their flags and exit codes are its own.

## keryn graph

Throughline graph pipeline over an evidence project: attack paths, defensive breakpoints, report (local only).

```text
Usage: keryn graph [options]
  Throughline graph pipeline over an evidence project: attack paths, defensive breakpoints, report (local only)
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn graph --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn diff-scan

Attack paths introduced or resolved between two git refs of a repository.

```text
Usage: keryn diff-scan [options]
  attack paths introduced or resolved between two git refs of a repository
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn diff-scan --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn report

Final report artifacts (report.md, manifest, split reports) from an existing scan output directory.

```text
Usage: keryn report [options]
  final report artifacts (report.md, manifest, split reports) from an existing scan output directory
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn report --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn evidence

Build or inspect the evidence bundle of a finding.

```text
Usage: keryn evidence [options]
  build or inspect the evidence bundle of a finding
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn evidence --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn validate

Generate or check a local-only validation plan for a finding candidate.

```text
Usage: keryn validate [options]
  generate or check a local-only validation plan for a finding candidate
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn validate --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn triage

Apply the false-positive downgrade rules to a candidate finding.

```text
Usage: keryn triage [options]
  apply the false-positive downgrade rules to a candidate finding
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn triage --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn verify

Reproduce a finding in a hardened sandbox container: Confirmed, Refuted or Indeterminate.

```text
Usage: keryn verify [options]
  reproduce a finding in a hardened sandbox container: Confirmed, Refuted or Indeterminate
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn verify --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn adjudicate

Run a reviewer over ledger findings, see the queue, inspect one finding per reviewer (claims, never decisions).

```text
Usage: keryn adjudicate [options]
  run a reviewer over ledger findings, see the queue, inspect one finding per reviewer (claims, never decisions)
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn adjudicate --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn remediate

Propose fixes for ledger findings and check the code each one names is there (never writes a repository).

```text
Usage: keryn remediate [options]
  propose fixes for ledger findings and check the code each one names is there (never writes a repository)
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn remediate --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn explore

Read the ledger: findings, scans, targets, judgements, fixes, retests, rulings, disclosures (JSON).

```text
Usage: keryn explore [options]
  read the ledger: findings, scans, targets, judgements, fixes, retests, rulings, disclosures (JSON)
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn explore --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn measure

Measure the estate: coverage, observation-to-disclosure funnel, reviewer spend, source value.

```text
Usage: keryn measure [options]
  measure the estate: coverage, observation-to-disclosure funnel, reviewer spend, source value
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn measure --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn retention

Enforce a retention window on the local profile, or erase it.

```text
Usage: keryn retention [options]
  enforce a retention window on the local profile, or erase it
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn retention --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn analyze

Enrich one partner finding from a JSON file (the POST /v1/analysis engine).

```text
Usage: keryn analyze [options]
  enrich one partner finding from a JSON file (the POST /v1/analysis engine)
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn analyze --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn dom-analysis

Captured DOM -> AI overread, PII exposure and prompt injection report.

```text
Usage: keryn dom-analysis [options]
  captured DOM -> AI overread, PII exposure and prompt injection report
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn dom-analysis --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn doctor

Check (and safely fix) the local Keryn environment.

```text
Usage: keryn doctor [options]
  check (and safely fix) the local Keryn environment
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn doctor --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn attest

Sign evidence, a Verify packet or an AI-BOM as an in-toto statement in a DSSE envelope; attest keygen.

```text
Usage: keryn attest [options]
  sign evidence, a Verify packet or an AI-BOM as an in-toto statement in a DSSE envelope; attest keygen
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn attest --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn verify-attestation

Verify an attestation signature and that the evidence in hand is what was signed.

```text
Usage: keryn verify-attestation [options]
  verify an attestation signature and that the evidence in hand is what was signed
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn verify-attestation --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn oscal

OSCAL 1.2 assessment results for a scan result (observations only, not a compliance determination).

```text
Usage: keryn oscal [options]
  OSCAL 1.2 assessment results for a scan result (observations only, not a compliance determination)
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn oscal --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn nday-db

Update the known-fix (n-day) signature database from a signed release.

```text
Usage: keryn nday-db [options]
  update the known-fix (n-day) signature database from a signed release
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn nday-db --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn sca-assess

> **Caution: Next release: keryn sca-assess**
> On main; not in Keryn 0.5.2, the latest release.

Assess OSV records and package queries from one bounded JSON batch on stdin.

```text
Usage: keryn sca-assess [options]
  assess OSV records and package queries from one bounded JSON batch on stdin
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn sca-assess --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn sca-inventory

> **Caution: Next release: keryn sca-inventory**
> On main; not in Keryn 0.5.2, the latest release.

Inventory lockfile/metadata text from stdin (no files, network or state; 1 MiB cap).

```text
Usage: keryn sca-inventory [options]
  inventory lockfile/metadata text from stdin (no files, network or state; 1 MiB cap)
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn sca-inventory --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn sca-match

> **Caution: Next release: keryn sca-match**
> On main; not in Keryn 0.5.2, the latest release.

Match lockfile/metadata text from stdin against supplied OSV records.

```text
Usage: keryn sca-match [options]
  match lockfile/metadata text from stdin against supplied OSV records
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn sca-match --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn sca-requirements

> **Caution: Next release: keryn sca-requirements**
> On main; not in Keryn 0.5.2, the latest release.

Check installed npm declarations in a package-lock v2/v3 on stdin.

```text
Usage: keryn sca-requirements [options]
  check installed npm declarations in a package-lock v2/v3 on stdin
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn sca-requirements --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn sca-project-assets

> **Caution: Next release: keryn sca-project-assets**
> On main; not in Keryn 0.5.2, the latest release.

Observe one recorded NuGet graph from a bounded project.assets.json on stdin.

```text
Usage: keryn sca-project-assets [options]
  observe one recorded NuGet graph from a bounded project.assets.json on stdin
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn sca-project-assets --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn fw-policy-observe

> **Caution: Next release: keryn fw-policy-observe**
> On main; not in Keryn 0.5.2, the latest release.

Observe fixed package-firewall predicates from bounded raw job JSON on stdin.

```text
Usage: keryn fw-policy-observe [options]
  observe fixed package-firewall predicates from bounded raw job JSON on stdin
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn fw-policy-observe --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |

## keryn jvm-liveness

> **Caution: Next release: keryn jvm-liveness**
> On main; not in Keryn 0.5.2, the latest release.

Physical-cell liveness of one method in JVM class or JAR bytes on stdin.

```text
Usage: keryn jvm-liveness [options]
  physical-cell liveness of one method in JVM class or JAR bytes on stdin
  Runs in keryn-native, which was not found on PATH or next to keryn (it ships beside keryn in the keryn-<version>-<platform> archives; or build it: cargo build --release -p keryn-cli --bin keryn-native; or set KERYN_NATIVE=<path>).
```

### Examples

```sh
# Arguments and flags, from the keryn-native binary that runs this command.
keryn jvm-liveness --help
```

### Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error |
| 4 | internal error |
