CLI Command Reference

Audience: DevEx engineers, operators, and CI authors integrating the stella CLI into vulnerability-scanning and release-control workflows. Scope: Synopsis, options, exit codes, and offline notes for the AOC, lock-validation, knowledge-search, policy-lifecycle, and verification command families.

The commands in this reference enforce the AOC guardrails described in the Aggregation-Only Contract reference and the CLI architecture overview. They consume Authority-issued tokens with tenant scopes and never mutate ingestion stores.

For per-command deep dives, see the commands/ guides. For the canonical exit-code contract, see Output and exit codes.


1 · Prerequisites


The AdvisoryAI Knowledge Search (AKS) commands expose deterministic retrieval from AdvisoryAI (docs|api|doctor) without requiring an LLM.

stella search "<query>" \
  [--type docs|api|doctor] \
  [--product <product>] \
  [--version <version>] \
  [--service <service>] \
  [--tag <tag>] \
  [--k <1-100>] \
  [--json]

Notes:

2.2 stella doctor suggest

stella doctor suggest "<symptom-or-error>" \
  [--product <product>] \
  [--version <version>] \
  [--k <1-100>] \
  [--json]

Uses the same AKS index and prints grouped recommendations for:

2.3 stella advisoryai index rebuild

stella advisoryai index rebuild [--json]

Rebuilds the deterministic AKS index from local markdown, OpenAPI, and Doctor metadata sources.

2.4 stella advisoryai sources prepare

stella advisoryai sources prepare \
  [--repo-root <path>] \
  [--docs-allowlist <path>] \
  [--docs-manifest-output <path>] \
  [--openapi-output <path>] \
  [--doctor-seed <path>] \
  [--doctor-controls-output <path>] \
  [--overwrite] \
  [--json]

Generates deterministic AKS seed artifacts before an index rebuild:


3 · stella sources ingest --dry-run

3.1 Synopsis

stella sources ingest --dry-run \
  --source <source-key> \
  --input <path-or-uri> \
  [--tenant <tenant-id>] \
  [--format json|table] \
  [--no-color] \
  [--output <file>]

3.2 Description

Previews an ingestion write without touching the database. The command loads an upstream advisory or VEX document, computes the would-write payload, runs it through the AOCWriteGuard, and reports any forbidden fields, provenance gaps, or idempotency issues. Use it during connector development, CI validation, or while triaging incidents.

3.3 Options

OptionDescription
--source <source-key>Logical source name (redhat, ubuntu, osv, etc.). Mirrors connector configuration.
--input <path-or-uri>Path to a local CSAF/OSV/VEX file or an HTTPS URI. The CLI normalises transport (gzip/base64) before guard evaluation.
--tenant <tenant-id>Overrides the default tenant for multi-tenant deployments. Mandatory when STELLA_TENANT is not set.
--format json|tableOutput format. table (default) prints a summary with highlighted violations; json emits a machine-readable report (see below).
--no-colorDisables ANSI colour output for CI logs.
--output <file>Writes the JSON report to file while still printing the human-readable summary to stdout.

3.4 Output schema (JSON)

{
  "source": "redhat",
  "tenant": "default",
  "guardVersion": "1.0.0",
  "status": "ok",
  "document": {
    "contentHash": "sha256:…",
    "supersedes": null,
    "provenance": {
      "signature": { "format": "pgp", "present": true }
    }
  },
  "violations": []
}

When violations exist, status becomes error and violations contains entries with code (ERR_AOC_00x), a short message, and JSON Pointer path values indicating the offending fields.

3.5 Exit codes

Exit codeMeaning
0Guard passed; would-write payload is AOC compliant.
11ERR_AOC_001 – Forbidden field (severity, cvss, etc.) detected.
12ERR_AOC_002 – Merge attempt (multiple upstream sources fused).
13ERR_AOC_003 – Idempotency violation (duplicate without supersedes).
14ERR_AOC_004 – Missing provenance fields.
15ERR_AOC_005 – Signature/checksum mismatch.
16ERR_AOC_006 – Effective findings present (Policy-only data).
17ERR_AOC_007 – Unknown top-level fields / schema violation.
70Transport error (network, auth, malformed input).

Exit codes map directly to the ERR_AOC_00x table for scripting consistency. Multiple violations yield the highest-priority code (e.g., 11 takes precedence over 14).

3.6 Examples

Dry-run a local CSAF file:

stella sources ingest --dry-run \
  --source redhat \
  --input ./fixtures/redhat/RHSA-2025-1234.json

Stream from HTTPS and emit JSON for CI:

stella sources ingest --dry-run \
  --source osv \
  --input https://osv.dev/vulnerability/GHSA-aaaa-bbbb \
  --format json \
  --output artifacts/osv-dry-run.json

cat artifacts/osv-dry-run.json | jq '.violations'

3.7 Offline notes

When operating in sealed/offline mode:


4 · stella aoc verify

4.1 Synopsis

stella aoc verify \
  [--since <iso8601|duration>] \
  [--limit <count>] \
  [--sources <list>] \
  [--codes <ERR_AOC_00x,...>] \
  [--format table|json] \
  [--export <file>] \
  [--tenant <tenant-id>] \
  [--no-color]

4.2 Description

Replays the AOC guard against stored raw documents. By default it checks all advisories and VEX statements ingested in the last 24 hours for the active tenant, reporting totals, top violation codes, and sample documents. Use it in CI pipelines, scheduled verifications, or during incident response.

4.3 Options

OptionDescription
--since <value>Verification window. Accepts an ISO 8601 timestamp (2025-10-25T12:00:00Z) or a duration (48h, 7d). Defaults to 24h.
--limit <count>Maximum number of violations to display (per code). 0 means show all. Defaults to 20.
--sources <list>Comma-separated list of sources (redhat,ubuntu,osv). Filters both advisories and VEX entries.
--codes <list>Restricts output to specific ERR_AOC_00x codes. Useful for regression tracking.
--format table|jsontable (default) prints a summary plus top violations; json outputs a machine-readable report identical to the /aoc/verify API.
--export <file>Writes the JSON report to disk (useful for audits/offline uploads).
--tenant <tenant-id>Overrides tenant context. Required for cross-tenant verifications run by platform operators.
--no-colorDisables ANSI colours.

table mode prints a summary showing the active tenant, evaluated window, counts of checked advisories/VEX statements, the active limit, total writes/violations, and whether the page was truncated. Status is colour-coded as ok, violations, or truncated. When violations exist, the detail table lists the code, total occurrences, first sample document (source + documentId + contentHash), and JSON Pointer path.

4.4 Report structure (JSON)

{
  "tenant": "default",
  "window": {
    "from": "2025-10-25T12:00:00Z",
    "to": "2025-10-26T12:00:00Z"
  },
  "checked": {
    "advisories": 482,
    "vex": 75
  },
  "violations": [
    {
      "code": "ERR_AOC_001",
      "count": 2,
      "examples": [
        {
          "source": "redhat",
          "documentId": "advisory_raw:redhat:RHSA-2025:1",
          "contentHash": "sha256:…",
          "path": "/content/raw/cvss"
        }
      ]
    }
  ],
  "metrics": {
    "ingestion_write_total": 557,
    "aoc_violation_total": 2
  },
  "truncated": false
}

4.5 Exit codes

Exit codeMeaning
0Verification succeeded with zero violations.
11…17Same mapping as § 3.5 when violations are detected. Highest-priority code returned.
18Verification ran but results were truncated (limit reached) – treat as a warning; rerun with a higher --limit.
70Transport/authentication error.
71CLI misconfiguration (missing tenant, invalid --since, etc.).

4.6 Examples

Daily verification across all sources:

stella aoc verify --since 24h --format table

CI pipeline focusing on errant sources and exporting evidence:

stella aoc verify \
  --sources redhat,ubuntu \
  --codes ERR_AOC_001,ERR_AOC_004 \
  --format json \
  --limit 100 \
  --export artifacts/aoc-verify.json

jq '.violations[] | {code, count}' artifacts/aoc-verify.json

Air-gapped verification using an Offline Kit snapshot (example script):

stella aoc verify \
  --since 7d \
  --format json \
  --export /mnt/offline/aoc-verify-$(date +%F).json

sha256sum /mnt/offline/aoc-verify-*.json > /mnt/offline/checksums.txt

4.7 Automation tips

4.8 Offline notes


5 · stella node lock-validate

5.1 Synopsis

stella node lock-validate \
  [--path <directory>] \
  [--format table|json] \
  [--verbose]

5.2 Description

Runs the Node analyzer locally against a working directory to compare lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock) with what is actually present in node_modules. The command is read-only and never schedules a scan; it reuses the same deterministic collector that powers Scanner so results match backend evidence. Output highlights two conditions that policy cares about:

This helps catch drift before images are built, keeps lockfiles trustworthy, and feeds policy predicates such as node.lock.declaredMissing.

5.3 Options

OptionDescription
--path, -pDirectory containing package.json and lockfiles. Defaults to the current working directory.
--format table|jsontable (default) renders a Spectre table with status badges; json prints the underlying report for CI automation.
--verboseEnables detailed logging (shared root option).

5.4 Output & exit codes

Exit codes:

CodeMeaning
0No inconsistencies detected.
1Declared-only or missing-lock packages were found.
71The requested directory could not be read (missing path, permissions, etc.).

The CLI also records stellaops.cli.node.lock_validate.count{outcome} so operators can monitor adoption in telemetry.

5.5 Offline notes


6 · stella python lock-validate

6.1 Synopsis

stella python lock-validate \
  [--path <directory>] \
  [--format table|json] \
  [--verbose]

6.2 Description

Validates Python lockfiles (currently requirements*.txt, Pipfile.lock, and poetry.lock) against what exists in site-packages. It uses the same analyzer Scanner runs, so declared-only packages, missing locks, and editable installs are detected deterministically and without internet access. This catches drift between lock manifests and baked images before scanners or policy gates fail later.

6.3 Options

OptionDescription
--path, -pDirectory containing lib/python*/site-packages and lockfiles. Defaults to $PWD.
--format table|jsontable (default) prints a human summary; json emits the raw report for CI.
--verboseEnables detailed logging.

6.4 Output & exit codes

Output shape mirrors the Node command: declared-only packages are shown with lock provenance, and runtime packages missing lock metadata are highlighted separately. JSON mode returns the same object schema { declaredOnly, missingLockMetadata, totalDeclared, totalInstalled }.

Exit codes follow the same contract (0 success, 1 violations, 71 for an unreadable path). Telemetry is published via stellaops.cli.python.lock_validate.count{outcome}.

6.5 Offline notes


7 · stella java lock-validate

7.1 Synopsis

stella java lock-validate \
  [--path <directory>] \
  [--format table|json] \
  [--verbose]

7.2 Description

Executes the Java language analyzer locally so Gradle gradle.lockfile, gradle/dependency-locks/**/*.lockfile, and pom.xml declarations can be compared with the jars that actually ship in a workspace. The command reuses the JavaLockFileCollector plus the JavaLanguageAnalyzer merge logic, so it emits the same DeclaredOnly and Missing Lock evidence that Scanner and Policy consume. Engineers can see which coordinates exist only in lockfiles (no jar on disk) and which installed jars lack lock metadata (no repository/provenance) before a scan ever runs.

7.3 Options

OptionDescription
--path, -pDirectory containing jars (e.g., build/libs) and lockfiles. Defaults to the current working directory.
--format table|jsontable (default) renders the Spectre table; json outputs the raw LockValidationReport.
--verboseEnables detailed logging and surfaces the analyzer paths being inspected.

7.4 Output & exit codes

Output mirrors the Node/Python verbs: Declared Only rows include the lock source/locator (e.g., gradle.lockfile, gradle/dependency-locks/app.lockfile) plus configuration/repository hints, while Missing Lock rows highlight jars that Scanner would tag with lockMissing=true. JSON responses return { declaredOnly, missingLockMetadata, totalDeclared, totalInstalled }.

Exit codes align with the other lock validators:

CodeMeaning
0No inconsistencies detected.
1Declared-only or missing-lock jars detected.
71Directory could not be read.

Telemetry is recorded via stellaops.cli.java.lock_validate.count{outcome} so adoption can be monitored alongside the Node/Python verbs.

7.5 Offline notes


8 · stella vuln observations (overlay paging)

stella vuln observations lists raw advisory observations for downstream overlays (Graph Explorer, Policy simulations, Console). Large tenants can page through results deterministically.

OptionDescription
--limit <count>Caps the number of observations returned in a single call. Defaults to 200; values above 500 are clamped server-side.
--cursor <token>Opaque continuation token produced by the previous page (nextCursor in JSON output). Pass it back to resume iteration.

Additional notes:


9 · Aggregation-only exit-code reference

CodeSummary
0Success / no violations.
11ERR_AOC_001 – Forbidden field present.
12ERR_AOC_002 – Merge attempt detected.
13ERR_AOC_003 – Idempotency violation.
14ERR_AOC_004 – Missing provenance/signature metadata.
15ERR_AOC_005 – Signature/checksum mismatch.
16ERR_AOC_006 – Effective findings in ingestion payload.
17ERR_AOC_007 – Schema violation / unknown fields.
18Partial verification (limit reached).
70Transport or HTTP failure.
71Aggregation-only handler usage error (for example, missing tenant). Parser-rejected command lines exit 2 before the handler runs.

Use these codes in CI to map outcomes to build statuses or alert severities.


10 · Policy lifecycle quick start

All publish/promote operations require interactive identities with policy:publish/policy:promote and inject attestation metadata headers (policy_reason, policy_ticket, policy_digest). See Policy Lifecycle & Approvals § 3–4 for the full workflow and compliance checklist.


11 · Authority configuration quick reference

SettingPurposeHow to set
StellaOps:Authority:OperatorReasonIncident/change description recorded with orch:operate tokens.CLI flag --Authority:OperatorReason=... or env STELLAOPS_ORCH_REASON.
StellaOps:Authority:OperatorTicketChange/incident ticket reference paired with orchestrator control actions.CLI flag --Authority:OperatorTicket=... or env STELLAOPS_ORCH_TICKET.
StellaOps:Authority:QuotaReasonRequired justification recorded with orch:quota tokens.CLI flag --Authority:QuotaReason=... or env STELLAOPS_ORCH_QUOTA_REASON.
StellaOps:Authority:QuotaTicketOptional change ticket/reference accompanying quota adjustments.CLI flag --Authority:QuotaTicket=... or env STELLAOPS_ORCH_QUOTA_TICKET.
StellaOps:Authority:BackfillReasonRequired justification recorded with orch:backfill tokens.CLI flag --Authority:BackfillReason=... or env STELLAOPS_ORCH_BACKFILL_REASON.
StellaOps:Authority:BackfillTicketRequired ticket/reference accompanying historical backfill runs.CLI flag --Authority:BackfillTicket=... or env STELLAOPS_ORCH_BACKFILL_TICKET.
StellaOps:Authority:ScopeDefault scope string requested during stella auth login.CLI flag --Authority:Scope="packs.read packs.run" or env STELLAOPS_AUTHORITY_SCOPE; see Task Pack CLI profiles for common profiles.

Tokens requesting orch:operate fail with invalid_request unless both operator values are present. orch:quota tokens require quota_reason (≤256 chars) and accept an optional quota_ticket (≤128 chars). orch:backfill tokens require both backfill_reason (≤256 chars) and backfill_ticket (≤128 chars). Avoid embedding secrets in any value.


12 · stella excititor verify

12.1 Synopsis

stella excititor verify \
  [--export-id <id>] \
  [--digest <sha256>] \
  [--attestation <path>] \
  [--verbose]

At least one of --export-id, --digest, or --attestation must be supplied.

12.2 Description

Submits an artifact, digest, or attestation bundle to the Attestor service for verification. The command is available once the non-core plugin pack is installed (default in production CLI builds). It validates DSSE envelopes, Rekor proofs, and export digests without requiring operators to call Attestor APIs directly.

12.3 Options

OptionDescription
--export-id <id>Verify a previously issued Excititor export by identifier.
--digest <sha256>Expected SHA-256 digest of the artifact or attestation payload. Added to the verification payload for additional integrity checks.
--attestation <path>Path to a DSSE or in-toto bundle. The CLI base64-encodes the file and streams it to Attestor for verification.
--verboseEnables debug logging.

Behaviour: When --attestation is used, the CLI loads the file into memory, encodes it as base64, and delegates verification to Attestor. Verification fails fast if the file cannot be read.

12.4 Secret rule bundle workflow

To confirm the signed secret-leak rule bundle before enabling the analyzer:

export STELLA_ATTESTOR_URL=https://attestor.internal.example      # or Offline Kit mirror

RULES_PATH=offline/rules/secrets/2025.11/secrets.ruleset.rules.jsonl
ATTESTATION_PATH=offline/rules/secrets/2025.11/secrets.ruleset.dsse.json

stella excititor verify \
  --attestation "${ATTESTATION_PATH}" \
  --digest "$(sha256sum "${RULES_PATH}" | cut -d' ' -f1)"

The Attestor response prints verification status, Rekor UUID (when available), and whether the transparency proof was validated.

12.5 Offline considerations


13 · stella scan entrytrace --stream-ndjson

13.1 Synopsis

stella scan entrytrace \
  --scan-id <scanId> \
  [--stream-ndjson] \
  [--include-ndjson] \
  [--verbose]

13.2 Description

Streams the EntryTrace NDJSON produced by a completed scan. When --stream-ndjson is set, the CLI sends Accept: application/x-ndjson and writes the raw lines to stdout in order, suitable for piping into AOC/ETL tools. Without the flag, the command returns the JSON envelope (scanId, imageDigest, graph, NDJSON array) and optionally prints NDJSON when --include-ndjson is set.

13.3 Examples

Stream raw NDJSON for further processing:

stella scan entrytrace --scan-id scan-123 --stream-ndjson > entrytrace.ndjson

Retrieve the JSON envelope (default behaviour):

stella scan entrytrace --scan-id scan-123


Last updated: 2025-11-05 (Sprint 101).