How to make a CBOM (cryptography bill of materials) for a JS/TS, Python, Go or Java repo
Run npx github:1Aa1k/cupel --cbom > cbom.json from the repo root. Cupel is a free, open-source scanner that reads JavaScript/TypeScript, Python, Go and Java source and prints a CycloneDX 1.6 cryptography bill of materials: one component per algorithm it finds, with the file and line of each use. It runs on your machine and does not parse code, so treat it as a first inventory, not a proof.
By Nate Sproul, software engineer · Updated December 2, 2026
What is a CBOM?
A CBOM is a cryptography bill of materials: a list of the cryptographic assets in a system and how they connect to the software. CycloneDX describes it as a way to "discover, manage, and report on cryptographic assets in preparation for a quantum-safe future", and says it includes algorithms, keys, certificates, and their relationships to software components.
In the CycloneDX 1.6 JSON reference, these are components of type cryptographic-asset, defined as a cryptographic asset including algorithms, protocols, certificates, keys, tokens, and secrets. The schema's asset types are algorithm, certificate, protocol and related-crypto-material, and each component can carry evidence.occurrences with the location and line where it was found.
Cupel produces the algorithm part from source code. Certificates, keys on disk and TLS settings are not in it; see the limits below.
What commands make one?
Cupel is our open-source scanner. Run these from the root of the code you want to scan, or pass a path such as src. The flags below are from its README.
npx github:1Aa1k/cupel --cbom > cbom.jsonprints a CycloneDX 1.6 CBOM, with onecryptographic-assetcomponent per unique algorithm.npx github:1Aa1k/cupel --reportprints a human summary by family and by quantum status, if you want to read before you generate.npx github:1Aa1k/cupel --sarif > cupel.sarifprints SARIF 2.1.0 for GitHub code scanning.npx github:1Aa1k/cupel --sarif --check --forbid-quantum-vulnerable > cupel.sariflimits the SARIF to the findings that--checkwould fail, and exits 1 if there are any.
What does one component look like?
This is a real component from running --cbom on our own site's src folder on 2026-12-02, which produced 29 components. It is the SHA-1 entry, trimmed to nothing else. Both uses are in the scanner's own test file, which holds samples on purpose, and the paths are relative to where the scan ran.
"type": "cryptographic-asset","bom-ref": "crypto/algorithm/sha1","name": "SHA-1""cryptoProperties": { "assetType": "algorithm", "algorithmProperties": { "primitive": "hash", "cryptoFunctions": ["digest"] } }"evidence": { "occurrences": [ { "location": "../SproulTech/website/src/lib/hash/hash-scan.test.ts", "line": 47, "symbol": "createHmac" }, { "location": "../SproulTech/website/src/lib/hash/hash-scan.test.ts", "line": 125, "symbol": "createHash" } ] }"properties": [ { "name": "cupel:quantum", "value": "weak" }, { "name": "cupel:family", "value": "hash" } ]- Calls whose algorithm is a variable have nothing to list as a component. Their count is in the file's
metadata.propertiesascupel:unresolvedCallSites. It read 22 on this run.
What are the quantum labels?
Each component and call site carries a cupel:quantum label, chosen by algorithm name from one table in the scanner. The README defines five:
vulnerable: public-key algorithms a large quantum computer would break, such as RSA in all forms, ECDSA, Ed25519, DH, ECDH and X25519.weakened: reduced margin, such as AES-128.weak: classically weak, quantum aside, such as MD5, SHA-1, DES and RC4.safe: no known quantum break at this size, such as ML-KEM, ML-DSA, SLH-DSA, SHA-256 and up, AES-256 and HMAC-SHA2.unknown: the algorithm isdynamicor not in the table.
How do you add it to CI without fixing everything first?
Upload SARIF so findings show up as GitHub code scanning alerts, and gate on new findings only with a baseline. This is the workflow from the README:
permissions: contents: read, security-events: write- uses: actions/checkout@v4- uses: actions/setup-node@v4withnode-version: 20- run: npx github:1Aa1k/cupel --sarif --check --forbid-quantum-vulnerable > cupel.sarifwithcontinue-on-error: true- uses: github/codeql-action/upload-sarif@v3withsarif_file: cupel.sarif- To accept today's findings, run
npx github:1Aa1k/cupel --write-baseline cupel-baseline.json src. Then in CI runnpx github:1Aa1k/cupel --check --forbid-quantum-vulnerable --baseline cupel-baseline.json src, which fails only on findings not in the baseline. - Baseline entries are fingerprinted from file, primitive, algorithm and the text of the line, never the line number, so moved code stays matched. A copy-pasted duplicate of a baselined call counts as new, and so does an edited line.
Why make the inventory first?
Every public timeline starts with knowing what you use. The sources below are the ones we read on 2026-12-02, and we only state what is on the page.
- NIST IR 8547, published October 2026, says NIST will deprecate quantum-vulnerable public-key cryptography after 2030 and disallow its use under NIST standards and guidelines after 2035. It names three post-quantum standards: FIPS 203 (ML-KEM, key establishment), FIPS 204 (ML-DSA, signatures) and FIPS 205 (SLH-DSA, signatures).
- The UK NCSC timeline, published 20 March 2025, asks organizations to complete discovery and assessment and build an initial migration plan by 2028, finish the most urgent migration work by 2031, and complete migration by 2035.
- CISA's quantum page links its strategy for migrating to automated PQC discovery and inventory tools, and says federal guidance requires agencies to establish and maintain a current inventory of IT vulnerable to quantum decryption.
- The NSA's CNSA 2.0 announcement, dated 7 September 2022, tells owners and operators of National Security Systems to plan and budget for a move to quantum-resistant algorithms, which it says will eventually be required for those systems. It applies to National Security Systems, not to ordinary commercial software.
- Nothing here says RSA is broken today. The point is the deadlines are dated and the first step in each is a list, and a CBOM is a standard format for that list.
What does Cupel not see?
Cupel is line-based pattern matching, not a parser. It does not build a syntax tree or follow data flow. A clean run means no known pattern was found, not that none exists. From the README:
- Labels come from the algorithm name. Key sizes, curves and parameters that are not in the name are not seen:
generateKeyPair("rsa")isvulnerableat any key length, and bareAES-GCMfrom Web Crypto isunknown. - An algorithm built from strings or passed through a variable is
dynamic, counted but never resolved. - Python, Go and Java do not follow aliased imports, such as
from hashlib import sha256. Go and Python calls must appear as written, such ashashlib.sha256(. - A match inside a comment or string literal counts as a finding.
- Files over 2 MB, files with a NUL byte and minified bundles are skipped and listed as skipped.
node_modules,vendor,target,dist,buildand virtual environments are not scanned. - It reads source, so certificates, SSH keys, your JWKS endpoint, TLS configuration and third-party services are not in the CBOM. The RSA exit plan lists those places to check by hand.
What are the alternatives?
If your code is mostly Java, Python or Go, look at IBM's CBOMkit and its scanner, sonar-cryptography, a SonarQube plugin. Their READMEs list Java (JCA and BouncyCastle), Python (pyca/cryptography) and Go (the standard crypto packages) as supported, and they also record keys and dependencies between assets. Their listed languages do not include JavaScript or TypeScript, which is where Cupel is useful. Cupel is a single command with no server.
What does SproulTech do beyond the scan?
The scan is free. Our fix work, where we route every RSA call through one helper and swap each use, has only been done on JavaScript and TypeScript, and we offer it for JS/TS teams. Details and prices are on the RSA exit page.
Questions
- Does Cupel upload my code anywhere?
- No. It runs on your machine and prints to your terminal. Read the code first at the GitHub link.
- Is the output valid CycloneDX?
- Cupel's test suite validates its CBOM against the official CycloneDX 1.6 JSON schema, per its README. That checks the file's shape, not that every algorithm was found.
- Why does my CBOM show fewer algorithms than I expected?
- Dynamic algorithms are counted in cupel:unresolvedCallSites and not listed, aliased imports in Python, Go and Java are not followed, and anything configured outside source code, such as TLS settings, is not read.
- Should I fail the build on every quantum-vulnerable finding?
- Not on day one. Write a baseline with --write-baseline so the build fails only on new findings, then work the baseline down.
Send a few lines about the codebase and where it hashes, signs or encrypts things. The reply comes from the engineer who would do the work.
nate@sproultech.com