-
Notifications
You must be signed in to change notification settings - Fork 9
Add PQC Readiness Assessment Plugin #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added new plugin to detect certificates from CAs with security malpractice: - Flags certificates from 15 known problematic CAs (DigiNotar, Symantec, WoSign, TrustCor, etc.) - Enriches BOM components with CA warnings including status, severity, and reason - Supports custom CA blocklists via JSON configuration (~/.cbomkit-theia/problematic_cas.json) - Includes comprehensive unit tests with 100% pass rate Updated module path from github.com/IBM/cbomkit-theia to github.com/cbomkit/cbomkit-theia across all packages and tests. Signed-off-by: Cameron Banowsky <cameron@shebash.io>
Implements a comprehensive Post-Quantum Cryptography (PQC) readiness assessment plugin that analyzes cryptographic assets in CBOMs for quantum vulnerability and migration readiness. ## Features ### Quantum Vulnerability Classification - Classifies algorithms by quantum threat model: - `quantum-vulnerable`: RSA, ECDSA, DSA, DH, ECDH (Shor's algorithm) - `quantum-partially-secure`: AES-128/192, 3DES (Grover's algorithm) - `quantum-resistant`: SHA-256/384/512, SHA3, AES-256, ChaCha20 - `quantum-safe`: ML-KEM, ML-DSA, SLH-DSA (NIST PQC standards) - `hybrid-transitional`: X25519Kyber768, ECDH+ML-KEM hybrids ### PQC Algorithm Detection - Detects NIST standardized PQC algorithms by OID and name patterns: - ML-KEM (FIPS 203): ML-KEM-512/768/1024 - ML-DSA (FIPS 204): ML-DSA-44/65/87 - SLH-DSA (FIPS 205): All SHA2/SHAKE variants - Supports hybrid scheme detection (X25519Kyber768, etc.) ### HNDL Risk Scoring - Calculates "Harvest Now, Decrypt Later" risk scores (0-10) - Factors: data sensitivity, crypto lifetime, vulnerability level, exposure - Categorizes risk as critical/high/medium/low ### Compliance Tracking - CNSA 2.0 timeline compliance (2025-2033 deadlines by category) - NIST SP 800-131A Rev 2 compliance checking - Custom organizational deadline support ### Migration Guidance - Recommends PQC replacement algorithms - Identifies migration path (direct, hybrid-transition) - Flags blocking factors (CA certificates, HSM dependencies) ### Filesystem Scanning - Scans OpenSSL configs for PQC cipher suite settings - Detects PQC-enabled TLS configurations - Identifies PQC key files ## Files Added - scanner/plugins/pqcreadiness/*.go (11 source files) - scanner/plugins/pqcreadiness/algorithms.json (classical algorithm DB) - scanner/plugins/pqcreadiness/pqc_oids.json (PQC OID database) - scanner/plugins/pqcreadiness/pqcreadiness_test.go (16 unit tests) ## Usage Enable via: --plugins=pqcreadiness ## Property Schema Components are enriched with properties: - theia:pqc:quantum-status - theia:pqc:quantum-threat - theia:pqc:classical-security-bits - theia:pqc:quantum-security-bits - theia:pqc:nist-quantum-level - theia:pqc:hndl-risk-score - theia:pqc:hndl-risk-category - theia:pqc:recommended-replacement - theia:pqc:migration-path - theia:pqc:compliance:* (per-framework status) Signed-off-by: Cameron Banowsky <cameron@shebash.io>
|
Hi @anoncam, Thanks again for the new PR. While it’s a natural extension to cbomkit-theia, I’m hesitant to accept it in its current form. Quantum-readiness of cryptographic assets remains an active area of research. Discussions around the quantum safety of specific algorithms are ongoing. For this reason, I’d prefer to keep the definition and evaluation of policies, such as quantum-readiness conditions, separate from the core functionality of cbomkit. For this reason cbomkit (CBOM generation from scanning github repos) defines a compliance checking service interface. This service implementing this interface can be provided either by an external service instance or via a built-in default implementation. Both the default implementation and the existing external service (not part of our open-source repositories) already perform quantum-readiness checks for CBOMs. Merging your PR into cbomkit-theia would duplicate this functionality and could potentially lead to inconsistent results—something I’d like to avoid. That said, your PQC-readiness check could be integrated as an implementation of the cbomkit compliance checking service interface. This approach would allow cbomkit and cbomkit-theia to rely on the same service, ensuring consistent results. Please have a look at the compliance packages in the cbomkit repository: I’m aware that your implementation and our service definition does not quite fit together yet. The cbomkit service makes use of location data that may not be available in cbomkit-theia. PQC-readiness result predicates also seem to differ. Feel free to extend the corresponding cbomkit code as you need to support this. |
Thank you for the detailed feedback and for pointing me to the compliance service architecture. After reviewing the cbomkit compliance packages, I understand your vision for keeping policy evaluation separate and ensuring consistency across both tools. I see several paths forward and would like your guidance on the preferred approach: Option 1: Standalone PQC Compliance Service (Recommended)Create a standalone service (potentially in Go, leveraging my existing implementation) that:
Benefits:
Questions:
Option 2: Port to Java and Extend InterfacePort my Go implementation to Java and:
Benefits:
Challenges:
Option 3: Go Library + Adapter PatternCreate a Go library from my implementation that:
My Specific Questions1. Compliance Result RichnessMy implementation provides 30+ properties per asset (risk scores, HNDL factors, compliance deadlines, migration paths). The current
2. Location DataYou mentioned location data may not be available in cbomkit-theia. Can you clarify:
3. Policy IdentifiersMy current implementation supports multiple compliance frameworks (CNSA 2.0, NIST SP 800-131A, custom). Should these be:
4. Timeline and ApproachWould you prefer:
I'm committed to aligning with your architecture and ensuring consistent results across both tools. The sophistication of my PQC analysis (HNDL risk scoring, multi-framework compliance, migration guidance) adds significant value beyond simple quantum-safe checking, and I'd like to preserve that while fitting your design. What's your preferred path forward? |
|
Hi @anoncam, Thanks a lot for your friendly response. I appreciate your commitment to contribute to the project. Before diving into the details, just a quick update: CBOMKit has recently become a PQCA project. We now have a Technical Steering Committee (TSC), and there’s a bi-weekly TSC call on Tuesdays at 4 PM CET. If the time works for you, I’d like to invite you to join the next call on January 13, 2026. You can find details on https://pqca.org/calendar. Regarding the design options, I also prefer Option 1 – the stand-alone PQC Compliance Service. It keeps things nicely modular and reduces implementation effort compared to Options 2 and 3. The service could be invoked from cbomkit-theia when scanning an image or from cbomkit when scanning a GitHub repository. To support both, it would need to implement an extended version of /api/v1/compliance/check. Developing this in a separate repo is a great idea — I’ll request the creation of cbomkit-pqc-compliance-service for that. On your specific questions:
Looking forward to your proposal. |
Summary
This PR adds a new Post-Quantum Cryptography (PQC) Readiness Assessment Plugin that analyzes cryptographic assets in CBOMs for quantum vulnerability, calculates risk scores, tracks compliance timelines, and provides actionable migration guidance.
Motivation
Cryptographically-relevant quantum computers pose an existential threat to RSA, ECDSA, DH, and other public-key cryptographic algorithms currently protecting critical infrastructure. The "Harvest Now, Decrypt Later" (HNDL) attack vector means adversaries are already collecting encrypted data for future decryption.
With NIST finalizing PQC standards (FIPS 203/204/205) and compliance mandates like CNSA 2.0 setting migration deadlines as early as 2025, organizations need visibility into their quantum vulnerability surface. This plugin provides that visibility directly within the CBOM workflow.
Features
Quantum Vulnerability Classification
Classifies every cryptographic component by quantum threat model:
quantum-vulnerablequantum-partially-securequantum-resistanthybrid-transitionalquantum-safePQC Algorithm Detection
Detects NIST-standardized PQC algorithms by OID and name pattern:
HNDL Risk Scoring
Calculates "Harvest Now, Decrypt Later" risk on a 0-10 scale based on:
Compliance Tracking
Checks against multiple compliance frameworks:
Migration Guidance
Provides actionable recommendations:
Filesystem Scanning
Actively scans for PQC configurations:
Groups = kyber768)Property Schema
Components are enriched with the following CycloneDX properties:
Usage
Files Added
Modified:
scanner/scanner.go: Register plugin constructorTotal: +4,272 lines across 14 files
Testing
$ go test ./scanner/plugins/pqcreadiness/... -v === RUN TestNewPQCReadinessPlugin === RUN TestClassifyQuantumVulnerability_RSA === RUN TestClassifyQuantumVulnerability_ECDSA === RUN TestClassifyQuantumVulnerability_AES === RUN TestClassifyQuantumVulnerability_SHA === RUN TestDetectPQCAlgorithm_ByOID === RUN TestDetectPQCAlgorithm_ByName === RUN TestCalculateSecurityLevel === RUN TestRiskScoring === RUN TestMigrationGuidance === RUN TestComplianceTracking === RUN TestNIST131ACompliance === RUN TestAlgorithmDatabaseLoading === RUN TestPQCOIDDatabaseLoading PASS ok github.com/cbomkit/cbomkit-theia/scanner/plugins/pqcreadiness 0.993sAll existing tests continue to pass.
Example Output
A vulnerable RSA certificate component after processing:
{ "type": "cryptographic-asset", "name": "example.com", "cryptoProperties": { "assetType": "certificate", "algorithmProperties": { "parameterSetIdentifier": "2048" } }, "properties": [ {"name": "theia:pqc:quantum-status", "value": "quantum-vulnerable"}, {"name": "theia:pqc:quantum-threat", "value": "shors-algorithm"}, {"name": "theia:pqc:classical-security-bits", "value": "112"}, {"name": "theia:pqc:quantum-security-bits", "value": "0"}, {"name": "theia:pqc:hndl-risk-score", "value": "7.8"}, {"name": "theia:pqc:hndl-risk-category", "value": "high"}, {"name": "theia:pqc:recommended-replacement", "value": "ML-KEM-768,ML-DSA-65"}, {"name": "theia:pqc:migration-path", "value": "hybrid-transition"}, {"name": "theia:pqc:compliance:cnsa-2.0:status", "value": "non-compliant"}, {"name": "theia:pqc:compliance:cnsa-2.0:deadline", "value": "2030-12-31"} ] }Breaking Changes
None. This is a new opt-in plugin that does not affect existing functionality.
Future Enhancements
References