Skip to main content

cra-scanner

Open source CLI tool for assessing EU Cyber Resilience Act (CRA) compliance readiness from SBOMs and project signals.

PyPI version License: MIT

cra-scanner is developed by Complaro. It is a fully standalone tool under the MIT license.

Installation

pip install cra-scanner

Quick Start

Scan a project directory:

cra-scanner scan .

Scan with an explicit SBOM:

cra-scanner scan . --sbom path/to/bom.json

Output as JSON:

cra-scanner scan . --format json --output report.json

Fail if score is below a threshold (useful in CI/CD):

cra-scanner scan . --min-score 50

Disable live vulnerability scanning (offline/fast mode):

cra-scanner scan . --no-vuln-scan

Provide a GitHub token for higher advisory API rate limits:

cra-scanner scan . --github-token $GITHUB_TOKEN

CRA Readiness Score

The scanner returns a score from 0-100 based on:

Dimension Points What it checks
SBOM 40 Presence, coverage, version completeness
Vulnerabilities 30 Known vulnerability exposure via OSV.dev, GitHub Advisories, CISA KEV
Practices 30 SECURITY.md, Dependabot, documentation

The score is a directional indicator, not legal advice.

Vulnerability Scanning

cra-scanner queries real vulnerability databases for each component in your SBOM:

  • OSV.dev (primary) — precise purl and ecosystem matching for npm, PyPI, Maven, Go, Cargo, and more
  • GitHub Advisory Database (fallback) — ecosystem-specific advisory lookups
  • CISA KEV (cross-reference) — flags actively exploited vulnerabilities that may trigger CRA 24-hour reporting obligations

Version range matching uses ecosystem-aware comparison:

  • Semver for npm, Cargo, Go
  • PEP 440 for Python/PyPI
  • Explicit version lists when provided by the advisory

Each finding includes a confidence tier (high/medium/low) based on match precision.

SBOM Format Support

  • CycloneDX JSON and XML
  • SPDX JSON and tag-value

SBOMs are auto-discovered in your project directory, or you can specify one with --sbom.

GitHub Action

Use cra-scanner in your CI/CD pipeline:

name: CRA Compliance Check
on: [push, pull_request]

jobs:
  cra-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run CRA Scanner
        uses: complaro/cra-scanner/action@main
        with:
          min-score: 40

See action/README.md for full documentation.

Roadmap

  • SBOM parsing (CycloneDX, SPDX)
  • CRA readiness scoring
  • Vulnerability matching against OSV.dev, GitHub Advisories, CISA KEV
  • Version range comparison (semver, PEP 440)
  • GitHub Action for CI/CD
  • SARIF output for GitHub/GitLab code scanning
  • CycloneDX VEX output
  • Auto-SBOM generation from package managers
  • CPE matching for NVD lookups

About Complaro

cra-scanner is part of the Complaro open source CRA compliance ecosystem. Complaro also offers a hosted platform for teams that need continuous monitoring, ENISA reporting, and collaboration features.

License

MIT - see LICENSE

Links

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cra_scanner-0.3.1.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cra_scanner-0.3.1-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file cra_scanner-0.3.1.tar.gz.

File metadata

  • Download URL: cra_scanner-0.3.1.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for cra_scanner-0.3.1.tar.gz
Algorithm Hash digest
SHA256 7aecb09c8241b14ce861c7d6e4aa28c857618c6af93b02ddc0e858a69ff08026
MD5 8df2b6e3be8f513f740c39530fdc5beb
BLAKE2b-256 0709ef6059483b45729790c987c5d1a7c8c76f69a6a0c981b9aa8e946cb1f379

See more details on using hashes here.

File details

Details for the file cra_scanner-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: cra_scanner-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for cra_scanner-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c87cf656452f92ab766bb30eddbf73e0c8f6ff74290771ba5f3be30cdd1e07c
MD5 ff372bb942aa406800b5773be428cb90
BLAKE2b-256 a42c48412f2d208bdc82f7cff9ed0bf287621ac3486ed41691f9f8c13d8c8d3e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page