Skip to content

In CI

Post-quantum support can regress: a load balancer swap, a base-image downgrade, a hand-edited curve list. A scheduled check in CI catches it.

The pqdoctor GitHub Action does it in one step, with a job summary and a pull-request comment. It isn’t published yet. Until it is, any CI can run the CLI directly.

For one host, pqdoctor’s exit status is the verdict:

Exit Verdict
0 Post-quantum
1 Not post-quantum, TLS 1.2 only, or broken
2 Unreachable or an error
#!/bin/sh
# Fail if any host isn't post-quantum. Unreachable hosts only warn.
status=0
for host in example.com api.example.com:8443; do
pqdoctor "$host" --no-auth
code=$?
if [ "$code" -eq 1 ]; then status=1; fi
if [ "$code" -eq 2 ]; then echo "warning: $host unreachable"; fi
done
exit $status

--no-auth skips the certificate check, which a key-exchange gate doesn’t need. Leave it on if you also want the ML-DSA result in the log.

scan exits 0 whenever it finishes, so check its records instead:

Terminal window
pqdoctor scan hosts.txt --json --quiet > results.jsonl
# fail if any host answered but isn't post-quantum
! grep -E '"verdict":"(notPq|noTls13|broken)"' results.jsonl

More recipes, including PowerShell, are in Scripting with JSON.

An origin behind Cloudflare often only accepts Cloudflare’s IPs, so a CI runner on the internet gets unreachable. Run the check from somewhere that can reach the origin, such as a runner in the same network, or check the public name instead.

Until there’s a published Linux binary, install it from crates.io. It’s pure Rust with no system packages:

Terminal window
cargo install pqdoctor

Cache ~/.cargo between runs to make it fast.