cra-scanner
Open source CLI tool for assessing EU Cyber Resilience Act (CRA) compliance readiness from SBOMs and project signals.
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
Metadata
Release files for cra-scanner 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cra_scanner-0.3.1.tar.gz | 23.8 kB | Without provenance | Details for cra_scanner-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cra_scanner-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for cra_scanner-0.3.1-py3-none-any.whl |
Total release size: 47.9 kB
Release files / cra_scanner-0.3.1.tar.gz
| Download URL | cra_scanner-0.3.1.tar.gz |
|---|---|
| Size | 23.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7aecb09c8241b14ce861c7d6e4aa28c857618c6af93b02ddc0e858a69ff08026
|
|
BLAKE2b-256 checksum How to use checksums |
0709ef6059483b45729790c987c5d1a7c8c76f69a6a0c981b9aa8e946cb1f379
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / cra_scanner-0.3.1-py3-none-any.whl
| Download URL | cra_scanner-0.3.1-py3-none-any.whl |
|---|---|
| Size | 24.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c87cf656452f92ab766bb30eddbf73e0c8f6ff74290771ba5f3be30cdd1e07c
|
|
BLAKE2b-256 checksum How to use checksums |
a42c48412f2d208bdc82f7cff9ed0bf287621ac3486ed41691f9f8c13d8c8d3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for cra-scanner 0.3.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.