Skip to main content

CRA Evidence CLI

PyPI CI License: MIT Python 3.12+ Docker pulls

Command-line tools for CRA Evidence workflows and local software supply-chain checks.

craevidence check scans an SBOM and gates CI on known-exploited vulnerabilities

The CLI has two modes:

  • Local commands that run without a CRA Evidence account or API key.
  • Account commands that upload evidence or read release state from CRA Evidence.

This page covers the public command basics. The full reference lives in docs/. Registered CRA Evidence users can also sign in to view the command documentation at https://docs.craevidence.com/cli-reference.

The local checks are review aids and CI gates. They are not an audit, and exit 0 does not prove compliance.

Install

pip install craevidence
pipx install craevidence

pipx is a good fit for command-line tools because it installs the package in an isolated environment.

The installed command is:

craevidence --help

Python 3.12 or newer is required. Docker images and other install options are covered in the installation guide.

Documentation

Page Contents
Local commands check, eol-check, egress-check, secrets-check, config-check, code-check, draft, assessment, db, and the offline template scaffold.
Account commands Version creation, uploads, scan, status, risk assessment status, release lifecycle, distributor, profiles, validation, and verification.
CI/CD integration GitHub Action, GitLab Component, Docker, Jenkins, OpenSSF Scorecard, and complyctl.
Installation PyPI, Docker, container registries, and from source.
Troubleshooting Common errors and fixes.
Releasing Maintainer reference: channels, verification, tags, support policy.

Local Check

craevidence check scans a directory, container image, or existing SBOM and reports known vulnerability signals that can block CI when a threshold is met. It does not require an account and does not upload your project to CRA Evidence.

craevidence check .
craevidence check --image ghcr.io/acme/app:1.4.2
craevidence check --sbom sbom.cdx.json
craevidence check . --fail-on known-exploited

By default, check uses network data sources. It uses Grype when installed and working, falls back to OSV.dev when Grype is absent or fails, and consults CISA KEV plus FIRST EPSS for enrichment. For a network-restricted run, provide an SBOM with --sbom and run where Grype has a local database; CISA KEV and FIRST EPSS enrichment are reported as unavailable if they cannot be reached.

Verbose output includes a section named What this local snapshot cannot tell you. The JSON output keeps the same review context in machine-readable form.

Free Commands

These commands do not need CRA_EVIDENCE_API_KEY:

Command Purpose
check Scan a directory, image, or SBOM and gate CI with --fail-on.
eol-check Flag end-of-life and support status from local SBOM components.
egress-check Inventory external interfaces and data-egress indicators.
secrets-check Scan the working tree for candidate hard-coded secrets.
config-check Audit Dockerfile, Terraform, and Kubernetes files for insecure defaults.
code-check On supported platforms, scan source code offline with the bundled, verified Opengrep engine and explicit CRA Evidence rules.
draft Scaffold VEX, security.txt, advisory, risk-assessment, and threat-model drafts for review.
compliance-as-code template --offline Create starter YAML from local input without an API key.
assessment Scaffold an Annex I applicability matrix and gate CI on structured gaps.
db update / db status Manage and inspect the local Grype vulnerability database cache.

CI Examples

GitHub Actions:

jobs:
  cra-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pipx install craevidence
      - run: craevidence check . --fail-on known-exploited

GitLab CI:

cra-check:
  image: python:3.12-slim
  script:
    - pip install craevidence
    - craevidence check . --fail-on known-exploited

Account Commands

Commands that upload evidence or read CRA Evidence release state need an API key:

export CRA_EVIDENCE_API_KEY=...
craevidence create-version --product my-product --version 1.0.0
craevidence upload-sbom --product my-product --version 1.0.0 --file sbom.cdx.json
craevidence status --product my-product --version 1.0.0

create-version creates a draft under an existing product without uploading new evidence. CRA Evidence automatically links reusable product-level documents and templates to the version. This is useful when source-code findings need a version before an SBOM is available:

craevidence create-version --product my-product --version 1.0.0
craevidence code-check . --product my-product --version 1.0.0 --upload

code-check runs locally and uploads sanitized SARIF finding metadata, not source code. The bundled pack has 104 rules: 54 run by default and 50 broader rules require --include-experimental; the command reports exact per-language rule counts. Default coverage by language:

  • Python: 42 focused rules.
  • Go: direct crypto/tls dial calls that disable verification without a custom callback.
  • Java: compiler-attested JDK weak-digest calls.
  • PHP: fully qualified global \unserialize calls fed from a reviewed HTTP superglobal source.
  • C#: the framework accept-any certificate-validator assignment, attested through Roslyn against the signed HttpClientHandler type.
  • Rust: literal TLS verification disablement, bound to the exact crates.io reqwest package.
  • C and C++: three compiler-attested rules each, covering fixed-array out-of-bounds literal writes, a system printf whose format argument is main's own argv parameter, and direct system-shell commands, through pinned libclang C17 and C++17 profiles.
  • JavaScript and TypeScript: assigned odd integer literals above the exact binary64 safe-integer boundary.

The C, C++, C#, Java, and Rust defaults consume a versioned --semantic-evidence envelope produced by code-evidence. Missing, ambiguous, stale, or invalid evidence reports degraded coverage instead of a clean result. Broader rules remain opt-in where corpus precision, parser coverage, type resolution, namespace binding, or intrafile dataflow is insufficient for default use. No group is general SAST coverage for its language. Neither command proves compliance. Exact rule scopes, evidence requirements, and toolchain profiles are documented in Local commands and the rule pack reference.

The default API URL is:

https://api.craevidence.com

You can override it with:

export CRA_EVIDENCE_URL=https://api.craevidence.com

For a self-hosted instance, configure the exact API origin and register the same normalized origin as trusted:

export CRA_EVIDENCE_URL=https://cra-api.internal.example
export CRA_EVIDENCE_TRUSTED_ORIGIN=https://cra-api.internal.example
export CRA_EVIDENCE_CA_BUNDLE=/etc/ssl/certs/cra-internal-ca.pem

The API URL and trusted origin must be origins only: scheme, host, and optional port, with no user information, path, query, or fragment. HTTPS is required except for loopback development URLs. The trusted-origin setting suppresses the custom-host typo warning only for an exact normalized match. It is a configuration safeguard, not a security boundary.

CRA_EVIDENCE_CA_BUNDLE selects a PEM CA bundle for account API requests. Without it, the standard SSL_CERT_FILE and SSL_CERT_DIR variables remain available. TLS verification cannot be disabled. See the CI/CD integration guide for runner egress, proxy, GitHub Action, and GitLab Component examples.

Environment Variables

Variable Purpose
CRA_EVIDENCE_API_KEY API key for account commands.
CRA_EVIDENCE_URL CRA Evidence API URL. Defaults to https://api.craevidence.com.
CRA_EVIDENCE_TRUSTED_ORIGIN Exact trusted API origin for a self-hosted instance.
CRA_EVIDENCE_CA_BUNDLE Path to a PEM CA bundle for API TLS verification.
CRA_EVIDENCE_ORG Default organization slug.
CRA_EVIDENCE_PRODUCT Default product slug for upload commands.
CRA_EVIDENCE_VERSION Default product version for upload commands.
CRA_EVIDENCE_COMPONENT Default component slug for component-aware uploads.
CRA_EVIDENCE_COMPONENT_VERSION Default component release version.
CRA_EVIDENCE_TIMEOUT HTTP request timeout in seconds for account commands. Defaults to 60.

Credentials can also be stored in ~/.cra-evidence/config.yaml. Keep that file private, for example with chmod 600 ~/.cra-evidence/config.yaml.

Exit Codes

Code Meaning
0 Success. For local gates, no configured blocking finding was present in this local snapshot.
1 General error.
2 Authentication error.
3 API error.
4 Validation error.
5 File not found.
6 Configuration error.
7 security.txt validation failed.
10 Critical vulnerabilities found.
11 High vulnerabilities found.
12 Medium vulnerabilities found.
13 Low vulnerabilities found.
14 SBOM quality score below the configured threshold.
15 Local scan engine unavailable.
16 License policy threshold exceeded.
17 Known-exploited vulnerabilities found.
18 Candidate secrets found.
19 Insecure-default config findings found.
20 CRA status is not ready when a status gate is enabled.
21 Structured evidence mapping was required but was not populated.
22 SBOM signature trust was required but verification was not trusted.
23 SBOM signing failed or no Sigstore OIDC identity was available.
24 CRA legal floor is met but the configured release policy is not.
25 Mandatory Annex I requirement is not addressed.
26 Annex I Part I(2) requirement is marked not-applicable without a justification.
27 Code-check findings at or above the configured --fail-on level.
28 Risk assessment review is still pending for the version (ra status --fail-on unreviewed, or ra review --non-interactive with unresolved review items).
29 Code-check parser coverage is degraded while an explicit --fail-on gate is enabled. This takes precedence over exit 27 because the result is incomplete.
30 Vulnerability applicability was not verified for the version, so a --fail-on gate cannot certify the severity threshold. Verify or resolve the affected findings in CRA Evidence.

Exit 0 != compliance. Local output is a snapshot for review and CI policy, not a legal conclusion.

Data Sources

Source Use
FIRST EPSS Exploit-probability enrichment.
CISA KEV Known-exploited vulnerability enrichment.
OSV.dev Open source vulnerability data when the OSV path is used.
CRA Evidence Grype engine Local vulnerability matching and SBOM generation. The engine embeds Anchore Syft for package cataloguing. Stock Grype and a standalone Syft executable are not product engines.
endoflife.date End-of-life and support-cycle data for eol-check.

Support

License

MIT License. See the package license file for details.

Metadata

Release files for craevidence 4.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for craevidence 4.4.0
File Size Uploaded
craevidence-4.4.0.tar.gz 534.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for craevidence 4.4.0
File
craevidence-4.4.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
craevidence-4.4.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
craevidence-4.4.0-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
craevidence-4.4.0-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
craevidence-4.4.0-py3-none-macosx_12_0_x86_64.whl Python 3 none macOS 12.0+ x86-64 Details
craevidence-4.4.0-py3-none-macosx_12_0_arm64.whl Python 3 none macOS 12.0+ ARM64 Details

Total release size: 437.4 MB

Release files / craevidence-4.4.0.tar.gz

Download URL craevidence-4.4.0.tar.gz
Size 534.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c9a4018a554e5d4acbaa601abf2e48bdc6ca4b51c9680e4f6ba4c9179d86df3f
BLAKE2b-256 checksum
How to use checksums
f7a09b61b7426f10ec50a1569d18738f32b850cb820e9e3962d636bb7c7450d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / craevidence-4.4.0-py3-none-musllinux_1_2_x86_64.whl

Download URL craevidence-4.4.0-py3-none-musllinux_1_2_x86_64.whl
Size 74.2 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
27da0956c80376536a21f0cb9d6681f6d87d1040a021f866f9692e696a18bbdd
BLAKE2b-256 checksum
How to use checksums
f2a3a628b960a00c7769ffb06295f37ce513100b992c4c45119410b0e237863e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / craevidence-4.4.0-py3-none-musllinux_1_2_aarch64.whl

Download URL craevidence-4.4.0-py3-none-musllinux_1_2_aarch64.whl
Size 73.0 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
3308c65d885fe4c18cd1a5950dab8070822dc1bf8254c52524f2c0eb5cc7ca06
BLAKE2b-256 checksum
How to use checksums
28eb426f5b813f1cc55be36f079bf38c41c6bcddd2aa520085488217aa2311a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / craevidence-4.4.0-py3-none-manylinux_2_17_x86_64.whl

Download URL craevidence-4.4.0-py3-none-manylinux_2_17_x86_64.whl
Size 71.9 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
f80c0699b78771248e14b59591bb1b64a5a8fd43ee80bfc8ef280412f838f54d
BLAKE2b-256 checksum
How to use checksums
495e6b76ad6b5192dfa9ef17c8fd47526265d590926954895042354b6cd6a72a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / craevidence-4.4.0-py3-none-manylinux_2_17_aarch64.whl

Download URL craevidence-4.4.0-py3-none-manylinux_2_17_aarch64.whl
Size 70.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
260fbf35ef20cffc589aef51f5dc197e5a5b22f21bb7b10a7ad5bf731b721190
BLAKE2b-256 checksum
How to use checksums
a0ae901bcc8896461981619c6c4a5af6131959e414e56dbc68e001b8b039d425
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / craevidence-4.4.0-py3-none-macosx_12_0_x86_64.whl

Download URL craevidence-4.4.0-py3-none-macosx_12_0_x86_64.whl
Size 74.9 MB
Tags Python 3 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
c7b960db333c21c0f281b8435915aaf523fc35bdc2ed67a8cd9411275b476b5d
BLAKE2b-256 checksum
How to use checksums
67ea603a7671f4ea10c87338e9edf7b7c556f9773fafc655fa489f1a0bce5eb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / craevidence-4.4.0-py3-none-macosx_12_0_arm64.whl

Download URL craevidence-4.4.0-py3-none-macosx_12_0_arm64.whl
Size 72.2 MB
Tags Python 3 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
5bbe1d1fb774f5cfba90781746edbf22eb4d1dfaba8167b39bc703ce05a4a093
BLAKE2b-256 checksum
How to use checksums
dac8bf090e14e954298fb56a2ac938b5a3f8bf4c298309aa9b74b17e846a336c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release history Release notifications | RSS feed

4.8.0

7 release files

4.7.0

7 release files

4.6.0

7 release files

4.5.0

7 release files

This release

4.4.0 This release

7 release files

4.3.0

7 release files

4.2.0

7 release files

4.1.0

2 release files

4.0.0

2 release files

3.8.2

2 release files

3.8.1

2 release files

3.7.0

2 release files

3.6.1

2 release files

3.6.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page