Part 4 explained what a CBOM is and how to read one. This part generates real ones from an existing open-source repository, with the problems written down as they happened. All versions and numbers are from 4 December 2026.
The repository: PyJWT#
I picked PyJWT (version 2.15.1, commit 0d231bf):
- It is widely used and small (12 Python files in the library itself).
- All its asymmetric crypto goes through
pyca/cryptography, which CBOMkit says it covers “100%”. - Its documentation lists exactly which algorithms it supports, so I know the right answer: 14 entries, HS256/384/512 (HMAC), RS256/384/512 (RSA PKCS#1 v1.5), PS256/384/512 (RSA-PSS), ES256, ES256K, ES384 and ES512 (ECDSA), and EdDSA (Ed25519 and Ed448).
Eleven of those fourteen are public-key signatures, every one quantum-vulnerable.
Three ways to run CBOMkit#
| Way | What it needs | What I did |
|---|---|---|
| CBOMkit service (web UI, API, database) | Docker or Podman, make production | Not available on this machine |
| cbomkit-action v2.3.0 | GitHub Actions, or Java 21 to run the jar yourself | Built the jar and ran it locally |
| cbomkit-theia v1.1.2 | Go to build; Docker only for image scans | Built it and scanned the checkout as a directory |
The action is a Docker container on GitHub, but inside it is one Java program that reads a few GITHUB_* environment
variables. Running that jar myself is where the problems started.
Where it got hard#
1. Maven couldn’t reach Maven Central: PKIX path building failed#
What. The first mvn package stopped with unable to find valid certification path to requested target.
Why. Java doesn’t use the operating system’s certificate list; it ships its own trust store. Later the same week I found out why that mattered on this machine: its antivirus inspects every HTTPS connection and re-signs the server’s certificate with its own root, which it added to Windows’ list but not to Java’s. To Java, Maven Central looked like an impostor, so every download failed.
Fix. Tell the JVM to use the Windows store for the build:
export MAVEN_OPTS="-Djavax.net.ssl.trustStoreType=Windows-ROOT"Know what that does: Java now trusts whatever Windows trusts, the antivirus’s root included. On a clean machine or a CI runner you don’t need it.
2. 401 Unauthorized from GitHub Packages#
What. Could not transfer artifact org.pqca:cbomkit-lib:pom:1.3.0 ... status code: 401.
Why. cbomkit-action depends on cbomkit-lib, which depends on sonar-cryptography-plugin, and both are published
only to GitHub Packages. GitHub’s Maven registry docs
say “you need an access token to publish, install, and delete private, internal, and public packages”; my gh
token didn’t have the read:packages scope.
Fix. Either add that scope to a token in ~/.m2/settings.xml, or build the chain from source, bottom up. I built
it. Note the tag names don’t follow one pattern (1.7.0, v1.3.0, v2.3.0):
git -c core.longpaths=true clone --depth 1 --branch 1.7.0 https://github.com/cbomkit/sonar-cryptography
git clone --depth 1 --branch v1.3.0 https://github.com/cbomkit/cbomkit-lib
git clone --depth 1 --branch v2.3.0 https://github.com/cbomkit/cbomkit-action
for d in sonar-cryptography cbomkit-lib; do
(cd "$d" && mvn -B -q -DskipTests -Dspotless.check.skip=true install)
done
(cd cbomkit-action && mvn -B -q -DskipTests -Dspotless.check.skip=true package)
# -> cbomkit-action/target/CBOMkit-action.jar (about 69 MB), needs Java 213. A compile error that was really a clone error#
What. cannot find symbol: class JcaAlgorithmParameterGeneratorGetInstance.
Why. On Windows, git clone printed Filename too long for a few deeply nested files, skipped them, and finished
anyway. My script only showed the last line of git’s output, so I missed it, and the build failed later.
Fix. git -c core.longpaths=true clone ... (already in the block above). Lesson: when a well-tested project
doesn’t compile, check the checkout first (git status showed the missing files).
4. Test files scanned on Windows, excluded on Linux#
What. The same scan of PyJWT read 26 files and gave 16 findings on Windows, and 13 files and 8 findings on
Linux. The extra ones were all in tests/.
Why. The Python indexer’s default exclude list is regular expressions such as tests/ and /test_*\.py$. It
matches them against the file’s relative path, which on Windows is written with backslashes (tests\test_algorithms.py),
so nothing matched.
Fix. Run it on Linux, which is what the GitHub Action does anyway. I used WSL with a Temurin 21 JDK:
export GITHUB_WORKSPACE=$PWD/pyjwt GITHUB_OUTPUT=$PWD/gh_output \
CBOMKIT_OUTPUT_DIR=$PWD/cbom CBOMKIT_LANGUAGES=python
: > gh_output
java -jar CBOMkit-action.jar
# Found project module '' [13 .py files]
# Scanned 13 files with 3419 lines in 2.52 seconds.
# Wrote cbom .../cbom/cbom.json with 8 findings5. An empty per-module CBOM#
What. On my test project the log said cbom_app.json with 0 findings, then cbom.json with 17 findings.
Why. I didn’t find out. The action writes one CBOM per module and one consolidated file, and in my run only the consolidated one had content.
Fix. Use cbom.json, and check a CBOM’s component count before believing “nothing found”.
Result 1: the source scan found one algorithm out of fourteen#
The consolidated CBOM had five components: one algorithm, RSA (OID 1.2.840.113549.1.1.1), and four RSA keys, all
in jwt/algorithms.py at lines 641 to 675. No ECDSA, no RSA-PSS, no EdDSA, no HMAC, no SHA-2.
The reason is in how PyJWT is written, which is also how most libraries are written:
def sign(self, msg: bytes, key: RSAPrivateKey) -> bytes:
signature: bytes = key.sign(msg, padding.PKCS1v15(), self.hash_alg())
return signatureThe key arrives as a parameter, from the application. The hash is a class attribute picked when the algorithm object
is created. The scanner follows cryptographic objects from where they are created (a generate_private_key or
RSAPublicNumbers(...) call), which is why the only findings were the lines that build RSA keys from JWK numbers.
HMAC goes through Python’s standard hmac module, which isn’t one of the covered libraries.
My ground-truth file from part 4, where every algorithm is created and used in the same function, scored seven out of
seven. So the scanner works; it sees direct use. A library that hands algorithm choice to its caller is close to
invisible to it, and the real answer (“which algorithm does my service sign tokens with?”) lives in the application
that calls jwt.encode(..., algorithm="ES256").
Result 2: the file scan found keys, mostly ones that don’t matter#
cbomkit-theia dir pyjwt took about a second and returned 34 components:
| Where | What theia found | Matters? |
|---|---|---|
tests/keys/ | RSA, ECDSA and Ed25519 private keys; an RSA certificate valid 2015 to 2018 | Test fixtures |
docs/usage.rst, README.rst, CHANGELOG.rst | 5 private keys and 5 JWTs in examples | Documentation |
tests/*.py | 6 “generic-api-key” hits, 2 private keys, 2 JWTs | Test data |
jwt/algorithms.py | 3 “generic-api-key” hits (a type alias, a def sign( line, a base64 decode) | False positives |
theia uses gitleaks for secrets, so it reports anything that looks like a key. For a CBOM, the fix is an ignore file in the scanned directory:
# .cbomkitignore
tests/
docs/
*.rstTwo smaller things: theia’s locations are relative to the scanned directory, while the source scanner wrote absolute
paths from my machine (scrub those before sharing a CBOM); and theia built from the v1.1.2 tag still reports its
version as edge in the CBOM metadata.
Result 3: the policy graded RSA and ignored the rest#
CBOMkit’s built-in check is a Rego policy,
quantum_safe.rego. I ran it with OPA v1.23.0:
opa eval -d quantum_safe.rego -i cbom.json -f pretty 'data.policies.quantum_safe.findings'| CBOM | quantum-vulnerable | NA | No verdict |
|---|---|---|---|
| Source scan | RSA | 4 keys | |
| File scan | RSA, SHA256-RSA, RSA | SHA256 | ECDSA key, 2 Ed25519 keys, 27 others |
The policy only grades components whose assetType is algorithm. An ECDSA or Ed25519 key found in a file gets no
finding at all. A CBOM with just those three keys returns an empty list, and the
CBOMkit README says what an empty list means: “if no quantum-vulnerable
components are found, or if no rule matches … the CBOM is assumed to be quantum-safe”. Three quantum-vulnerable keys,
reported as quantum-safe. The README calls this policy “a proof of concept”, and it is right to; the next post adds a rule
for keys.
What I learned#
- Build problems are not the tool’s verdict. Four of the five problems were my environment (Windows, an antivirus between Java and the internet, a token scope). Run CBOMkit where its authors do: Linux, ideally the GitHub Action.
- Know the right answer before you scan. PyJWT’s docs list 14 algorithms; without that I’d have accepted “RSA” as the whole story.
- Source scanning sees direct use only. Scan the application that chooses the algorithm, not just the library that offers it.
- File scanning is noisy by design. Ignore tests and docs, then read what’s left.
- “No findings” is not “quantum-safe”. Check what the policy grades before trusting its summary.
Keywords#
| Keyword | Meaning here |
|---|---|
| CBOMkit | PQCA’s CBOM toolset. Its parts have names: hyperion (source scanner), theia (files and images), coeus (viewer) |
| sonar-cryptography | The SonarQube plugin that is CBOMkit’s source scanner (“hyperion”) |
| cbomkit-action | A GitHub Action that runs that scanner on a checked-out repository, no SonarQube needed |
| cbomkit-theia | A Go command-line tool that scans a directory or container image for certificates, keys and configs |
| JWT | JSON Web Token: a signed token, often used for logins between services |
| OPA / Rego | Open Policy Agent and its policy language; CBOMkit’s “quantum-safe” check is written in it |
| Trust store | The list of root certificates a program trusts for TLS; the JVM keeps its own |
| GitHub Packages | GitHub’s package registry; reading from it needs a token even for public packages |
Next in this series: So how am I getting ready?
Takeaways#
- CBOMkit runs fine from source, but expect GitHub Packages auth, Java 21 and Linux paths; the GitHub Action avoids all three.
- On PyJWT the source scan found 1 of 14 documented algorithms, because algorithm choice is passed in by the caller.
- cbomkit-theia found real key material, almost all of it in tests and docs; use
.cbomkitignore. - The stock quantum-safe policy ignores keys and treats “no match” as safe; extend it before using it as a gate.
References#
- cbomkit/cbomkit README: PQCA; deployment options, supported libraries, compliance behaviour and the “assumed to be quantum-safe” rule
- cbomkit/cbomkit-action README: PQCA; environment variables, module and consolidated CBOMs, Java build requirement
- cbomkit/cbomkit-theia README: PQCA; plugins, ignore files, gitleaks for secrets
- cbomkit/sonar-cryptography: PQCA; the source scanner, tag 1.7.0
- cbomkit/cbomkit-lib: PQCA; the indexer and its default exclude patterns, tag v1.3.0
- quantum_safe.rego: PQCA; the default policy
- PyJWT and its algorithms page: the scanned repository and its list of 14 algorithms
- Working with the Apache Maven registry: GitHub Docs; access tokens needed even for public packages
- Open Policy Agent: OPA v1.23.0, used to run the policy
- My own runs of cbomkit-action v2.3.0 and cbomkit-theia v1.1.2, built from source, on 4 December 2026



