cbomctl 0.1.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.
- cbomctl-0.1.0/.gitignore +8 -0
- cbomctl-0.1.0/CHANGELOG.md +67 -0
- cbomctl-0.1.0/LICENSE +202 -0
- cbomctl-0.1.0/PKG-INFO +164 -0
- cbomctl-0.1.0/README.md +139 -0
- cbomctl-0.1.0/articles/README.md +154 -0
- cbomctl-0.1.0/docs/DESIGN.md +392 -0
- cbomctl-0.1.0/docs/ci.md +85 -0
- cbomctl-0.1.0/docs/concepts.md +130 -0
- cbomctl-0.1.0/docs/index.md +56 -0
- cbomctl-0.1.0/docs/policy-packs/anssi-fr.md +74 -0
- cbomctl-0.1.0/docs/policy-packs/asd-au.md +89 -0
- cbomctl-0.1.0/docs/policy-packs/bsi-de.md +87 -0
- cbomctl-0.1.0/docs/policy-packs/cnsa-2.0.md +140 -0
- cbomctl-0.1.0/docs/policy-packs/eu-roadmap.md +83 -0
- cbomctl-0.1.0/docs/policy-packs/index.md +33 -0
- cbomctl-0.1.0/docs/policy-packs/nist-ir8547.md +73 -0
- cbomctl-0.1.0/docs/policy-packs/us-eo14412.md +55 -0
- cbomctl-0.1.0/docs/policy-sources.md +683 -0
- cbomctl-0.1.0/docs/purpose.md +102 -0
- cbomctl-0.1.0/docs/quickstart.md +102 -0
- cbomctl-0.1.0/docs/requirements.txt +4 -0
- cbomctl-0.1.0/docs/roadmap.md +56 -0
- cbomctl-0.1.0/policy-packs/CHANGELOG.md +106 -0
- cbomctl-0.1.0/policy-packs/README.md +142 -0
- cbomctl-0.1.0/policy-packs/packs/anssi-fr.yaml +137 -0
- cbomctl-0.1.0/policy-packs/packs/asd-au.yaml +167 -0
- cbomctl-0.1.0/policy-packs/packs/bsi-de.yaml +165 -0
- cbomctl-0.1.0/policy-packs/packs/cnsa-2.0.yaml +288 -0
- cbomctl-0.1.0/policy-packs/packs/eu-roadmap.yaml +158 -0
- cbomctl-0.1.0/policy-packs/packs/nist-ir8547.yaml +105 -0
- cbomctl-0.1.0/policy-packs/packs/us-eo14412.yaml +105 -0
- cbomctl-0.1.0/policy-packs/schema/pack.schema.json +292 -0
- cbomctl-0.1.0/pyproject.toml +51 -0
- cbomctl-0.1.0/src/cbomctl/__init__.py +0 -0
- cbomctl-0.1.0/src/cbomctl/cli.py +242 -0
- cbomctl-0.1.0/src/cbomctl/config.py +102 -0
- cbomctl-0.1.0/src/cbomctl/loader/__init__.py +25 -0
- cbomctl-0.1.0/src/cbomctl/loader/cyclonedx.py +124 -0
- cbomctl-0.1.0/src/cbomctl/loader/sbom_tools.py +101 -0
- cbomctl-0.1.0/src/cbomctl/models.py +311 -0
- cbomctl-0.1.0/src/cbomctl/normalize/__init__.py +0 -0
- cbomctl-0.1.0/src/cbomctl/normalize/identity.py +165 -0
- cbomctl-0.1.0/src/cbomctl/normalize/oids.py +73 -0
- cbomctl-0.1.0/src/cbomctl/normalize/purpose.py +270 -0
- cbomctl-0.1.0/src/cbomctl/plan.py +121 -0
- cbomctl-0.1.0/src/cbomctl/policy/__init__.py +0 -0
- cbomctl-0.1.0/src/cbomctl/policy/engine.py +209 -0
- cbomctl-0.1.0/src/cbomctl/policy/schema.py +156 -0
- cbomctl-0.1.0/src/cbomctl/report/__init__.py +0 -0
- cbomctl-0.1.0/src/cbomctl/report/json_out.py +79 -0
- cbomctl-0.1.0/src/cbomctl/report/markdown.py +67 -0
- cbomctl-0.1.0/src/cbomctl/report/matrix_text.py +123 -0
- cbomctl-0.1.0/src/cbomctl/report/sarif.py +121 -0
- cbomctl-0.1.0/src/cbomctl/scoring/__init__.py +0 -0
- cbomctl-0.1.0/src/cbomctl/scoring/mosca.py +112 -0
- cbomctl-0.1.0/src/cbomctl/verdict/__init__.py +0 -0
- cbomctl-0.1.0/src/cbomctl/verdict/conflicts.py +249 -0
- cbomctl-0.1.0/src/cbomctl/verdict/matrix.py +145 -0
- cbomctl-0.1.0/tests/fixtures/PROVENANCE.md +13 -0
- cbomctl-0.1.0/tests/fixtures/cbomkit-kafka.json +318 -0
- cbomctl-0.1.0/tests/fixtures/cbomkit-keycloak.json +1777 -0
- cbomctl-0.1.0/tests/fixtures/conflict-hybrid.json +56 -0
- cbomctl-0.1.0/tests/fixtures/packs/synthetic-unverified.yaml +43 -0
- cbomctl-0.1.0/tests/fixtures/rsa-strength-split.json +32 -0
- cbomctl-0.1.0/tests/fixtures/sbom-tools-view.json +45 -0
- cbomctl-0.1.0/tests/fixtures/signatures.cbomctl.yaml +7 -0
- cbomctl-0.1.0/tests/fixtures/signatures.json +29 -0
- cbomctl-0.1.0/tests/fixtures/spec-conformance-1.6.json +109 -0
- cbomctl-0.1.0/tests/test_invariants_sweep.py +81 -0
- cbomctl-0.1.0/tests/test_normalize_purpose.py +136 -0
- cbomctl-0.1.0/tests/test_pack_schema.py +83 -0
- cbomctl-0.1.0/tests/test_policy_engine.py +522 -0
- cbomctl-0.1.0/tests/test_scoring_mosca.py +84 -0
- cbomctl-0.1.0/tests/test_verdict_matrix.py +326 -0
cbomctl-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Semantic versioning. Policy-pack versions move independently — see
|
|
4
|
+
[`policy-packs/CHANGELOG.md`](policy-packs/CHANGELOG.md).
|
|
5
|
+
|
|
6
|
+
## [Unreleased] — 0.1.0
|
|
7
|
+
|
|
8
|
+
First working version. **All seven policy packs are read from primary sources**
|
|
9
|
+
— every rule cites the section or page it came from, names its verifier and
|
|
10
|
+
pins the edition. The `UNVERIFIED POLICY PACK` banner, the `status` field and
|
|
11
|
+
`--require-verified-policy` remain in place for the next rule that has not been
|
|
12
|
+
checked, and are exercised by a synthetic test fixture.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- `cbomctl verdict` — per-asset × jurisdiction matrix plus a conflicts section
|
|
16
|
+
with a computed satisfies-all target. The product.
|
|
17
|
+
- Conflict detection across four kinds: `construction`, `parameter`,
|
|
18
|
+
`deadline`, `scope`.
|
|
19
|
+
- `cbomctl prioritize` — Mosca ranking from user-supplied data lifetimes.
|
|
20
|
+
- `cbomctl plan`, `cbomctl normalize`, `cbomctl policies list|show`.
|
|
21
|
+
- Purpose normalizer with an explicit precedence ladder, keeping `AMBIGUOUS`
|
|
22
|
+
and `UNKNOWN` distinct and never guessing between them.
|
|
23
|
+
- Six policy packs as a standalone, semver-versioned artifact with their own
|
|
24
|
+
JSON schema, consumable without this tool.
|
|
25
|
+
- Reporters: terminal matrix, JSON, Markdown, SARIF 2.1.0.
|
|
26
|
+
- Composite GitHub Action; CI validates fixtures against the official CycloneDX
|
|
27
|
+
schemas and dog-foods the action on the conflict fixture.
|
|
28
|
+
- Optional `--from sbom-tools` adapter, no dependency.
|
|
29
|
+
|
|
30
|
+
### Design decisions worth knowing
|
|
31
|
+
- **`binding` decides FAIL versus WARN, not severity.** A
|
|
32
|
+
`guideline_recommendation` cannot produce FAIL, enforced in code. Most PQC
|
|
33
|
+
guidance is guidance, and reporting it as law misinforms.
|
|
34
|
+
- **`hybrid` is scoped per purpose and is a three-step gradient**:
|
|
35
|
+
`recommended` (BSI, ANSSI, EU) → `not_recommended` but permitted (ASD) →
|
|
36
|
+
`not_permitted_except_interop` (NSA). The middle step leaves a satisfies-all
|
|
37
|
+
target available at a cost; the third removes it, and the conflict output says
|
|
38
|
+
so rather than inventing a compromise.
|
|
39
|
+
- **Urgency and assurance are separate axes.** BSI and ANSSI both recommend
|
|
40
|
+
hybrid *signatures* on algorithm-maturity grounds — ANSSI citing the classical
|
|
41
|
+
break of Rainbow — which is a different argument from
|
|
42
|
+
harvest-now-decrypt-later and reaches purposes HNDL cannot.
|
|
43
|
+
- **Security strength is derived**, so NIST IR 8547's 112-bit 2030 deprecation
|
|
44
|
+
reaches RSA-2048 and P-224 but not RSA-3072 or P-256. Where it cannot be
|
|
45
|
+
derived the finding is indeterminate rather than the stricter date.
|
|
46
|
+
- **Three ways to not answer**: `unscored` (purpose unresolvable),
|
|
47
|
+
`indeterminate` (a rule needs an undeclared fact), `not-applicable`. None is a
|
|
48
|
+
silent pass.
|
|
49
|
+
- **`--strict`** turns every unverified rule into INDETERMINATE, so nothing
|
|
50
|
+
built on stub packs can be mistaken for a real verdict.
|
|
51
|
+
**`--require-verified-policy`** refuses to run at all.
|
|
52
|
+
- **The CNSA 2.0 January 2027 acquisition gate is off by default**
|
|
53
|
+
(`--cnsa-acquisition-gate`): it is a procurement condition on new NSS
|
|
54
|
+
acquisitions, not an algorithm deadline.
|
|
55
|
+
|
|
56
|
+
### Known limits
|
|
57
|
+
- **One rule's encoding is a judgement call, and says so.** The CNSA 2.0 FAQ
|
|
58
|
+
answers the hybrid question twice with different force. The stronger reading
|
|
59
|
+
is encoded, marked `interpretation: contested` with `alt_reading: silent`,
|
|
60
|
+
and any conflict it drives prints both outcomes. The uncontested half of
|
|
61
|
+
NSA's position is a separate rule so the matrix keeps an anchor.
|
|
62
|
+
- The `sbom-tools` adapter's payload shape is inferred from their Rust struct
|
|
63
|
+
definitions, not captured from a run. Its fixture is labelled constructed.
|
|
64
|
+
- cdxgen is unverified as a CBOM producer; a code search of their repository
|
|
65
|
+
finds no `cryptoProperties` handling.
|
|
66
|
+
- `security_level` selectors always evaluate to INDETERMINATE — there is no
|
|
67
|
+
config field for them yet.
|
cbomctl-0.1.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.
|
cbomctl-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: cbomctl
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Evaluate a CycloneDX CBOM against multiple national post-quantum policies and report where their verdicts contradict.
|
|
5
|
+
Project-URL: Homepage, https://github.com/lvlrSajjad/cbomctl
|
|
6
|
+
Project-URL: Issues, https://github.com/lvlrSajjad/cbomctl/issues
|
|
7
|
+
Author: Sadjad Asadi
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: cbom,compliance,cyclonedx,post-quantum,pqc,sbom
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Topic :: Security :: Cryptography
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Requires-Dist: pydantic>=2.7
|
|
17
|
+
Requires-Dist: pyyaml>=6.0
|
|
18
|
+
Requires-Dist: typer>=0.12
|
|
19
|
+
Provides-Extra: llm
|
|
20
|
+
Requires-Dist: anthropic>=0.40; extra == 'llm'
|
|
21
|
+
Provides-Extra: test
|
|
22
|
+
Requires-Dist: jsonschema>=4.21; extra == 'test'
|
|
23
|
+
Requires-Dist: pytest>=8.0; extra == 'test'
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# cbomctl
|
|
27
|
+
|
|
28
|
+
**One CBOM. Every jurisdiction's verdict. And where they contradict.**
|
|
29
|
+
|
|
30
|
+
Germany and France recommend hybrid post-quantum key exchange. Australia
|
|
31
|
+
recommends against it. The NSA wants ML-KEM-1024, not the -768 the others
|
|
32
|
+
accept. If you ship into more than one of those markets, those are not
|
|
33
|
+
independent checkboxes — and no tool will show you the collision.
|
|
34
|
+
|
|
35
|
+
`cbomctl` takes a CBOM from any generator, runs it against several national PQC
|
|
36
|
+
policies at once, and reports the matrix and the conflicts.
|
|
37
|
+
|
|
38
|
+
> ⚠️ **Pre-release.** All seven policy packs have now been read from their
|
|
39
|
+
> primary sources — every rule cites a section or page. Still not compliance
|
|
40
|
+
> advice: read the sources yourself before acting on a verdict.
|
|
41
|
+
> from an unverified rule carries a visible banner naming the packs involved.
|
|
42
|
+
> See [docs/policy-sources.md](docs/policy-sources.md). Not compliance advice.
|
|
43
|
+
|
|
44
|
+
<!-- badges: PyPI, CI, license -->
|
|
45
|
+
|
|
46
|
+
## What it looks like
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
$ cbomctl verdict app-cbom.json --jurisdictions bsi-de,anssi-fr,asd-au,cnsa-2.0
|
|
50
|
+
|
|
51
|
+
ASSET bsi-de anssi-fr asd-au cnsa-2.0
|
|
52
|
+
X25519MLKEM768 (key-agree) PASS PASS WARN FAIL
|
|
53
|
+
ECDH secp256r1 (key-agree) FAIL FAIL FAIL FAIL
|
|
54
|
+
RSA-2048 (ambiguous) INDET INDET INDET INDET
|
|
55
|
+
|
|
56
|
+
CONFLICTS (1)
|
|
57
|
+
c1 X25519MLKEM768 — no single construction satisfies all four.
|
|
58
|
+
bsi-de, anssi-fr hybrid recommended (guideline_recommendation)
|
|
59
|
+
asd-au hybrid not recommended (guideline_recommendation)
|
|
60
|
+
cnsa-2.0 requires ML-KEM-1024 (agency_requirement, NSS only)
|
|
61
|
+
Closest satisfies-all: hybrid X25519 + ML-KEM-1024 — clears bsi-de,
|
|
62
|
+
anssi-fr and cnsa-2.0, at a documented cost under asd-au.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`WARN` rather than `FAIL` for ASD is deliberate: the ISM *recommends against*
|
|
66
|
+
hybrids, it does not prohibit them. Reporting a guideline as a mandate is the
|
|
67
|
+
most common error in this space, so every rule carries a `binding` field —
|
|
68
|
+
`statute`, `executive_order`, `agency_requirement`, `certification_requirement`,
|
|
69
|
+
or `guideline_recommendation` — and the verdict follows from it.
|
|
70
|
+
|
|
71
|
+
`INDET` is the tool declining to guess. That CBOM records `primitive: pke` for
|
|
72
|
+
the RSA key, which cannot distinguish key transport from signature — and the
|
|
73
|
+
answer moves the finding between critical and medium. Rather than pick, it says
|
|
74
|
+
what is missing and what would resolve it.
|
|
75
|
+
|
|
76
|
+
## Related tools
|
|
77
|
+
|
|
78
|
+
Most of what a PQC readiness tool does, other people already do — several of
|
|
79
|
+
them well. Use them.
|
|
80
|
+
|
|
81
|
+
| tool | what it does |
|
|
82
|
+
|---|---|
|
|
83
|
+
| [CBOMkit](https://github.com/cbomkit/cbomkit), [cbomscanner](https://cyclonedx.org/capabilities/cbom/), KeyLens, [pqc-scanner](https://github.com/rauleteee/pqc-scanner) | generate CBOMs from source |
|
|
84
|
+
| [open-quantum-secure](https://github.com/jimbo111/open-quantum-secure) | scans source + live TLS/SSH, generates CBOM, quantum readiness score, `--data-lifetime-years` HNDL weighting, and **seven compliance frameworks** including BSI, ASD ISM and ANSSI |
|
|
85
|
+
| [sbom-tools](https://github.com/sbom-tool/sbom-tools) | CycloneDX/SPDX ingestion, semantic CBOM diff, quality scoring, CNSA 2.0 and NIST IR 8547 validation, SARIF/OSCAL |
|
|
86
|
+
| IBM Quantum Safe Migration Orchestrator, SandboxAQ AQtive Guard, O3 Security | commercial discovery, risk prioritization and migration planning |
|
|
87
|
+
|
|
88
|
+
**`cbomctl` overlaps all of them, and only two things are actually its own:**
|
|
89
|
+
|
|
90
|
+
1. **Conflict as a computed output.** `open-quantum-secure` runs multiple
|
|
91
|
+
frameworks at once and its README documents cross-framework divergence
|
|
92
|
+
directly — this is not a gap in the market, and anyone claiming otherwise
|
|
93
|
+
has not read it. What it emits is one report per framework, concatenated;
|
|
94
|
+
you find the disagreement by comparing them yourself. `cbomctl` emits the
|
|
95
|
+
matrix, a conflict object naming the disagreeing authorities and the reason,
|
|
96
|
+
and a computed satisfies-all target where one exists.
|
|
97
|
+
2. **Evaluating a CBOM you did not generate.** The tools above evaluate their
|
|
98
|
+
own scan. If your CBOM came from a vendor, a procurement process, or a
|
|
99
|
+
different generator, `cbomctl` will read it.
|
|
100
|
+
|
|
101
|
+
If you want a scanner, use `open-quantum-secure`. If you want diff and
|
|
102
|
+
validation, use `sbom-tools`. If you have a CBOM and need to know which
|
|
103
|
+
jurisdiction's answer to believe, that is this tool.
|
|
104
|
+
|
|
105
|
+
## What it does not do
|
|
106
|
+
|
|
107
|
+
- **It does not scan source code or probe endpoints.** Bring a CBOM.
|
|
108
|
+
- **It does not guess.** In CBOMkit's published Keycloak CBOM, 8 of 22
|
|
109
|
+
algorithm components carry no usable purpose signal — more than a third.
|
|
110
|
+
Those are reported as unresolved, with the range they would span if guessed.
|
|
111
|
+
- **It does not give compliance advice.** It reports what a rule set says, with
|
|
112
|
+
the primary source and verification date attached. Every rule today is
|
|
113
|
+
unverified.
|
|
114
|
+
- **It does not treat guidance as law.** See `binding`, above.
|
|
115
|
+
- **It does not know when a CRQC arrives.** 2035 is a planning assumption
|
|
116
|
+
matching the NIST/NSM-10 horizon, not a prediction. `--crqc-year` changes it;
|
|
117
|
+
whatever you choose is stamped into the output.
|
|
118
|
+
- **It does not diff SBOMs, verify signatures, or scan binaries.**
|
|
119
|
+
|
|
120
|
+
## Also included
|
|
121
|
+
|
|
122
|
+
`cbomctl prioritize` ranks findings by Mosca's inequality using data lifetimes
|
|
123
|
+
you supply, weighting harvest-now-decrypt-later exposure highest.
|
|
124
|
+
`cbomctl plan` emits an ordered migration plan. Both are useful; neither is
|
|
125
|
+
novel — see Related tools.
|
|
126
|
+
|
|
127
|
+
## Policy packs
|
|
128
|
+
|
|
129
|
+
The rule sets live in [`policy-packs/`](policy-packs/) as a standalone,
|
|
130
|
+
semantically versioned artifact with its own schema and changelog, so another
|
|
131
|
+
tool can consume them without `cbomctl`. Every rule carries a primary-source
|
|
132
|
+
URL, a `last_verified` date, a `binding` classification, and a `hybrid` stance.
|
|
133
|
+
|
|
134
|
+
| pack | state |
|
|
135
|
+
|---|---|
|
|
136
|
+
| pack | state |
|
|
137
|
+
|---|---|
|
|
138
|
+
| pack | state |
|
|
139
|
+
|---|---|
|
|
140
|
+
| `bsi-de` | ✅ TR-02102-1 v2026-01 §2.1, §5.3.4 |
|
|
141
|
+
| `anssi-fr` | ✅ 5/6 — ANSSI 2023 follow-up §1.1, §1.2, §2, §3.2, §4 |
|
|
142
|
+
| `asd-au` | ✅ ISM Guidelines for Cryptography, 2026-09-03 |
|
|
143
|
+
| `eu-roadmap` | ✅ Coordinated Implementation Roadmap Part 1 v1.1 |
|
|
144
|
+
| `us-eo14412` | ✅ 91 FR 38483 §4(b), §5(c) |
|
|
145
|
+
| `nist-ir8547` | ✅ **as a draft** — IR 8547 ipd Tables 2 and 4 |
|
|
146
|
+
| `cnsa-2.0` | ✅ CNSA 2.0 FAQ v2.1 (Dec 2024), pp. 2, 6, 8, 19–20 |
|
|
147
|
+
|
|
148
|
+
## Install
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
pip install cbomctl
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Optional: `pip install cbomctl[llm]` adds a prose migration narrative that
|
|
155
|
+
cannot affect any verdict.
|
|
156
|
+
|
|
157
|
+
## Documentation
|
|
158
|
+
|
|
159
|
+
[Design](docs/DESIGN.md) · [Policy sources and open questions](docs/policy-sources.md) ·
|
|
160
|
+
[Policy packs](policy-packs/README.md)
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
Apache-2.0
|
cbomctl-0.1.0/README.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# cbomctl
|
|
2
|
+
|
|
3
|
+
**One CBOM. Every jurisdiction's verdict. And where they contradict.**
|
|
4
|
+
|
|
5
|
+
Germany and France recommend hybrid post-quantum key exchange. Australia
|
|
6
|
+
recommends against it. The NSA wants ML-KEM-1024, not the -768 the others
|
|
7
|
+
accept. If you ship into more than one of those markets, those are not
|
|
8
|
+
independent checkboxes — and no tool will show you the collision.
|
|
9
|
+
|
|
10
|
+
`cbomctl` takes a CBOM from any generator, runs it against several national PQC
|
|
11
|
+
policies at once, and reports the matrix and the conflicts.
|
|
12
|
+
|
|
13
|
+
> ⚠️ **Pre-release.** All seven policy packs have now been read from their
|
|
14
|
+
> primary sources — every rule cites a section or page. Still not compliance
|
|
15
|
+
> advice: read the sources yourself before acting on a verdict.
|
|
16
|
+
> from an unverified rule carries a visible banner naming the packs involved.
|
|
17
|
+
> See [docs/policy-sources.md](docs/policy-sources.md). Not compliance advice.
|
|
18
|
+
|
|
19
|
+
<!-- badges: PyPI, CI, license -->
|
|
20
|
+
|
|
21
|
+
## What it looks like
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
$ cbomctl verdict app-cbom.json --jurisdictions bsi-de,anssi-fr,asd-au,cnsa-2.0
|
|
25
|
+
|
|
26
|
+
ASSET bsi-de anssi-fr asd-au cnsa-2.0
|
|
27
|
+
X25519MLKEM768 (key-agree) PASS PASS WARN FAIL
|
|
28
|
+
ECDH secp256r1 (key-agree) FAIL FAIL FAIL FAIL
|
|
29
|
+
RSA-2048 (ambiguous) INDET INDET INDET INDET
|
|
30
|
+
|
|
31
|
+
CONFLICTS (1)
|
|
32
|
+
c1 X25519MLKEM768 — no single construction satisfies all four.
|
|
33
|
+
bsi-de, anssi-fr hybrid recommended (guideline_recommendation)
|
|
34
|
+
asd-au hybrid not recommended (guideline_recommendation)
|
|
35
|
+
cnsa-2.0 requires ML-KEM-1024 (agency_requirement, NSS only)
|
|
36
|
+
Closest satisfies-all: hybrid X25519 + ML-KEM-1024 — clears bsi-de,
|
|
37
|
+
anssi-fr and cnsa-2.0, at a documented cost under asd-au.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`WARN` rather than `FAIL` for ASD is deliberate: the ISM *recommends against*
|
|
41
|
+
hybrids, it does not prohibit them. Reporting a guideline as a mandate is the
|
|
42
|
+
most common error in this space, so every rule carries a `binding` field —
|
|
43
|
+
`statute`, `executive_order`, `agency_requirement`, `certification_requirement`,
|
|
44
|
+
or `guideline_recommendation` — and the verdict follows from it.
|
|
45
|
+
|
|
46
|
+
`INDET` is the tool declining to guess. That CBOM records `primitive: pke` for
|
|
47
|
+
the RSA key, which cannot distinguish key transport from signature — and the
|
|
48
|
+
answer moves the finding between critical and medium. Rather than pick, it says
|
|
49
|
+
what is missing and what would resolve it.
|
|
50
|
+
|
|
51
|
+
## Related tools
|
|
52
|
+
|
|
53
|
+
Most of what a PQC readiness tool does, other people already do — several of
|
|
54
|
+
them well. Use them.
|
|
55
|
+
|
|
56
|
+
| tool | what it does |
|
|
57
|
+
|---|---|
|
|
58
|
+
| [CBOMkit](https://github.com/cbomkit/cbomkit), [cbomscanner](https://cyclonedx.org/capabilities/cbom/), KeyLens, [pqc-scanner](https://github.com/rauleteee/pqc-scanner) | generate CBOMs from source |
|
|
59
|
+
| [open-quantum-secure](https://github.com/jimbo111/open-quantum-secure) | scans source + live TLS/SSH, generates CBOM, quantum readiness score, `--data-lifetime-years` HNDL weighting, and **seven compliance frameworks** including BSI, ASD ISM and ANSSI |
|
|
60
|
+
| [sbom-tools](https://github.com/sbom-tool/sbom-tools) | CycloneDX/SPDX ingestion, semantic CBOM diff, quality scoring, CNSA 2.0 and NIST IR 8547 validation, SARIF/OSCAL |
|
|
61
|
+
| IBM Quantum Safe Migration Orchestrator, SandboxAQ AQtive Guard, O3 Security | commercial discovery, risk prioritization and migration planning |
|
|
62
|
+
|
|
63
|
+
**`cbomctl` overlaps all of them, and only two things are actually its own:**
|
|
64
|
+
|
|
65
|
+
1. **Conflict as a computed output.** `open-quantum-secure` runs multiple
|
|
66
|
+
frameworks at once and its README documents cross-framework divergence
|
|
67
|
+
directly — this is not a gap in the market, and anyone claiming otherwise
|
|
68
|
+
has not read it. What it emits is one report per framework, concatenated;
|
|
69
|
+
you find the disagreement by comparing them yourself. `cbomctl` emits the
|
|
70
|
+
matrix, a conflict object naming the disagreeing authorities and the reason,
|
|
71
|
+
and a computed satisfies-all target where one exists.
|
|
72
|
+
2. **Evaluating a CBOM you did not generate.** The tools above evaluate their
|
|
73
|
+
own scan. If your CBOM came from a vendor, a procurement process, or a
|
|
74
|
+
different generator, `cbomctl` will read it.
|
|
75
|
+
|
|
76
|
+
If you want a scanner, use `open-quantum-secure`. If you want diff and
|
|
77
|
+
validation, use `sbom-tools`. If you have a CBOM and need to know which
|
|
78
|
+
jurisdiction's answer to believe, that is this tool.
|
|
79
|
+
|
|
80
|
+
## What it does not do
|
|
81
|
+
|
|
82
|
+
- **It does not scan source code or probe endpoints.** Bring a CBOM.
|
|
83
|
+
- **It does not guess.** In CBOMkit's published Keycloak CBOM, 8 of 22
|
|
84
|
+
algorithm components carry no usable purpose signal — more than a third.
|
|
85
|
+
Those are reported as unresolved, with the range they would span if guessed.
|
|
86
|
+
- **It does not give compliance advice.** It reports what a rule set says, with
|
|
87
|
+
the primary source and verification date attached. Every rule today is
|
|
88
|
+
unverified.
|
|
89
|
+
- **It does not treat guidance as law.** See `binding`, above.
|
|
90
|
+
- **It does not know when a CRQC arrives.** 2035 is a planning assumption
|
|
91
|
+
matching the NIST/NSM-10 horizon, not a prediction. `--crqc-year` changes it;
|
|
92
|
+
whatever you choose is stamped into the output.
|
|
93
|
+
- **It does not diff SBOMs, verify signatures, or scan binaries.**
|
|
94
|
+
|
|
95
|
+
## Also included
|
|
96
|
+
|
|
97
|
+
`cbomctl prioritize` ranks findings by Mosca's inequality using data lifetimes
|
|
98
|
+
you supply, weighting harvest-now-decrypt-later exposure highest.
|
|
99
|
+
`cbomctl plan` emits an ordered migration plan. Both are useful; neither is
|
|
100
|
+
novel — see Related tools.
|
|
101
|
+
|
|
102
|
+
## Policy packs
|
|
103
|
+
|
|
104
|
+
The rule sets live in [`policy-packs/`](policy-packs/) as a standalone,
|
|
105
|
+
semantically versioned artifact with its own schema and changelog, so another
|
|
106
|
+
tool can consume them without `cbomctl`. Every rule carries a primary-source
|
|
107
|
+
URL, a `last_verified` date, a `binding` classification, and a `hybrid` stance.
|
|
108
|
+
|
|
109
|
+
| pack | state |
|
|
110
|
+
|---|---|
|
|
111
|
+
| pack | state |
|
|
112
|
+
|---|---|
|
|
113
|
+
| pack | state |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `bsi-de` | ✅ TR-02102-1 v2026-01 §2.1, §5.3.4 |
|
|
116
|
+
| `anssi-fr` | ✅ 5/6 — ANSSI 2023 follow-up §1.1, §1.2, §2, §3.2, §4 |
|
|
117
|
+
| `asd-au` | ✅ ISM Guidelines for Cryptography, 2026-09-03 |
|
|
118
|
+
| `eu-roadmap` | ✅ Coordinated Implementation Roadmap Part 1 v1.1 |
|
|
119
|
+
| `us-eo14412` | ✅ 91 FR 38483 §4(b), §5(c) |
|
|
120
|
+
| `nist-ir8547` | ✅ **as a draft** — IR 8547 ipd Tables 2 and 4 |
|
|
121
|
+
| `cnsa-2.0` | ✅ CNSA 2.0 FAQ v2.1 (Dec 2024), pp. 2, 6, 8, 19–20 |
|
|
122
|
+
|
|
123
|
+
## Install
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
pip install cbomctl
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Optional: `pip install cbomctl[llm]` adds a prose migration narrative that
|
|
130
|
+
cannot affect any verdict.
|
|
131
|
+
|
|
132
|
+
## Documentation
|
|
133
|
+
|
|
134
|
+
[Design](docs/DESIGN.md) · [Policy sources and open questions](docs/policy-sources.md) ·
|
|
135
|
+
[Policy packs](policy-packs/README.md)
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
Apache-2.0
|