cbomly 0.2.0__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/LICENSE +202 -0
- cbomly-0.2.0/NOTICE +4 -0
- cbomly-0.2.0/PKG-INFO +202 -0
- cbomly-0.2.0/README.md +176 -0
- cbomly-0.2.0/pyproject.toml +46 -0
- cbomly-0.2.0/setup.cfg +4 -0
- cbomly-0.2.0/src/cbomly/__init__.py +3 -0
- cbomly-0.2.0/src/cbomly/__main__.py +5 -0
- cbomly-0.2.0/src/cbomly/algorithms.py +218 -0
- cbomly-0.2.0/src/cbomly/cbom.py +216 -0
- cbomly-0.2.0/src/cbomly/cbom_names.py +35 -0
- cbomly-0.2.0/src/cbomly/cli.py +191 -0
- cbomly-0.2.0/src/cbomly/detect/__init__.py +1 -0
- cbomly-0.2.0/src/cbomly/detect/deps.py +81 -0
- cbomly-0.2.0/src/cbomly/detect/keys.py +319 -0
- cbomly-0.2.0/src/cbomly/detect/services.py +69 -0
- cbomly-0.2.0/src/cbomly/detect/source.py +358 -0
- cbomly-0.2.0/src/cbomly/findings.py +29 -0
- cbomly-0.2.0/src/cbomly/inventory.py +150 -0
- cbomly-0.2.0/src/cbomly/packs/au.toml +45 -0
- cbomly-0.2.0/src/cbomly/packs/baseline.toml +110 -0
- cbomly-0.2.0/src/cbomly/packs/ca.toml +61 -0
- cbomly-0.2.0/src/cbomly/packs/eu.toml +117 -0
- cbomly-0.2.0/src/cbomly/packs/india.toml +102 -0
- cbomly-0.2.0/src/cbomly/packs/jp.toml +44 -0
- cbomly-0.2.0/src/cbomly/packs/pci-dss.toml +55 -0
- cbomly-0.2.0/src/cbomly/packs/sg.toml +45 -0
- cbomly-0.2.0/src/cbomly/packs/uk.toml +47 -0
- cbomly-0.2.0/src/cbomly/packs/us-cnsa2.toml +97 -0
- cbomly-0.2.0/src/cbomly/packs/us-fda.toml +63 -0
- cbomly-0.2.0/src/cbomly/packs/us.toml +145 -0
- cbomly-0.2.0/src/cbomly/report.py +188 -0
- cbomly-0.2.0/src/cbomly/rules.py +235 -0
- cbomly-0.2.0/src/cbomly/sbom.py +54 -0
- cbomly-0.2.0/src/cbomly/scanner.py +77 -0
- cbomly-0.2.0/src/cbomly/upload.py +96 -0
- cbomly-0.2.0/src/cbomly.egg-info/PKG-INFO +202 -0
- cbomly-0.2.0/src/cbomly.egg-info/SOURCES.txt +45 -0
- cbomly-0.2.0/src/cbomly.egg-info/dependency_links.txt +1 -0
- cbomly-0.2.0/src/cbomly.egg-info/entry_points.txt +2 -0
- cbomly-0.2.0/src/cbomly.egg-info/requires.txt +5 -0
- cbomly-0.2.0/src/cbomly.egg-info/top_level.txt +1 -0
- cbomly-0.2.0/tests/test_cli.py +56 -0
- cbomly-0.2.0/tests/test_keys.py +51 -0
- cbomly-0.2.0/tests/test_rules.py +74 -0
- cbomly-0.2.0/tests/test_source.py +55 -0
- cbomly-0.2.0/tests/test_upload.py +15 -0
cbomly-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
cbomly-0.2.0/NOTICE
ADDED
cbomly-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cbomly
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Find the cryptography in your software, write a CycloneDX CBOM, and check it is quantum-safe.
|
|
5
|
+
Author-email: Cbomly <team@cbomly.com>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://cbomly.com
|
|
8
|
+
Project-URL: Source, https://github.com/Cbomly/cbomly-scanner
|
|
9
|
+
Project-URL: Issues, https://github.com/Cbomly/cbomly-scanner/issues
|
|
10
|
+
Keywords: cbom,sbom,cyclonedx,post-quantum,pqc,cryptography,cert-in,compliance
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
+
Classifier: Operating System :: MacOS
|
|
14
|
+
Classifier: Topic :: Security :: Cryptography
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
License-File: NOTICE
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
23
|
+
Requires-Dist: jsonschema>=4.21; extra == "dev"
|
|
24
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# Cbomly
|
|
28
|
+
|
|
29
|
+
**Find the cryptography in your software, and check it is ready for quantum computers.**
|
|
30
|
+
|
|
31
|
+
Cbomly scans a codebase and writes a **CBOM** (cryptographic bill of materials): a list of every
|
|
32
|
+
algorithm, key and certificate your product uses, with the file and line where it was found. It also
|
|
33
|
+
writes the normal software list (**SBOM**) and a plain-English report that says what a future quantum
|
|
34
|
+
computer would break, and what to replace it with.
|
|
35
|
+
|
|
36
|
+
It runs locally on Linux and macOS. Nothing is uploaded unless you run `cbomly upload` to keep your
|
|
37
|
+
reports in a free dashboard at [app.cbomly.com](https://app.cbomly.com), and even then only findings are
|
|
38
|
+
sent, never source code.
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
$ cbomly scan ./my-product --rules india
|
|
42
|
+
|
|
43
|
+
Cbomly scan complete
|
|
44
|
+
|
|
45
|
+
14 quantum-vulnerable algorithm(s) 0 weakened 2 quantum-safe
|
|
46
|
+
37 crypto use(s) in 13 file(s)
|
|
47
|
+
|
|
48
|
+
● ECDSA (SHA-256) svc/Signer.java:14
|
|
49
|
+
● RSA-2048 certs/server.crt:1 (+4 more)
|
|
50
|
+
...
|
|
51
|
+
[CRITICAL] BASE-K-001: Private key stored in the codebase
|
|
52
|
+
[HIGH ] IN-PQC-002: Quantum-vulnerable digital signatures (first in line for migration)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Why this matters
|
|
56
|
+
|
|
57
|
+
Large quantum computers will break RSA, elliptic-curve cryptography (ECDSA, ECDH, Ed25519, X25519),
|
|
58
|
+
DSA and Diffie-Hellman. Governments are setting deadlines to move to the new NIST post-quantum
|
|
59
|
+
standards (ML-KEM, ML-DSA, SLH-DSA), and buyers are starting to ask their software suppliers for a
|
|
60
|
+
CBOM and a migration plan:
|
|
61
|
+
|
|
62
|
+
- **US:** NIST IR 8547 (Oct 2026) deprecates RSA and elliptic curves after 2030 and disallows them
|
|
63
|
+
after 2035; EO 14412 sets federal PQC key exchange by end of 2030 and signatures by end of 2031;
|
|
64
|
+
NSA's CNSA 2.0 sets 2030-2033 deadlines for national security systems; EO 14028 and FDA section
|
|
65
|
+
524B ask for SBOMs.
|
|
66
|
+
- **EU:** the Cyber Resilience Act requires an SBOM from 11 December 2027 (reporting since
|
|
67
|
+
11 September 2026); the EU PQC roadmap says start by end of 2026 and finish high-risk uses by 2030.
|
|
68
|
+
- **UK, Canada, Australia, Singapore, Japan:** national PQC timelines between 2030 (Australia) and
|
|
69
|
+
2035, each starting with a cryptographic inventory.
|
|
70
|
+
- **India:** CERT-In's BOM guidelines v2.0 (July 2025) define SBOM and CBOM; SEBI's CSCRF (Aug 2024)
|
|
71
|
+
requires regulated entities to obtain SBOMs; the DST post-quantum roadmap (Feb 2026) asks vendors
|
|
72
|
+
for CBOMs from FY 2027-28.
|
|
73
|
+
- **Payments:** PCI DSS v4.0.1 requires a yearly reviewed inventory of cipher suites, keys and
|
|
74
|
+
certificates (since 31 March 2025).
|
|
75
|
+
|
|
76
|
+
## Install
|
|
77
|
+
|
|
78
|
+
Cbomly needs Python 3.11 or newer. [Syft](https://github.com/anchore/syft) is optional but recommended:
|
|
79
|
+
it builds the software list.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# macOS
|
|
83
|
+
brew install pipx syft
|
|
84
|
+
pipx install cbomly
|
|
85
|
+
|
|
86
|
+
# Linux
|
|
87
|
+
python3 -m pip install --user pipx
|
|
88
|
+
pipx install cbomly
|
|
89
|
+
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b ~/.local/bin
|
|
90
|
+
|
|
91
|
+
cbomly doctor # checks everything is in place
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Use
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
cbomly scan # scan the current folder with the baseline rules
|
|
98
|
+
cbomly scan ./src --rules india # use the India rule pack (includes baseline)
|
|
99
|
+
cbomly scan . --fail-on high # exit code 1 if anything high or critical is found (for CI)
|
|
100
|
+
cbomly scan . --exclude 'testdata' # skip folders or files by name pattern
|
|
101
|
+
cbomly rules # list rule packs
|
|
102
|
+
cbomly rules india # show the rules in a pack
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Output goes to `./cbomly-out/`:
|
|
106
|
+
|
|
107
|
+
| File | What it is |
|
|
108
|
+
|---|---|
|
|
109
|
+
| `cbom.cdx.json` | CycloneDX 1.6 BOM: the software components from Syft, one `cryptographic-asset` per algorithm, key, certificate and protocol (each with file and line evidence and a `cbomly:status`), and crypto services (KMS, HSM, CA) under `services` |
|
|
110
|
+
| `summary.md` | The readable report: what is quantum-vulnerable, where, what to do, the full crypto inventory, and vendors |
|
|
111
|
+
| `findings.json` | Findings, rule results, inventory and vendors, for scripts and `cbomly upload` |
|
|
112
|
+
|
|
113
|
+
## Dashboard and CI
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
export CBOMLY_API_KEY=cbk_... # from your project page on app.cbomly.com
|
|
117
|
+
cbomly upload # sends ./cbomly-out (findings only; code snippets removed)
|
|
118
|
+
cbomly upload --dry-run # prints exactly what would be sent
|
|
119
|
+
cbomly upload --gate # exit code 1 if the project's release gate fails (Pro)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
GitHub Actions:
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
- uses: actions/checkout@v4
|
|
126
|
+
- uses: Cbomly/cbomly-scanner@v0
|
|
127
|
+
with:
|
|
128
|
+
api-key: ${{ secrets.CBOMLY_API_KEY }}
|
|
129
|
+
rules: india
|
|
130
|
+
gate: true
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
GitLab CI: include [`ci/gitlab/cbomly.yml`](ci/gitlab/cbomly.yml) and extend `.cbomly`.
|
|
134
|
+
|
|
135
|
+
Free accounts get a basic report for every scan. Pro adds the signed compliance pack, the upgrade plan,
|
|
136
|
+
the trend view, alerts for new RSA/ECC and the release gate.
|
|
137
|
+
|
|
138
|
+
## What it detects
|
|
139
|
+
|
|
140
|
+
| Where | How |
|
|
141
|
+
|---|---|
|
|
142
|
+
| Source code: Python, Java/Kotlin, Go, JavaScript/TypeScript, C/C++, C#, Ruby, PHP, Rust, Swift | Known crypto API calls (e.g. `KeyPairGenerator.getInstance("RSA")`, `rsa.generate_private_key`, `crypto.subtle`, OpenSSL `EVP_*`), including key sizes and curves where written in the code |
|
|
143
|
+
| Config files: nginx/Apache, YAML, TOML, properties, JSON | TLS versions, cipher suites, JWT algorithms (`RS256`, `ES256`) |
|
|
144
|
+
| Keys and certificates: PEM, DER, SSH keys | Algorithm, key size, curve, signature hash, subject and validity dates. Private keys are flagged as leaks |
|
|
145
|
+
| Dependencies (via Syft) | Crypto libraries such as OpenSSL, Bouncy Castle and Go's standard library, and whether the version supports post-quantum algorithms |
|
|
146
|
+
| Post-quantum use | ML-KEM, ML-DSA, SLH-DSA and hybrid X25519MLKEM768 are recognised and reported as good news |
|
|
147
|
+
| Third-party crypto services | AWS KMS, CloudHSM, Certificate Manager and Secrets Manager, Google Cloud KMS and Secret Manager, Azure Key Vault, HashiCorp Vault, Thales Luna, YubiHSM, Fortanix, PKCS#11 HSMs, Let's Encrypt and eMudhra, listed as vendors |
|
|
148
|
+
| Safe crypto | AES (with key size and mode), ChaCha20-Poly1305, SHA-2, SHA-3, BLAKE2, HMAC, key derivation (PBKDF2, HKDF, scrypt, Argon2, bcrypt) and secure random number generators. Listed in the CBOM and marked quantum-safe, so the inventory is complete. AES-128 is marked "weakened by quantum" |
|
|
149
|
+
|
|
150
|
+
Every algorithm, certificate, key and protocol gets one status: **broken**, **deprecated**,
|
|
151
|
+
**quantum-vulnerable**, **weakened** (by quantum attacks, e.g. AES-128) or **safe**. Certificates also
|
|
152
|
+
show issuer, public key, signature and expiry. Keys show size or curve. The **Vendors** section lists
|
|
153
|
+
who supplies or controls your crypto: library makers, certificate issuers, and key management services.
|
|
154
|
+
|
|
155
|
+
Detection is pattern-based, so it is fast and needs no build, but it can miss crypto hidden inside
|
|
156
|
+
compiled binaries or wrapper functions, and it can report false positives. Findings carry a
|
|
157
|
+
confidence level (high, medium, low).
|
|
158
|
+
|
|
159
|
+
## Rule packs
|
|
160
|
+
|
|
161
|
+
The scanner itself is country-neutral. Requirements live in small TOML files called rule packs, so
|
|
162
|
+
a new country or standard is a new file, not new code. Built-in packs:
|
|
163
|
+
|
|
164
|
+
| Pack | Status | Covers |
|
|
165
|
+
|---|---|---|
|
|
166
|
+
| `baseline` | stable | Quantum-vulnerable crypto, broken and deprecated algorithms, short RSA keys, committed private keys, expired certificates |
|
|
167
|
+
| `us` | draft | NIST IR 8547, EO 14412 / OMB M-26-15, CISA PQC product categories, EO 14028 and NTIA SBOM |
|
|
168
|
+
| `us-cnsa2` | draft | NSA CNSA 2.0 and CNSSP 15 for national security systems (includes `us`) |
|
|
169
|
+
| `us-fda` | draft | FD&C Act section 524B SBOM and FDA premarket cybersecurity guidance (medical devices) |
|
|
170
|
+
| `eu` | draft | Cyber Resilience Act SBOM and crypto, EU PQC roadmap, NIS2, DORA |
|
|
171
|
+
| `uk` | draft | NCSC PQC migration timelines (2028 / 2031 / 2035) |
|
|
172
|
+
| `ca` | draft | Government of Canada PQC roadmap and TBS SPIN, OSFI quantum readiness |
|
|
173
|
+
| `au` | draft | ASD ISM: stop traditional asymmetric crypto by end of 2030 |
|
|
174
|
+
| `sg` | draft | MAS quantum advisory and proposed 2030 / 2034 migration timelines |
|
|
175
|
+
| `jp` | draft | National Cybersecurity Office 2035 target, FSA guidance for banks |
|
|
176
|
+
| `india` | draft | CERT-In BOM guidelines (SBOM + CBOM), SEBI CSCRF, DST post-quantum roadmap milestones |
|
|
177
|
+
| `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
|
+
|
|
179
|
+
Combine packs for the markets you sell to, e.g. `--rules eu,us,india`.
|
|
180
|
+
|
|
181
|
+
See [docs/rule-packs.md](docs/rule-packs.md) to write your own and load it with `--rules-dir`.
|
|
182
|
+
|
|
183
|
+
The regional packs are marked **draft**: each reference says how far its summary was checked
|
|
184
|
+
against the official documents, and anything not confirmed is labelled UNVERIFIED or NOT re-checked. The reports are informational, not legal advice.
|
|
185
|
+
|
|
186
|
+
## Development
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
python3 -m venv .venv && . .venv/bin/activate
|
|
190
|
+
pip install -e ".[dev]" "cyclonedx-python-lib[json-validation]"
|
|
191
|
+
pytest
|
|
192
|
+
ruff check src tests
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Every key and certificate under `tests/fixtures/` is a throwaway test fixture.
|
|
196
|
+
|
|
197
|
+
Contributions are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md). To report a security problem,
|
|
198
|
+
see [SECURITY.md](SECURITY.md).
|
|
199
|
+
|
|
200
|
+
## Licence
|
|
201
|
+
|
|
202
|
+
Apache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
cbomly-0.2.0/README.md
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Cbomly
|
|
2
|
+
|
|
3
|
+
**Find the cryptography in your software, and check it is ready for quantum computers.**
|
|
4
|
+
|
|
5
|
+
Cbomly scans a codebase and writes a **CBOM** (cryptographic bill of materials): a list of every
|
|
6
|
+
algorithm, key and certificate your product uses, with the file and line where it was found. It also
|
|
7
|
+
writes the normal software list (**SBOM**) and a plain-English report that says what a future quantum
|
|
8
|
+
computer would break, and what to replace it with.
|
|
9
|
+
|
|
10
|
+
It runs locally on Linux and macOS. Nothing is uploaded unless you run `cbomly upload` to keep your
|
|
11
|
+
reports in a free dashboard at [app.cbomly.com](https://app.cbomly.com), and even then only findings are
|
|
12
|
+
sent, never source code.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
$ cbomly scan ./my-product --rules india
|
|
16
|
+
|
|
17
|
+
Cbomly scan complete
|
|
18
|
+
|
|
19
|
+
14 quantum-vulnerable algorithm(s) 0 weakened 2 quantum-safe
|
|
20
|
+
37 crypto use(s) in 13 file(s)
|
|
21
|
+
|
|
22
|
+
● ECDSA (SHA-256) svc/Signer.java:14
|
|
23
|
+
● RSA-2048 certs/server.crt:1 (+4 more)
|
|
24
|
+
...
|
|
25
|
+
[CRITICAL] BASE-K-001: Private key stored in the codebase
|
|
26
|
+
[HIGH ] IN-PQC-002: Quantum-vulnerable digital signatures (first in line for migration)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Why this matters
|
|
30
|
+
|
|
31
|
+
Large quantum computers will break RSA, elliptic-curve cryptography (ECDSA, ECDH, Ed25519, X25519),
|
|
32
|
+
DSA and Diffie-Hellman. Governments are setting deadlines to move to the new NIST post-quantum
|
|
33
|
+
standards (ML-KEM, ML-DSA, SLH-DSA), and buyers are starting to ask their software suppliers for a
|
|
34
|
+
CBOM and a migration plan:
|
|
35
|
+
|
|
36
|
+
- **US:** NIST IR 8547 (Oct 2026) deprecates RSA and elliptic curves after 2030 and disallows them
|
|
37
|
+
after 2035; EO 14412 sets federal PQC key exchange by end of 2030 and signatures by end of 2031;
|
|
38
|
+
NSA's CNSA 2.0 sets 2030-2033 deadlines for national security systems; EO 14028 and FDA section
|
|
39
|
+
524B ask for SBOMs.
|
|
40
|
+
- **EU:** the Cyber Resilience Act requires an SBOM from 11 December 2027 (reporting since
|
|
41
|
+
11 September 2026); the EU PQC roadmap says start by end of 2026 and finish high-risk uses by 2030.
|
|
42
|
+
- **UK, Canada, Australia, Singapore, Japan:** national PQC timelines between 2030 (Australia) and
|
|
43
|
+
2035, each starting with a cryptographic inventory.
|
|
44
|
+
- **India:** CERT-In's BOM guidelines v2.0 (July 2025) define SBOM and CBOM; SEBI's CSCRF (Aug 2024)
|
|
45
|
+
requires regulated entities to obtain SBOMs; the DST post-quantum roadmap (Feb 2026) asks vendors
|
|
46
|
+
for CBOMs from FY 2027-28.
|
|
47
|
+
- **Payments:** PCI DSS v4.0.1 requires a yearly reviewed inventory of cipher suites, keys and
|
|
48
|
+
certificates (since 31 March 2025).
|
|
49
|
+
|
|
50
|
+
## Install
|
|
51
|
+
|
|
52
|
+
Cbomly needs Python 3.11 or newer. [Syft](https://github.com/anchore/syft) is optional but recommended:
|
|
53
|
+
it builds the software list.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# macOS
|
|
57
|
+
brew install pipx syft
|
|
58
|
+
pipx install cbomly
|
|
59
|
+
|
|
60
|
+
# Linux
|
|
61
|
+
python3 -m pip install --user pipx
|
|
62
|
+
pipx install cbomly
|
|
63
|
+
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b ~/.local/bin
|
|
64
|
+
|
|
65
|
+
cbomly doctor # checks everything is in place
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Use
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
cbomly scan # scan the current folder with the baseline rules
|
|
72
|
+
cbomly scan ./src --rules india # use the India rule pack (includes baseline)
|
|
73
|
+
cbomly scan . --fail-on high # exit code 1 if anything high or critical is found (for CI)
|
|
74
|
+
cbomly scan . --exclude 'testdata' # skip folders or files by name pattern
|
|
75
|
+
cbomly rules # list rule packs
|
|
76
|
+
cbomly rules india # show the rules in a pack
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Output goes to `./cbomly-out/`:
|
|
80
|
+
|
|
81
|
+
| File | What it is |
|
|
82
|
+
|---|---|
|
|
83
|
+
| `cbom.cdx.json` | CycloneDX 1.6 BOM: the software components from Syft, one `cryptographic-asset` per algorithm, key, certificate and protocol (each with file and line evidence and a `cbomly:status`), and crypto services (KMS, HSM, CA) under `services` |
|
|
84
|
+
| `summary.md` | The readable report: what is quantum-vulnerable, where, what to do, the full crypto inventory, and vendors |
|
|
85
|
+
| `findings.json` | Findings, rule results, inventory and vendors, for scripts and `cbomly upload` |
|
|
86
|
+
|
|
87
|
+
## Dashboard and CI
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
export CBOMLY_API_KEY=cbk_... # from your project page on app.cbomly.com
|
|
91
|
+
cbomly upload # sends ./cbomly-out (findings only; code snippets removed)
|
|
92
|
+
cbomly upload --dry-run # prints exactly what would be sent
|
|
93
|
+
cbomly upload --gate # exit code 1 if the project's release gate fails (Pro)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
GitHub Actions:
|
|
97
|
+
|
|
98
|
+
```yaml
|
|
99
|
+
- uses: actions/checkout@v4
|
|
100
|
+
- uses: Cbomly/cbomly-scanner@v0
|
|
101
|
+
with:
|
|
102
|
+
api-key: ${{ secrets.CBOMLY_API_KEY }}
|
|
103
|
+
rules: india
|
|
104
|
+
gate: true
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
GitLab CI: include [`ci/gitlab/cbomly.yml`](ci/gitlab/cbomly.yml) and extend `.cbomly`.
|
|
108
|
+
|
|
109
|
+
Free accounts get a basic report for every scan. Pro adds the signed compliance pack, the upgrade plan,
|
|
110
|
+
the trend view, alerts for new RSA/ECC and the release gate.
|
|
111
|
+
|
|
112
|
+
## What it detects
|
|
113
|
+
|
|
114
|
+
| Where | How |
|
|
115
|
+
|---|---|
|
|
116
|
+
| Source code: Python, Java/Kotlin, Go, JavaScript/TypeScript, C/C++, C#, Ruby, PHP, Rust, Swift | Known crypto API calls (e.g. `KeyPairGenerator.getInstance("RSA")`, `rsa.generate_private_key`, `crypto.subtle`, OpenSSL `EVP_*`), including key sizes and curves where written in the code |
|
|
117
|
+
| Config files: nginx/Apache, YAML, TOML, properties, JSON | TLS versions, cipher suites, JWT algorithms (`RS256`, `ES256`) |
|
|
118
|
+
| Keys and certificates: PEM, DER, SSH keys | Algorithm, key size, curve, signature hash, subject and validity dates. Private keys are flagged as leaks |
|
|
119
|
+
| Dependencies (via Syft) | Crypto libraries such as OpenSSL, Bouncy Castle and Go's standard library, and whether the version supports post-quantum algorithms |
|
|
120
|
+
| Post-quantum use | ML-KEM, ML-DSA, SLH-DSA and hybrid X25519MLKEM768 are recognised and reported as good news |
|
|
121
|
+
| Third-party crypto services | AWS KMS, CloudHSM, Certificate Manager and Secrets Manager, Google Cloud KMS and Secret Manager, Azure Key Vault, HashiCorp Vault, Thales Luna, YubiHSM, Fortanix, PKCS#11 HSMs, Let's Encrypt and eMudhra, listed as vendors |
|
|
122
|
+
| Safe crypto | AES (with key size and mode), ChaCha20-Poly1305, SHA-2, SHA-3, BLAKE2, HMAC, key derivation (PBKDF2, HKDF, scrypt, Argon2, bcrypt) and secure random number generators. Listed in the CBOM and marked quantum-safe, so the inventory is complete. AES-128 is marked "weakened by quantum" |
|
|
123
|
+
|
|
124
|
+
Every algorithm, certificate, key and protocol gets one status: **broken**, **deprecated**,
|
|
125
|
+
**quantum-vulnerable**, **weakened** (by quantum attacks, e.g. AES-128) or **safe**. Certificates also
|
|
126
|
+
show issuer, public key, signature and expiry. Keys show size or curve. The **Vendors** section lists
|
|
127
|
+
who supplies or controls your crypto: library makers, certificate issuers, and key management services.
|
|
128
|
+
|
|
129
|
+
Detection is pattern-based, so it is fast and needs no build, but it can miss crypto hidden inside
|
|
130
|
+
compiled binaries or wrapper functions, and it can report false positives. Findings carry a
|
|
131
|
+
confidence level (high, medium, low).
|
|
132
|
+
|
|
133
|
+
## Rule packs
|
|
134
|
+
|
|
135
|
+
The scanner itself is country-neutral. Requirements live in small TOML files called rule packs, so
|
|
136
|
+
a new country or standard is a new file, not new code. Built-in packs:
|
|
137
|
+
|
|
138
|
+
| Pack | Status | Covers |
|
|
139
|
+
|---|---|---|
|
|
140
|
+
| `baseline` | stable | Quantum-vulnerable crypto, broken and deprecated algorithms, short RSA keys, committed private keys, expired certificates |
|
|
141
|
+
| `us` | draft | NIST IR 8547, EO 14412 / OMB M-26-15, CISA PQC product categories, EO 14028 and NTIA SBOM |
|
|
142
|
+
| `us-cnsa2` | draft | NSA CNSA 2.0 and CNSSP 15 for national security systems (includes `us`) |
|
|
143
|
+
| `us-fda` | draft | FD&C Act section 524B SBOM and FDA premarket cybersecurity guidance (medical devices) |
|
|
144
|
+
| `eu` | draft | Cyber Resilience Act SBOM and crypto, EU PQC roadmap, NIS2, DORA |
|
|
145
|
+
| `uk` | draft | NCSC PQC migration timelines (2028 / 2031 / 2035) |
|
|
146
|
+
| `ca` | draft | Government of Canada PQC roadmap and TBS SPIN, OSFI quantum readiness |
|
|
147
|
+
| `au` | draft | ASD ISM: stop traditional asymmetric crypto by end of 2030 |
|
|
148
|
+
| `sg` | draft | MAS quantum advisory and proposed 2030 / 2034 migration timelines |
|
|
149
|
+
| `jp` | draft | National Cybersecurity Office 2035 target, FSA guidance for banks |
|
|
150
|
+
| `india` | draft | CERT-In BOM guidelines (SBOM + CBOM), SEBI CSCRF, DST post-quantum roadmap milestones |
|
|
151
|
+
| `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
|
+
|
|
153
|
+
Combine packs for the markets you sell to, e.g. `--rules eu,us,india`.
|
|
154
|
+
|
|
155
|
+
See [docs/rule-packs.md](docs/rule-packs.md) to write your own and load it with `--rules-dir`.
|
|
156
|
+
|
|
157
|
+
The regional packs are marked **draft**: each reference says how far its summary was checked
|
|
158
|
+
against the official documents, and anything not confirmed is labelled UNVERIFIED or NOT re-checked. The reports are informational, not legal advice.
|
|
159
|
+
|
|
160
|
+
## Development
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
python3 -m venv .venv && . .venv/bin/activate
|
|
164
|
+
pip install -e ".[dev]" "cyclonedx-python-lib[json-validation]"
|
|
165
|
+
pytest
|
|
166
|
+
ruff check src tests
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Every key and certificate under `tests/fixtures/` is a throwaway test fixture.
|
|
170
|
+
|
|
171
|
+
Contributions are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md). To report a security problem,
|
|
172
|
+
see [SECURITY.md](SECURITY.md).
|
|
173
|
+
|
|
174
|
+
## Licence
|
|
175
|
+
|
|
176
|
+
Apache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "cbomly"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "Find the cryptography in your software, write a CycloneDX CBOM, and check it is quantum-safe."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
authors = [{ name = "Cbomly", email = "team@cbomly.com" }]
|
|
13
|
+
keywords = ["cbom", "sbom", "cyclonedx", "post-quantum", "pqc", "cryptography", "cert-in", "compliance"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Operating System :: POSIX :: Linux",
|
|
17
|
+
"Operating System :: MacOS",
|
|
18
|
+
"Topic :: Security :: Cryptography",
|
|
19
|
+
"Environment :: Console",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
]
|
|
22
|
+
dependencies = []
|
|
23
|
+
|
|
24
|
+
[project.optional-dependencies]
|
|
25
|
+
dev = ["pytest>=8", "jsonschema>=4.21", "ruff>=0.6"]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
cbomly = "cbomly.cli:main"
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://cbomly.com"
|
|
32
|
+
Source = "https://github.com/Cbomly/cbomly-scanner"
|
|
33
|
+
Issues = "https://github.com/Cbomly/cbomly-scanner/issues"
|
|
34
|
+
|
|
35
|
+
[tool.setuptools.packages.find]
|
|
36
|
+
where = ["src"]
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.package-data]
|
|
39
|
+
cbomly = ["packs/*.toml"]
|
|
40
|
+
|
|
41
|
+
[tool.pytest.ini_options]
|
|
42
|
+
testpaths = ["tests"]
|
|
43
|
+
|
|
44
|
+
[tool.ruff]
|
|
45
|
+
line-length = 120
|
|
46
|
+
target-version = "py311"
|
cbomly-0.2.0/setup.cfg
ADDED