Repository navigation
R1: CycloneDX CBOM import and export - #8
Merged
Merged
Conversation
Unmodified CBOMkit outputs (Keycloak, Kafka, Flink; Apache-2.0), official CycloneDX CBOM examples (CC0) and the CycloneDX 1.6/1.7 JSON schemas (Apache-2.0) for offline import and export tests.
- SHA256withRSA, SHA384withECDSA, SHA1withDSA and RSAPublicKey-style identifiers were missed by the RSA, ECDSA and DSA rules; found while importing real CBOMkit output - Hybrid ML-KEM groups (X25519MLKEM768) now report quantum_relevance hybrid_pqc instead of the pure post-quantum value
- pqdocket import: reads CycloneDX 1.6 and 1.7 CBOMs from any tool into a normalized inventory (schema 1.0.0) with provenance per record (source file hash, spec version, tools, bom-ref, occurrences) and the original component kept unchanged - Classification: CycloneDX 1.7 algorithmFamily first, then names and lexical rules; certificates, keys and protocols take the most serious class among referenced algorithms, following CBOMkit dependency links; anything unclassifiable stays unknown - pqdocket scan --format cbom: deterministic CycloneDX 1.7 CBOM, validated in tests against the official schema; round-trips through import - Clear errors for malformed input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
R1: pqdocket now reads and writes CycloneDX CBOMs, so it works with the inventories other scanners already produce instead of competing with them.
What's new
pqdocket import a.json b.json --output inventory.json: reads CycloneDX 1.6 and 1.7 CBOMs into one normalized inventory (newschemas/inventory.schema.json, v1.0.0). Every record carries:Classification order:
algorithmFamilyCertificates, keys and protocols take the most serious class among the algorithms they reference, including CBOMkit's dependency links. Anything unclassifiable stays
unknown.pqdocket scan --format cbom: exports a deterministic CycloneDX 1.7 CBOM, validated against the official schema in tests, that round-trips throughimport.Scanner fix found with real data: Java names like
SHA256withRSA,SHA384withECDSA,SHA1withDSAandRSAPublicKeywere missed. Fixed, with regression tests.New class: hybrid groups (X25519MLKEM768) now get their own class,
hybrid_pqc.Real fixtures (unmodified, licenses noted in
tests/fixtures/cbom/README.md)On these, the importer reads every cryptographic asset (91 in total). The only unknowns are genuinely undecidable entries: a bare "TLS", "RAW", "PRIVATE KEY", and keys with no linked algorithm.
Checks
pytest: 92 passed (38 new)ruff check .: cleanmypy src: cleanNot in this PR
Version bumped to 0.2.0. After merge, tag
v0.2.0to release.Generated by Claude Code