Part 5 showed what CBOMkit finds, and what it misses, on a real repository. This part turns all of it into a plan. It follows the PQCA’s order from part 3: inventory, abstract, hybrid, test alternatives. And it follows a rule I learned in the SSDLC post: measure first, block later.
The plan at a glance#
| # | Phase | Action | Open-source tool | Done when |
|---|---|---|---|---|
| 1 | Now | Generate a CBOM on every push | cbomkit-action | Each repo in Java, Python or Go uploads cbom.json |
| 2 | Now | Scan files and images | cbomkit-theia | Images scanned, tests and docs ignored |
| 3 | Now | Grade it, including keys | OPA + Rego | A report lists every quantum-vulnerable item; nothing fails yet |
| 4 | Now | Keep the scanner honest | a ground-truth file | CI fails if the known algorithms stop being found |
| 5 | Next | Check hybrid TLS is on | Go, OpenSSL 3.5 | No CurvePreferences pins without a reason; my endpoints show X25519MLKEM768, measured from outside any inspecting proxy |
| 6 | Next | Make algorithms configurable | my own code | Changing a signing algorithm is a config change |
| 7 | Next | Measure the alternatives | liboqs | Numbers for ML-KEM, FrodoKEM and HQC on my hardware |
| 8 | Later | Plan post-quantum signatures | (libraries and CAs) | A list of long-lived keys with a replacement date |
| 9 | Always | Report what I find | GitHub issues and PRs | Each problem from part 5 is filed or fixed upstream |
Now: inventory#
1. A CBOM on every push#
The cbomkit-action README gives the workflow. This is it for a Python repository, with the version pinned and nothing that blocks the build:
# .github/workflows/cbom.yml
name: CBOM
on:
push:
branches: [main]
workflow_dispatch:
jobs:
cbom:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
# Java repositories: build first (mvn -B package -DskipTests), the scanner needs the jars
- name: Create CBOM
id: cbom
uses: cbomkit/cbomkit-action@v2.3.0
env:
CBOMKIT_LANGUAGES: python
- uses: actions/upload-artifact@v4
with:
name: cbom
path: ${{ steps.cbom.outputs.pattern }}
if-no-files-found: warnRunning it on GitHub’s Linux runners avoids four of the five problems I hit in part 5.
2. Files and images#
# in the repository root
printf 'tests/\ndocs/\n*.rst\n' > .cbomkitignore
cbomkit-theia dir . > cbom-files.json
cbomkit-theia image my-app:latest > cbom-image.json # needs DockerFor an image, theia reads the certificates, keys, openssl.cnf and java.security that actually ship, which the
source scan can’t see (theia README).
3. A policy that also grades keys#
Part 5 showed that CBOMkit’s sample policy grades only algorithm components, so an ECDSA key on its own gets no
verdict, and no verdict counts as quantum-safe. I added a second Rego file next to
quantum_safe.rego. It adds findings to the same
quantum_safe.findings set, so CBOMkit’s viewer would pick them up too:
package policies
# Keys are graded by the algorithm in their name. The stock policy only
# grades "algorithm" components, so a lone ECDSA key got no verdict.
vulnerable_prefixes := ["RSA", "EC", "ED25519", "ED448", "X25519", "X448", "DSA", "DH"]
is_key(component) if {
component.cryptoProperties.assetType == "related-crypto-material"
component.cryptoProperties.relatedCryptoMaterialProperties.type in ["private-key", "public-key"]
}
key_result(name) := "quantum-vulnerable" if {
some p in vulnerable_prefixes
startswith(upper(name), p)
} else := "unknown"
quantum_safe.findings contains finding if {
some component in input.components
is_key(component)
finding := {
"rule": "key_algorithm",
"result": key_result(component.name),
"value": component.name,
"bom-ref": object.get(component, "bom-ref", "(none)"),
"property": "name",
}
}On the three keys that came back empty in part 5, it now reports quantum-vulnerable for the ECDSA key and both
Ed25519 keys. The command is the same as before, with the directory instead of one file:
opa eval -d policy/ -i cbom.json -f pretty 'data.policies.quantum_safe.findings'For now this only reports. Once the noise is down (tests and docs ignored, false positives understood), I’ll make new
quantum-vulnerable findings fail a pull request, the same way new criticals do.
One verdict needs its own treatment: unknown. Both the stock policy and my key rule return it when they can’t tell
what something is, and part 5 showed how easily “no verdict” passes for “safe”. When I ran the policy on the full
repository CBOM from part 5, it found 2 quantum-vulnerable findings and 8 unknown ones: keys whose name is only
private-key@<ref>, with no algorithm in it. So CI doesn’t stay quiet about them, and doesn’t fail on them either: each
unknown becomes a warning on the pull request, so a person looks at it.
opa eval -d policy/ -i cbom.json -f raw \
'[f | some f in data.policies.quantum_safe.findings; f.result == "unknown"]' > unknown.json
python3 - <<'EOF'
import json
for f in json.load(open("unknown.json")):
print(f"::warning title=Unknown crypto ({f['rule']})::{f['value']} has no quantum-safe verdict; check it by hand")
EOFThe ::warning lines are GitHub Actions
workflow commands: each one
“will create an annotation” on the run. The script itself exits normally, so the step passes and the warnings stay
visible.
::warning title=Unknown crypto (key_algorithm)::private-key@13bee40d-… has no quantum-safe verdict; check it by hand| Verdict | In CI, now | In CI, later |
|---|---|---|
quantum-vulnerable | Reported | New ones fail the pull request |
unknown | Warning on the pull request | Still a warning, until someone looks at it |
quantum-safe | Nothing | Nothing |
4. A ground-truth file#
The test file from part 4 uses seven known algorithms
directly. Keeping it in the repo, outside tests/ so it isn’t excluded, and checking that all seven still appear in
the CBOM, tells me when a scanner update breaks detection. It’s the same idea as a canary.
Next: hybrid, abstract, measure#
5. Check that TLS already uses hybrid key exchange#
This is the cheapest win, and for many services it is already done. Go 1.24
enabled X25519MLKEM768 by default “when Config.CurvePreferences is nil”, and OpenSSL
3.5 changed its default keyshares to offer X25519MLKEM768 and
X25519. Go 1.25 added ConnectionState.CurveID, which makes it easy to check. After
my antivirus fooled my first attempt, the check also prints
who issued the certificate, so I know which server I measured:
// tlscheck prints the TLS version, key-exchange group and certificate issuer a server agrees to.
package main
import (
"crypto/tls"
"flag"
"fmt"
)
func main() {
pinned := flag.Bool("pinned", false, "pin curves the way older code often does")
flag.Parse()
cfg := &tls.Config{} // nil CurvePreferences: Go's defaults
if *pinned {
cfg.CurvePreferences = []tls.CurveID{tls.X25519, tls.CurveP256}
}
for _, host := range flag.Args() {
conn, err := tls.Dial("tcp", host+":443", cfg)
if err != nil {
fmt.Printf("%-26s error: %v\n", host, err)
continue
}
st := conn.ConnectionState()
fmt.Printf("%-26s %s %-15s issuer: %s\n", host, tls.VersionName(st.Version), st.CurveID,
st.PeerCertificates[0].Issuer.Organization)
conn.Close()
}
}Run from Linux (Go 1.27.4, 4 December 2026), with no inspecting proxy in the way:
$ ./tlscheck www.google.com github.com pq.cloudflareresearch.com
www.google.com TLS 1.3 X25519MLKEM768 issuer: [Google Trust Services]
github.com TLS 1.3 X25519 issuer: [Sectigo Limited]
pq.cloudflareresearch.com TLS 1.3 X25519MLKEM768 issuer: [Google Trust Services]Two things in three lines. My side is ready: Go offered the hybrid, and Google and Cloudflare took it. GitHub, on that date, didn’t, so a connection is only as post-quantum as both ends.
Then I pinned the curves, the way older code often does:
$ ./tlscheck -pinned www.google.com
www.google.com TLS 1.3 X25519 issuer: [Google Trust Services]No error, no warning: the hybrid exchange is gone, even with a server that supports it. So the action item is a search, not an upgrade:
grep -rn "CurvePreferences" --include=*.go .Each hit either gets tls.X25519MLKEM768 added at the front of its list or a comment saying why not. The same check
with OpenSSL 3.5, asking for the hybrid first:
echo | openssl s_client -connect www.google.com:443 -servername www.google.com \
-groups X25519MLKEM768:X25519 2>/dev/null | grep -E "Negotiated TLS1.3 group|Peer Temp Key"
# Negotiated TLS1.3 group: X25519MLKEM768Pass -groups explicitly: the OpenSSL 3.5.8 in my Ubuntu offered only plain X25519 unless I asked, so a
distribution’s defaults can differ from upstream’s.
6. Make the algorithm a setting#
Part 5’s lesson was that the application, not the library, chooses the algorithm. So that choice should live in configuration, in one place. For a service that uses PyJWT, that is already possible:
import os
import jwt
JWT_ALG = os.environ.get("JWT_ALG", "ES256") # one place to change it
def issue(claims: dict, private_key) -> str:
return jwt.encode(claims, private_key, algorithm=JWT_ALG)
def check(token: str, public_key) -> dict:
return jwt.decode(token, public_key, algorithms=[JWT_ALG]) # never trust the token's own "alg"The rule I’m applying everywhere: no algorithm names in business logic. One module per job (sign, verify, agree a key), the algorithm read from configuration, and a test that runs the module with every allowed value.
7. Measure the alternatives#
The PQCA suggests finding out “now, on your own protocols and devices, what switching would cost”. liboqs ships
speed_kem and speed_sig benchmark programs, so I’ll build it once and
record ML-KEM-768, FrodoKEM and HQC on the machines I actually run, plus key and ciphertext sizes. Numbers, not
opinions, for the day ML-KEM needs a backup.
Later: signatures#
Signatures aren’t exposed to harvest-now-decrypt-later (part 1), so they can wait for libraries, certificate authorities and hardware to support ML-DSA widely. What can’t wait is the list: every long-lived signing key (code signing, root certificates, firmware, tokens with long expiry), its algorithm, and the date it must be replaced. NIST deprecates these algorithms after 2030 and disallows them after 2035 (IR 8547).
Always: give back#
Everything in part 5 that wasn’t my own environment is worth reporting. My list of issues and pull requests to open:
| Project | What | Kind |
|---|---|---|
| cbomkit-lib | Default exclude patterns use /, so tests aren’t excluded on Windows | Bug, small fix (normalise the separator) |
| cbomkit-action | Per-module CBOM empty while the consolidated one has findings | Bug, needs a reproduction |
| cbomkit-theia | Built from a release tag, it reports version edge | Bug |
| cbomkit | Sample quantum_safe.rego doesn’t grade keys or certificates | Enhancement, the Rego above as a PR |
| cbomkit-action | Document that building from source needs a read:packages token | Docs |
I checked the trackers first: a related issue about Python test files was closed in May 2025 (cbomkit-action #13), and I found none about Windows paths. Filing these is my next step, after one more run to confirm each on a clean checkout.
My checklist#
- cbomkit-action in CI for every Java, Python and Go repository
-
.cbomkitignorein each repository; theia run on each image I publish - Policy with the key rule; weekly report of quantum-vulnerable findings
- Ground-truth file in each language I scan
-
grep CurvePreferencesacross my Go code; TLS check on every endpoint - Signing and key exchange behind configurable modules
- liboqs numbers for ML-KEM, FrodoKEM and HQC
- List of long-lived signing keys with replacement dates
- Five upstream issues or PRs filed
Keywords#
| Keyword | Meaning here |
|---|---|
| X25519MLKEM768 | The hybrid TLS key exchange: classical X25519 plus post-quantum ML-KEM-768. Breaking it needs both broken |
CurvePreferences | Go’s tls.Config field that lists allowed key-exchange groups; setting it replaces Go’s defaults |
| Keyshare | The key-exchange offer a TLS 1.3 client sends in its first message |
| Policy as code | Rules written in a language a machine runs, here Rego for OPA, instead of in a document |
| Ground-truth file | A small file whose correct scan result I know, used to check that the scanner still works |
| liboqs | Open Quantum Safe’s C library; it ships speed_kem and speed_sig benchmark programs |
| Upstream | The original open-source project, where fixes should go |
Takeaways#
- Start with the inventory and make it automatic: cbomkit-action in CI, cbomkit-theia for files and images.
- Grade the CBOM with a policy you’ve read, and extend it to keys; report before you block.
- Hybrid ML-KEM is already the default in Go 1.24+ and OpenSSL 3.5; the work is finding configs that pin it off, and checking the other end (GitHub didn’t accept it on 4 December 2026).
- Put algorithm choice in configuration, so the next change is cheap.
- Report what breaks upstream. Open-source tools get better because users write things down.
References#
- cbomkit-action README: PQCA; workflow example and settings
- cbomkit-theia README: PQCA; directory and image scans,
.cbomkitignore - quantum_safe.rego and the CBOMkit README: PQCA; the policy format the key rule extends
- Go 1.24 release notes: The Go Authors; X25519MLKEM768 on by default when
CurvePreferencesis nil - Go 1.25 release notes: The Go Authors;
ConnectionState.CurveID - OpenSSL 3.5 release notes: OpenSSL; PQC algorithms and default hybrid keyshares
- liboqs: Open Quantum Safe;
speed_kemandspeed_sig - Ring-LWE … the PQCA perspective: PQCA, 2 December 2026; the order of work and “what switching would cost”
- NIST IR 8547: NIST, October 2026; 2030 and 2035 dates
- cbomkit-action issue #13: PQCA; earlier report about Python test files
- Workflow commands for GitHub Actions: GitHub Docs; the
::warningcommand and its title parameter - My own TLS checks from Linux (WSL) with Go 1.27.4 and OpenSSL 3.5.8, 4 December 2026



