cbomly 0.2.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cbomly-0.2.0/src/cbomly.egg-info → cbomly-0.3.1}/PKG-INFO +55 -45
- {cbomly-0.2.0 → cbomly-0.3.1}/README.md +52 -42
- {cbomly-0.2.0 → cbomly-0.3.1}/pyproject.toml +3 -3
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/__init__.py +1 -1
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/cli.py +62 -8
- cbomly-0.3.1/src/cbomly/importer.py +248 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/packs/au.toml +8 -7
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/packs/baseline.toml +14 -4
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/packs/ca.toml +6 -3
- cbomly-0.3.1/src/cbomly/packs/eu.toml +96 -0
- cbomly-0.3.1/src/cbomly/packs/india.toml +96 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/packs/jp.toml +11 -9
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/packs/pci-dss.toml +7 -6
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/packs/sg.toml +7 -5
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/packs/uk.toml +4 -3
- cbomly-0.3.1/src/cbomly/packs/us-cnsa2.toml +87 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/packs/us-fda.toml +22 -13
- cbomly-0.3.1/src/cbomly/packs/us.toml +113 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/report.py +3 -2
- cbomly-0.3.1/src/cbomly/sbom.py +98 -0
- cbomly-0.3.1/src/cbomly/syft_fetch.py +119 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/upload.py +2 -2
- {cbomly-0.2.0 → cbomly-0.3.1/src/cbomly.egg-info}/PKG-INFO +55 -45
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly.egg-info/SOURCES.txt +2 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/tests/test_cli.py +18 -4
- {cbomly-0.2.0 → cbomly-0.3.1}/tests/test_keys.py +5 -5
- {cbomly-0.2.0 → cbomly-0.3.1}/tests/test_upload.py +1 -1
- cbomly-0.2.0/src/cbomly/packs/eu.toml +0 -117
- cbomly-0.2.0/src/cbomly/packs/india.toml +0 -102
- cbomly-0.2.0/src/cbomly/packs/us-cnsa2.toml +0 -97
- cbomly-0.2.0/src/cbomly/packs/us.toml +0 -145
- cbomly-0.2.0/src/cbomly/sbom.py +0 -54
- {cbomly-0.2.0 → cbomly-0.3.1}/LICENSE +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/NOTICE +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/setup.cfg +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/__main__.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/algorithms.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/cbom.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/cbom_names.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/detect/__init__.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/detect/deps.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/detect/keys.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/detect/services.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/detect/source.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/findings.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/inventory.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/rules.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly/scanner.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly.egg-info/dependency_links.txt +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly.egg-info/entry_points.txt +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly.egg-info/requires.txt +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/src/cbomly.egg-info/top_level.txt +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/tests/test_rules.py +0 -0
- {cbomly-0.2.0 → cbomly-0.3.1}/tests/test_source.py +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cbomly
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Find the cryptography in your software, write a CycloneDX CBOM, and check it is quantum-safe.
|
|
5
5
|
Author-email: Cbomly <team@cbomly.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://cbomly.com
|
|
8
|
-
Project-URL:
|
|
9
|
-
Project-URL: Issues, https://github.com/Cbomly/cbomly-scanner/issues
|
|
8
|
+
Project-URL: Documentation, https://cbomly.com/download/
|
|
10
9
|
Keywords: cbom,sbom,cyclonedx,post-quantum,pqc,cryptography,cert-in,compliance
|
|
11
10
|
Classifier: Programming Language :: Python :: 3
|
|
12
11
|
Classifier: Operating System :: POSIX :: Linux
|
|
13
12
|
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
14
14
|
Classifier: Topic :: Security :: Cryptography
|
|
15
15
|
Classifier: Environment :: Console
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
@@ -33,7 +33,7 @@ algorithm, key and certificate your product uses, with the file and line where i
|
|
|
33
33
|
writes the normal software list (**SBOM**) and a plain-English report that says what a future quantum
|
|
34
34
|
computer would break, and what to replace it with.
|
|
35
35
|
|
|
36
|
-
It runs locally on Linux and
|
|
36
|
+
It runs locally on Linux, macOS and Windows. Nothing is uploaded unless you run `cbomly upload` to keep your
|
|
37
37
|
reports in a free dashboard at [app.cbomly.com](https://app.cbomly.com), and even then only findings are
|
|
38
38
|
sent, never source code.
|
|
39
39
|
|
|
@@ -60,34 +60,40 @@ standards (ML-KEM, ML-DSA, SLH-DSA), and buyers are starting to ask their softwa
|
|
|
60
60
|
CBOM and a migration plan:
|
|
61
61
|
|
|
62
62
|
- **US:** NIST IR 8547 (Oct 2026) deprecates RSA and elliptic curves after 2030 and disallows them
|
|
63
|
-
after 2035
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
after 2035. EO 14412 (June 2026) moves federal high-impact systems to PQC key exchange by the end
|
|
64
|
+
of 2030 and PQC signatures by the end of 2031, and OMB M-26-15 has agencies keep a CBOM. NSA's
|
|
65
|
+
CNSA 2.0 applies to new national security system purchases from 1 January 2027. FDA requires an
|
|
66
|
+
SBOM for cyber medical devices.
|
|
67
|
+
- **EU:** the Cyber Resilience Act's main obligations, including the SBOM, apply from 11 December
|
|
68
|
+
2027 (reporting since 11 September 2026). The EU PQC roadmap says take the first steps, including
|
|
69
|
+
a crypto inventory, by the end of 2026, and finish high-risk uses by 2030 and medium-risk by 2035.
|
|
68
70
|
- **UK, Canada, Australia, Singapore, Japan:** national PQC timelines between 2030 (Australia) and
|
|
69
71
|
2035, each starting with a cryptographic inventory.
|
|
70
72
|
- **India:** CERT-In's BOM guidelines v2.0 (July 2025) define SBOM and CBOM; SEBI's CSCRF (Aug 2024)
|
|
71
|
-
requires
|
|
72
|
-
|
|
73
|
-
- **Payments:** PCI DSS v4.0.1 requires a yearly reviewed inventory of cipher suites
|
|
74
|
-
|
|
73
|
+
requires an SBOM for new core and critical software; the DST post-quantum roadmap (Feb 2026) asks
|
|
74
|
+
buyers to require vendor CBOMs from FY 2027-28.
|
|
75
|
+
- **Payments:** PCI DSS v4.0.1 requires a yearly reviewed inventory of cipher suites and protocols
|
|
76
|
+
(since 31 March 2025) and an inventory of keys and certificates.
|
|
75
77
|
|
|
76
78
|
## Install
|
|
77
79
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
One command installs the scanner and [Syft](https://github.com/anchore/syft) (which builds the software list).
|
|
81
|
+
It needs no admin rights and fetches its own Python if yours is older than 3.11:
|
|
80
82
|
|
|
81
83
|
```bash
|
|
82
|
-
# macOS
|
|
83
|
-
|
|
84
|
-
pipx install cbomly
|
|
84
|
+
# macOS and Linux
|
|
85
|
+
curl -LsSf https://cbomly.com/install.sh | sh
|
|
85
86
|
|
|
86
|
-
#
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
# Windows (PowerShell or Command Prompt)
|
|
88
|
+
powershell -ExecutionPolicy ByPass -c "irm https://cbomly.com/install.ps1 | iex"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Already have Python 3.11 or newer? `pipx install cbomly` works too. If Syft isn't installed, the first
|
|
92
|
+
`cbomly scan` downloads Anchore's official Syft release for your system, checks its SHA-256 against the
|
|
93
|
+
release's checksums, and keeps it in your user data folder (`~/.local/share/cbomly/bin` on Linux).
|
|
94
|
+
Set `CBOMLY_NO_SYFT=1` to never download it, or point `CBOMLY_SYFT` at your own copy.
|
|
90
95
|
|
|
96
|
+
```bash
|
|
91
97
|
cbomly doctor # checks everything is in place
|
|
92
98
|
```
|
|
93
99
|
|
|
@@ -100,8 +106,15 @@ cbomly scan . --fail-on high # exit code 1 if anything high or critical i
|
|
|
100
106
|
cbomly scan . --exclude 'testdata' # skip folders or files by name pattern
|
|
101
107
|
cbomly rules # list rule packs
|
|
102
108
|
cbomly rules india # show the rules in a pack
|
|
109
|
+
cbomly import cbom.json -r india # use a CBOM from IBM CBOMkit, cdxgen or another tool instead of scanning
|
|
103
110
|
```
|
|
104
111
|
|
|
112
|
+
**Already have a CBOM?** `cbomly import` reads any CycloneDX 1.6+ CBOM, for example from IBM's
|
|
113
|
+
CBOMkit / Sonar Cryptography plugin or cdxgen. It maps each `cryptographic-asset` (algorithms, keys,
|
|
114
|
+
certificates, protocols) to Cbomly's catalog by OID or name, keeps the software components as the SBOM, and
|
|
115
|
+
writes the same three files as `cbomly scan`, so rule packs, `cbomly upload` and the dashboard all work.
|
|
116
|
+
Assets it doesn't recognise are listed in the report and left out.
|
|
117
|
+
|
|
105
118
|
Output goes to `./cbomly-out/`:
|
|
106
119
|
|
|
107
120
|
| File | What it is |
|
|
@@ -119,18 +132,15 @@ cbomly upload --dry-run # prints exactly what would be sent
|
|
|
119
132
|
cbomly upload --gate # exit code 1 if the project's release gate fails (Pro)
|
|
120
133
|
```
|
|
121
134
|
|
|
122
|
-
|
|
135
|
+
In CI, run the same commands in any job with Python 3.11+ (store the key as a secret):
|
|
123
136
|
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
api-key: ${{ secrets.CBOMLY_API_KEY }}
|
|
129
|
-
rules: india
|
|
130
|
-
gate: true
|
|
137
|
+
```bash
|
|
138
|
+
pipx install cbomly
|
|
139
|
+
cbomly scan . --rules india -o cbomly-out
|
|
140
|
+
cbomly upload cbomly-out --gate
|
|
131
141
|
```
|
|
132
142
|
|
|
133
|
-
|
|
143
|
+
Your project page in the dashboard has ready-to-paste GitHub Actions and GitLab CI jobs.
|
|
134
144
|
|
|
135
145
|
Free accounts get a basic report for every scan. Pro adds the signed compliance pack, the upgrade plan,
|
|
136
146
|
the trend view, alerts for new RSA/ECC and the release gate.
|
|
@@ -164,24 +174,25 @@ a new country or standard is a new file, not new code. Built-in packs:
|
|
|
164
174
|
| Pack | Status | Covers |
|
|
165
175
|
|---|---|---|
|
|
166
176
|
| `baseline` | stable | Quantum-vulnerable crypto, broken and deprecated algorithms, short RSA keys, committed private keys, expired certificates |
|
|
167
|
-
| `us` |
|
|
168
|
-
| `us-cnsa2` |
|
|
169
|
-
| `us-fda` |
|
|
170
|
-
| `eu` |
|
|
171
|
-
| `uk` |
|
|
172
|
-
| `ca` |
|
|
173
|
-
| `au` |
|
|
174
|
-
| `sg` |
|
|
175
|
-
| `jp` |
|
|
176
|
-
| `india` |
|
|
177
|
+
| `us` | verified | NIST IR 8547, EO 14412, OMB M-26-15, CISA 2026 SBOM minimum elements |
|
|
178
|
+
| `us-cnsa2` | verified | NSA CNSA 2.0 (FAQ v2.1) for national security systems (includes `us`) |
|
|
179
|
+
| `us-fda` | verified | FD&C Act section 524B SBOM and FDA premarket cybersecurity guidance (medical devices) |
|
|
180
|
+
| `eu` | verified | Cyber Resilience Act SBOM, EU PQC roadmap, NIS2 cryptography rules, DORA key management |
|
|
181
|
+
| `uk` | verified | NCSC PQC migration timelines (2028 / 2031 / 2035) |
|
|
182
|
+
| `ca` | verified | Government of Canada PQC roadmap and TBS SPIN, OSFI quantum readiness |
|
|
183
|
+
| `au` | verified | ASD: stop traditional asymmetric crypto by end of 2030 |
|
|
184
|
+
| `sg` | verified | MAS quantum advisory and proposed 2030 / 2034 migration timelines |
|
|
185
|
+
| `jp` | verified | Government 2035 target, FSA guidance for banks |
|
|
186
|
+
| `india` | verified | CERT-In BOM guidelines (SBOM + CBOM), SEBI CSCRF, DST post-quantum roadmap milestones |
|
|
177
187
|
| `pci-dss` | draft | PCI DSS v4.0.1 cipher suite, key and certificate inventory (12.3.3, 4.2.1.1, 6.3.2) |
|
|
178
188
|
|
|
179
189
|
Combine packs for the markets you sell to, e.g. `--rules eu,us,india`.
|
|
180
190
|
|
|
181
191
|
See [docs/rule-packs.md](docs/rule-packs.md) to write your own and load it with `--rules-dir`.
|
|
182
192
|
|
|
183
|
-
|
|
184
|
-
|
|
193
|
+
Each reference in a pack links to the official document, with a short quote and the date it was
|
|
194
|
+
checked (`verified`). Claims we could not confirm were left out. `pci-dss` stays draft because the
|
|
195
|
+
PCI SSC PDF is licence-gated, so it was checked against a verbatim copy. The reports are informational, not legal advice.
|
|
185
196
|
|
|
186
197
|
## Development
|
|
187
198
|
|
|
@@ -194,8 +205,7 @@ ruff check src tests
|
|
|
194
205
|
|
|
195
206
|
Every key and certificate under `tests/fixtures/` is a throwaway test fixture.
|
|
196
207
|
|
|
197
|
-
|
|
198
|
-
see [SECURITY.md](SECURITY.md).
|
|
208
|
+
To report a security problem, email team@cbomly.com.
|
|
199
209
|
|
|
200
210
|
## Licence
|
|
201
211
|
|
|
@@ -7,7 +7,7 @@ algorithm, key and certificate your product uses, with the file and line where i
|
|
|
7
7
|
writes the normal software list (**SBOM**) and a plain-English report that says what a future quantum
|
|
8
8
|
computer would break, and what to replace it with.
|
|
9
9
|
|
|
10
|
-
It runs locally on Linux and
|
|
10
|
+
It runs locally on Linux, macOS and Windows. Nothing is uploaded unless you run `cbomly upload` to keep your
|
|
11
11
|
reports in a free dashboard at [app.cbomly.com](https://app.cbomly.com), and even then only findings are
|
|
12
12
|
sent, never source code.
|
|
13
13
|
|
|
@@ -34,34 +34,40 @@ standards (ML-KEM, ML-DSA, SLH-DSA), and buyers are starting to ask their softwa
|
|
|
34
34
|
CBOM and a migration plan:
|
|
35
35
|
|
|
36
36
|
- **US:** NIST IR 8547 (Oct 2026) deprecates RSA and elliptic curves after 2030 and disallows them
|
|
37
|
-
after 2035
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
after 2035. EO 14412 (June 2026) moves federal high-impact systems to PQC key exchange by the end
|
|
38
|
+
of 2030 and PQC signatures by the end of 2031, and OMB M-26-15 has agencies keep a CBOM. NSA's
|
|
39
|
+
CNSA 2.0 applies to new national security system purchases from 1 January 2027. FDA requires an
|
|
40
|
+
SBOM for cyber medical devices.
|
|
41
|
+
- **EU:** the Cyber Resilience Act's main obligations, including the SBOM, apply from 11 December
|
|
42
|
+
2027 (reporting since 11 September 2026). The EU PQC roadmap says take the first steps, including
|
|
43
|
+
a crypto inventory, by the end of 2026, and finish high-risk uses by 2030 and medium-risk by 2035.
|
|
42
44
|
- **UK, Canada, Australia, Singapore, Japan:** national PQC timelines between 2030 (Australia) and
|
|
43
45
|
2035, each starting with a cryptographic inventory.
|
|
44
46
|
- **India:** CERT-In's BOM guidelines v2.0 (July 2025) define SBOM and CBOM; SEBI's CSCRF (Aug 2024)
|
|
45
|
-
requires
|
|
46
|
-
|
|
47
|
-
- **Payments:** PCI DSS v4.0.1 requires a yearly reviewed inventory of cipher suites
|
|
48
|
-
|
|
47
|
+
requires an SBOM for new core and critical software; the DST post-quantum roadmap (Feb 2026) asks
|
|
48
|
+
buyers to require vendor CBOMs from FY 2027-28.
|
|
49
|
+
- **Payments:** PCI DSS v4.0.1 requires a yearly reviewed inventory of cipher suites and protocols
|
|
50
|
+
(since 31 March 2025) and an inventory of keys and certificates.
|
|
49
51
|
|
|
50
52
|
## Install
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
One command installs the scanner and [Syft](https://github.com/anchore/syft) (which builds the software list).
|
|
55
|
+
It needs no admin rights and fetches its own Python if yours is older than 3.11:
|
|
54
56
|
|
|
55
57
|
```bash
|
|
56
|
-
# macOS
|
|
57
|
-
|
|
58
|
-
pipx install cbomly
|
|
58
|
+
# macOS and Linux
|
|
59
|
+
curl -LsSf https://cbomly.com/install.sh | sh
|
|
59
60
|
|
|
60
|
-
#
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
# Windows (PowerShell or Command Prompt)
|
|
62
|
+
powershell -ExecutionPolicy ByPass -c "irm https://cbomly.com/install.ps1 | iex"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Already have Python 3.11 or newer? `pipx install cbomly` works too. If Syft isn't installed, the first
|
|
66
|
+
`cbomly scan` downloads Anchore's official Syft release for your system, checks its SHA-256 against the
|
|
67
|
+
release's checksums, and keeps it in your user data folder (`~/.local/share/cbomly/bin` on Linux).
|
|
68
|
+
Set `CBOMLY_NO_SYFT=1` to never download it, or point `CBOMLY_SYFT` at your own copy.
|
|
64
69
|
|
|
70
|
+
```bash
|
|
65
71
|
cbomly doctor # checks everything is in place
|
|
66
72
|
```
|
|
67
73
|
|
|
@@ -74,8 +80,15 @@ cbomly scan . --fail-on high # exit code 1 if anything high or critical i
|
|
|
74
80
|
cbomly scan . --exclude 'testdata' # skip folders or files by name pattern
|
|
75
81
|
cbomly rules # list rule packs
|
|
76
82
|
cbomly rules india # show the rules in a pack
|
|
83
|
+
cbomly import cbom.json -r india # use a CBOM from IBM CBOMkit, cdxgen or another tool instead of scanning
|
|
77
84
|
```
|
|
78
85
|
|
|
86
|
+
**Already have a CBOM?** `cbomly import` reads any CycloneDX 1.6+ CBOM, for example from IBM's
|
|
87
|
+
CBOMkit / Sonar Cryptography plugin or cdxgen. It maps each `cryptographic-asset` (algorithms, keys,
|
|
88
|
+
certificates, protocols) to Cbomly's catalog by OID or name, keeps the software components as the SBOM, and
|
|
89
|
+
writes the same three files as `cbomly scan`, so rule packs, `cbomly upload` and the dashboard all work.
|
|
90
|
+
Assets it doesn't recognise are listed in the report and left out.
|
|
91
|
+
|
|
79
92
|
Output goes to `./cbomly-out/`:
|
|
80
93
|
|
|
81
94
|
| File | What it is |
|
|
@@ -93,18 +106,15 @@ cbomly upload --dry-run # prints exactly what would be sent
|
|
|
93
106
|
cbomly upload --gate # exit code 1 if the project's release gate fails (Pro)
|
|
94
107
|
```
|
|
95
108
|
|
|
96
|
-
|
|
109
|
+
In CI, run the same commands in any job with Python 3.11+ (store the key as a secret):
|
|
97
110
|
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
api-key: ${{ secrets.CBOMLY_API_KEY }}
|
|
103
|
-
rules: india
|
|
104
|
-
gate: true
|
|
111
|
+
```bash
|
|
112
|
+
pipx install cbomly
|
|
113
|
+
cbomly scan . --rules india -o cbomly-out
|
|
114
|
+
cbomly upload cbomly-out --gate
|
|
105
115
|
```
|
|
106
116
|
|
|
107
|
-
|
|
117
|
+
Your project page in the dashboard has ready-to-paste GitHub Actions and GitLab CI jobs.
|
|
108
118
|
|
|
109
119
|
Free accounts get a basic report for every scan. Pro adds the signed compliance pack, the upgrade plan,
|
|
110
120
|
the trend view, alerts for new RSA/ECC and the release gate.
|
|
@@ -138,24 +148,25 @@ a new country or standard is a new file, not new code. Built-in packs:
|
|
|
138
148
|
| Pack | Status | Covers |
|
|
139
149
|
|---|---|---|
|
|
140
150
|
| `baseline` | stable | Quantum-vulnerable crypto, broken and deprecated algorithms, short RSA keys, committed private keys, expired certificates |
|
|
141
|
-
| `us` |
|
|
142
|
-
| `us-cnsa2` |
|
|
143
|
-
| `us-fda` |
|
|
144
|
-
| `eu` |
|
|
145
|
-
| `uk` |
|
|
146
|
-
| `ca` |
|
|
147
|
-
| `au` |
|
|
148
|
-
| `sg` |
|
|
149
|
-
| `jp` |
|
|
150
|
-
| `india` |
|
|
151
|
+
| `us` | verified | NIST IR 8547, EO 14412, OMB M-26-15, CISA 2026 SBOM minimum elements |
|
|
152
|
+
| `us-cnsa2` | verified | NSA CNSA 2.0 (FAQ v2.1) for national security systems (includes `us`) |
|
|
153
|
+
| `us-fda` | verified | FD&C Act section 524B SBOM and FDA premarket cybersecurity guidance (medical devices) |
|
|
154
|
+
| `eu` | verified | Cyber Resilience Act SBOM, EU PQC roadmap, NIS2 cryptography rules, DORA key management |
|
|
155
|
+
| `uk` | verified | NCSC PQC migration timelines (2028 / 2031 / 2035) |
|
|
156
|
+
| `ca` | verified | Government of Canada PQC roadmap and TBS SPIN, OSFI quantum readiness |
|
|
157
|
+
| `au` | verified | ASD: stop traditional asymmetric crypto by end of 2030 |
|
|
158
|
+
| `sg` | verified | MAS quantum advisory and proposed 2030 / 2034 migration timelines |
|
|
159
|
+
| `jp` | verified | Government 2035 target, FSA guidance for banks |
|
|
160
|
+
| `india` | verified | CERT-In BOM guidelines (SBOM + CBOM), SEBI CSCRF, DST post-quantum roadmap milestones |
|
|
151
161
|
| `pci-dss` | draft | PCI DSS v4.0.1 cipher suite, key and certificate inventory (12.3.3, 4.2.1.1, 6.3.2) |
|
|
152
162
|
|
|
153
163
|
Combine packs for the markets you sell to, e.g. `--rules eu,us,india`.
|
|
154
164
|
|
|
155
165
|
See [docs/rule-packs.md](docs/rule-packs.md) to write your own and load it with `--rules-dir`.
|
|
156
166
|
|
|
157
|
-
|
|
158
|
-
|
|
167
|
+
Each reference in a pack links to the official document, with a short quote and the date it was
|
|
168
|
+
checked (`verified`). Claims we could not confirm were left out. `pci-dss` stays draft because the
|
|
169
|
+
PCI SSC PDF is licence-gated, so it was checked against a verbatim copy. The reports are informational, not legal advice.
|
|
159
170
|
|
|
160
171
|
## Development
|
|
161
172
|
|
|
@@ -168,8 +179,7 @@ ruff check src tests
|
|
|
168
179
|
|
|
169
180
|
Every key and certificate under `tests/fixtures/` is a throwaway test fixture.
|
|
170
181
|
|
|
171
|
-
|
|
172
|
-
see [SECURITY.md](SECURITY.md).
|
|
182
|
+
To report a security problem, email team@cbomly.com.
|
|
173
183
|
|
|
174
184
|
## Licence
|
|
175
185
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cbomly"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.1"
|
|
8
8
|
description = "Find the cryptography in your software, write a CycloneDX CBOM, and check it is quantum-safe."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -15,6 +15,7 @@ classifiers = [
|
|
|
15
15
|
"Programming Language :: Python :: 3",
|
|
16
16
|
"Operating System :: POSIX :: Linux",
|
|
17
17
|
"Operating System :: MacOS",
|
|
18
|
+
"Operating System :: Microsoft :: Windows",
|
|
18
19
|
"Topic :: Security :: Cryptography",
|
|
19
20
|
"Environment :: Console",
|
|
20
21
|
"Intended Audience :: Developers",
|
|
@@ -29,8 +30,7 @@ cbomly = "cbomly.cli:main"
|
|
|
29
30
|
|
|
30
31
|
[project.urls]
|
|
31
32
|
Homepage = "https://cbomly.com"
|
|
32
|
-
|
|
33
|
-
Issues = "https://github.com/Cbomly/cbomly-scanner/issues"
|
|
33
|
+
Documentation = "https://cbomly.com/download/"
|
|
34
34
|
|
|
35
35
|
[tool.setuptools.packages.find]
|
|
36
36
|
where = ["src"]
|
|
@@ -26,7 +26,7 @@ def _parser() -> argparse.ArgumentParser:
|
|
|
26
26
|
s.add_argument("-o", "--out", default="cbomly-out", help="output folder (default: ./cbomly-out)")
|
|
27
27
|
s.add_argument("--name", help="product name to put in the reports (default: folder name)")
|
|
28
28
|
s.add_argument("--no-sbom", action="store_true", help="skip the Syft software list; crypto only")
|
|
29
|
-
s.add_argument("--syft", help="path to the syft binary (default:
|
|
29
|
+
s.add_argument("--syft", help="path to the syft binary (default: $CBOMLY_SYFT, PATH, or downloaded on first use)")
|
|
30
30
|
s.add_argument("--exclude", action="append", default=[], help="extra file/folder name pattern to skip (repeatable)")
|
|
31
31
|
s.add_argument("--include-vendored", action="store_true", help="also scan node_modules, vendor, venv and build folders")
|
|
32
32
|
s.add_argument("--fail-on", choices=SEVERITIES[:-1], help="exit with code 1 if any issue is this severe or worse (for CI)")
|
|
@@ -45,6 +45,16 @@ def _parser() -> argparse.ArgumentParser:
|
|
|
45
45
|
help="exit with code 1 if your project's release gate fails (e.g. new RSA or ECC was added)")
|
|
46
46
|
u.add_argument("--dry-run", action="store_true", help="print exactly what would be sent, and send nothing")
|
|
47
47
|
|
|
48
|
+
im = sub.add_parser("import", help="turn a CBOM from another tool (IBM CBOMkit, cdxgen…) into Cbomly reports")
|
|
49
|
+
im.add_argument("file", help="CycloneDX 1.6+ JSON file with cryptographic-asset components")
|
|
50
|
+
im.add_argument("-r", "--rules", default="baseline", help="rule pack(s), comma-separated (default: baseline)")
|
|
51
|
+
im.add_argument("--rules-dir", action="append", default=[], help="extra folder of .toml rule packs")
|
|
52
|
+
im.add_argument("-o", "--out", default="cbomly-out", help="output folder (default: ./cbomly-out)")
|
|
53
|
+
im.add_argument("--name", help="product name to put in the reports (default: from the CBOM)")
|
|
54
|
+
im.add_argument("--fail-on", choices=SEVERITIES[:-1], help="exit with code 1 if any issue is this severe or worse")
|
|
55
|
+
im.add_argument("-q", "--quiet", action="store_true")
|
|
56
|
+
im.add_argument("--no-color", action="store_true")
|
|
57
|
+
|
|
48
58
|
sub.add_parser("doctor", help="check that helper tools are installed")
|
|
49
59
|
return p
|
|
50
60
|
|
|
@@ -73,7 +83,7 @@ def cmd_scan(a) -> int:
|
|
|
73
83
|
sb = None
|
|
74
84
|
tool_versions = {}
|
|
75
85
|
if not a.no_sbom:
|
|
76
|
-
syft = sbom.
|
|
86
|
+
syft = sbom.ensure_syft(a.syft, log)
|
|
77
87
|
if not syft:
|
|
78
88
|
log(sbom.INSTALL_HINT)
|
|
79
89
|
notes.append("Syft was not installed, so no software list (SBOM) was produced.")
|
|
@@ -88,6 +98,11 @@ def cmd_scan(a) -> int:
|
|
|
88
98
|
log(f" Syft failed: {e}")
|
|
89
99
|
notes.append(f"Syft failed, so no software list (SBOM) was produced: {str(e)[:200]}")
|
|
90
100
|
|
|
101
|
+
return write_outputs(a, name, packs, findings, sb, stats, notes, tool_versions)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def write_outputs(a, name, packs, findings, sb, stats, notes, tool_versions, source=None) -> int:
|
|
105
|
+
"""Shared by `scan` and `import`: evaluate rules, write the three output files, print the summary."""
|
|
91
106
|
libs = deps.crypto_libraries(sb)
|
|
92
107
|
ev = rules.evaluate(packs, findings, sb)
|
|
93
108
|
bom = cbom.build(findings, sb, name, libs, tool_versions, stats.services)
|
|
@@ -95,13 +110,17 @@ def cmd_scan(a) -> int:
|
|
|
95
110
|
|
|
96
111
|
out = Path(a.out)
|
|
97
112
|
out.mkdir(parents=True, exist_ok=True)
|
|
98
|
-
(out / "cbom.cdx.json").write_text(json.dumps(bom, indent=2) + "\n")
|
|
99
|
-
|
|
100
|
-
(out / "
|
|
113
|
+
(out / "cbom.cdx.json").write_text(json.dumps(bom, indent=2) + "\n", encoding="utf-8")
|
|
114
|
+
summary = report.markdown(name, findings, ev, libs, n_sw, notes, stats.services)
|
|
115
|
+
(out / "summary.md").write_text(summary, encoding="utf-8")
|
|
116
|
+
doc = results_doc(name, findings, ev, libs, n_sw, stats)
|
|
117
|
+
doc["source"] = source or {"type": "scan"}
|
|
118
|
+
(out / "findings.json").write_text(json.dumps(doc, indent=2) + "\n", encoding="utf-8")
|
|
101
119
|
|
|
102
120
|
if not a.quiet:
|
|
103
121
|
color = sys.stdout.isatty() and not a.no_color and not os.environ.get("NO_COLOR")
|
|
104
|
-
|
|
122
|
+
title = "Cbomly import complete" if source and source.get("type") == "import" else "Cbomly scan complete"
|
|
123
|
+
print(report.terminal(findings, ev, str(out), color, title))
|
|
105
124
|
|
|
106
125
|
if a.fail_on:
|
|
107
126
|
worst = ev.worst_severity()
|
|
@@ -110,6 +129,33 @@ def cmd_scan(a) -> int:
|
|
|
110
129
|
return 0
|
|
111
130
|
|
|
112
131
|
|
|
132
|
+
def cmd_import(a) -> int:
|
|
133
|
+
from . import importer
|
|
134
|
+
|
|
135
|
+
try:
|
|
136
|
+
packs = rules.resolve([x.strip() for x in a.rules.split(",") if x.strip()], a.rules_dir)
|
|
137
|
+
findings, sb, info = importer.load(a.file)
|
|
138
|
+
except ValueError as e:
|
|
139
|
+
print(f"cbomly: {e}", file=sys.stderr)
|
|
140
|
+
return 2
|
|
141
|
+
if not info["crypto_assets"]:
|
|
142
|
+
print(f"cbomly: {a.file} has no cryptographic-asset components, so it is an SBOM, not a CBOM.", file=sys.stderr)
|
|
143
|
+
return 2
|
|
144
|
+
log = (lambda *m: None) if a.quiet else (lambda *m: print(*m, file=sys.stderr))
|
|
145
|
+
made_by = ", ".join(info["tools"]) or "an unknown tool"
|
|
146
|
+
log(f"Imported {info['crypto_assets']} crypto assets from {a.file} (made by {made_by}).")
|
|
147
|
+
notes = [f"Imported from a CycloneDX {info['spec']} CBOM made by {made_by}; Cbomly did not scan the code itself."]
|
|
148
|
+
if info["unrecognised"]:
|
|
149
|
+
names = ", ".join(sorted(set(info["unrecognised"]))[:10])
|
|
150
|
+
notes.append(f"{len(info['unrecognised'])} crypto asset(s) were not recognised and are left out: {names}.")
|
|
151
|
+
log(f" Not recognised: {names}")
|
|
152
|
+
name = a.name or info["name"] or Path(a.file).stem
|
|
153
|
+
stats = scanner.ScanStats()
|
|
154
|
+
source = {"type": "import", "file": Path(a.file).name, "spec": info["spec"], "tools": info["tools"],
|
|
155
|
+
"unrecognised": len(info["unrecognised"])}
|
|
156
|
+
return write_outputs(a, name, packs, findings, sb, stats, notes, {}, source)
|
|
157
|
+
|
|
158
|
+
|
|
113
159
|
def results_doc(name, findings, ev, libs, n_sw, stats) -> dict:
|
|
114
160
|
"""findings.json: everything the reports need, so `cbomly upload` never has to re-scan."""
|
|
115
161
|
def fd(f):
|
|
@@ -176,15 +222,23 @@ def cmd_doctor(_a) -> int:
|
|
|
176
222
|
print(f"python {sys.version.split()[0]}")
|
|
177
223
|
if syft:
|
|
178
224
|
print(f"syft {sbom.syft_version(syft) or 'found'} ({syft})")
|
|
225
|
+
elif not sbom.syft_fetch.disabled():
|
|
226
|
+
print(f"syft not installed; `cbomly scan` downloads Syft {sbom.syft_fetch.SYFT_VERSION} on first use")
|
|
227
|
+
return 0
|
|
179
228
|
else:
|
|
180
|
-
print("syft NOT FOUND")
|
|
229
|
+
print("syft NOT FOUND (CBOMLY_NO_SYFT is set, so it won't be downloaded)")
|
|
181
230
|
print(sbom.INSTALL_HINT)
|
|
182
231
|
return 0 if syft else 1
|
|
183
232
|
|
|
184
233
|
|
|
185
234
|
def main(argv: list[str] | None = None) -> int:
|
|
235
|
+
# Windows consoles and redirects may use a legacy code page (cp1252): never crash on a symbol.
|
|
236
|
+
for stream in (sys.stdout, sys.stderr):
|
|
237
|
+
if hasattr(stream, "reconfigure"):
|
|
238
|
+
stream.reconfigure(errors="replace")
|
|
186
239
|
a = _parser().parse_args(argv)
|
|
187
|
-
return {"scan": cmd_scan, "
|
|
240
|
+
return {"scan": cmd_scan, "import": cmd_import, "rules": cmd_rules, "doctor": cmd_doctor,
|
|
241
|
+
"upload": cmd_upload}[a.cmd](a)
|
|
188
242
|
|
|
189
243
|
|
|
190
244
|
if __name__ == "__main__":
|