pqcheck 0.14.0 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -19
- package/bin/pqcheck.js +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> **Decryption Blast Radius scanner** — find out how much of your data unlocks when quantum decryption arrives.
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/pqcheck)
|
|
6
|
+
[](https://www.npmjs.com/package/pqcheck)
|
|
7
|
+
[](./LICENSE)
|
|
8
|
+
|
|
5
9
|
```bash
|
|
6
10
|
npx pqcheck stripe.com
|
|
7
11
|
```
|
|
@@ -12,6 +16,20 @@ The same scanner that powers [cipherwake.io](https://cipherwake.io), the browser
|
|
|
12
16
|
|
|
13
17
|
---
|
|
14
18
|
|
|
19
|
+
## What it does
|
|
20
|
+
|
|
21
|
+
| Command | What it gives you |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `npx pqcheck <domain>` | One-shot DBR scan + grade. The original surface. |
|
|
24
|
+
| `npx pqcheck trust-diff <domain>` | Compare today's public trust posture vs a baseline (last-week, last-month, or a saved CI baseline). For CI gates + release checklists. |
|
|
25
|
+
| `npx pqcheck preview-diff --preview <URL> --production <URL>` | Compare a Vercel/Netlify preview deployment URL to production. Surfaces new third-party scripts, header regressions, and DBR score drops *inside the PR*, before merge. |
|
|
26
|
+
| `npx pqcheck vendors export/check/sync <domain>` | Vendor lockfile (`cipherwake.vendors.json`) + CI gate that exits non-zero when a new third-party origin appears. Like `package-lock.json` for vendor scripts. |
|
|
27
|
+
| `npx pqcheck onboard <domain>` | One command: scan → scaffold the GitHub Action → capture a vendor lockfile → set a baseline → commit + push. Zero copy-paste from docs. |
|
|
28
|
+
|
|
29
|
+
Free tier covers all of the above within 100 Trust Diff calls/month per repo (paid lifts to 1K / 10K / 50K). Single-domain scans (`npx pqcheck <domain>`) are unmetered.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
15
33
|
## Get started in 60 seconds
|
|
16
34
|
|
|
17
35
|
Wire Cipherwake into your CI so every PR gets a Trust Diff comment when your domain's public trust posture changes.
|
|
@@ -47,34 +65,90 @@ That's it. The scaffolded workflow includes `permissions: id-token: write`, so t
|
|
|
47
65
|
|
|
48
66
|
---
|
|
49
67
|
|
|
50
|
-
##
|
|
68
|
+
## Features
|
|
51
69
|
|
|
52
|
-
|
|
70
|
+
For the per-release version history see [CHANGELOG.md](./CHANGELOG.md).
|
|
53
71
|
|
|
54
|
-
|
|
55
|
-
- `pqcheck deploy-check <domain>` — pre-deploy Trust Diff gate with deploy-friendly framing. Uses last-scan as default baseline. Same exit semantics as `trust-diff`.
|
|
56
|
-
- `pqcheck release-checklist [domain]` — markdown checklist for release notes. Offline, no API call.
|
|
57
|
-
- `pqcheck vendors export <domain>` — write `cipherwake.vendors.json` from currently observed third-party origins. Like `package-lock.json` for vendor scripts.
|
|
58
|
-
- `pqcheck vendors check <domain>` — CI gate; exits **4** when new origins appear that aren't in the lockfile.
|
|
59
|
-
- `pqcheck vendors sync <domain>` — Starter+ only; pulls your dashboard-managed approved-vendor allowlist into the lockfile.
|
|
72
|
+
### Trust Diff — CI gate for posture regressions
|
|
60
73
|
|
|
61
|
-
|
|
74
|
+
```bash
|
|
75
|
+
npx pqcheck trust-diff mycompany.com --baseline last-week --fail-on high
|
|
76
|
+
```
|
|
62
77
|
|
|
63
|
-
|
|
78
|
+
Compares today's public trust posture against a configured baseline (`last-week`, `last-month`, or a saved per-branch baseline). Surfaces cert / SPKI / HSTS / CSP / DMARC / vendor-script drift since the baseline and gates the PR by severity. SARIF output uploads to GitHub Code Scanning. Pair with the [GitHub Action](https://github.com/cipherwakelabs/pqcheck/tree/main/action) `mode: trust-diff` for one-line CI integration.
|
|
64
79
|
|
|
65
|
-
|
|
80
|
+
Exit codes: `0` pass · `1` warn · `2` fail · `3` error. Free tier (100 calls/repo/mo via GitHub Actions OIDC, no API key required) silently downgrades fail → report; Starter+ honors `--fail-on` for real CI gating.
|
|
66
81
|
|
|
67
|
-
|
|
82
|
+
### Preview Trust Diff — PR-time URL-vs-URL comparison
|
|
68
83
|
|
|
69
|
-
|
|
84
|
+
```bash
|
|
85
|
+
npx pqcheck preview-diff \
|
|
86
|
+
--preview https://feature-x-abc123.vercel.app \
|
|
87
|
+
--production https://example.com
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Compares a preview-deployment URL to a production URL and surfaces application-surface changes (new third-party scripts, header regressions, DBR score drops) *inside the PR review, before merge*. SSRF-pinned scan path keeps preview-URL hostnames out of Cipherwake's moat tables — feature-branch names stay private.
|
|
70
91
|
|
|
71
|
-
|
|
92
|
+
Sample output:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Cipherwake Preview Trust Diff
|
|
96
|
+
preview=https://feature-x-abc123.vercel.app
|
|
97
|
+
production=https://example.com
|
|
98
|
+
|
|
99
|
+
Application surface:
|
|
100
|
+
+ New third-party script: widget.intercom.io
|
|
101
|
+
- Content-Security-Policy [script-src] added permissive token(s): 'unsafe-inline'
|
|
102
|
+
~ Strict-Transport-Security weakened: max-age=31536000 → max-age=3600
|
|
103
|
+
|
|
104
|
+
Transport: preview is edge-hosted (Let's Encrypt) — informational only.
|
|
105
|
+
|
|
106
|
+
Verdict: WARN (max severity: high)
|
|
107
|
+
Tier: free · policy: report
|
|
108
|
+
```
|
|
72
109
|
|
|
73
|
-
|
|
110
|
+
Flags: `--preview <URL>` · `--production <URL>` · `--compare-transport` · `--fail-on <severity>` (default `high`; `none` for report-only) · `--format pretty|json`. CSP weakening detection diffs `script-src` / `default-src` / `object-src` / `frame-ancestors` / `base-uri` / `style-src` for newly-permissive tokens (`*`, `'unsafe-inline'`, `'unsafe-eval'`, `data:`, `blob:`).
|
|
111
|
+
|
|
112
|
+
**Diffing a local dev build against prod?** Cipherwake runs the comparison server-side, so `--preview http://localhost:3000` is rejected (we'd be reaching for *our* loopback, not yours). Expose your dev build via a public tunnel:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Vercel/Netlify preview deploys — automatic per PR, free, the design target
|
|
116
|
+
--preview https://feature-x-abc123.vercel.app
|
|
117
|
+
|
|
118
|
+
# ngrok — ad-hoc, one command
|
|
119
|
+
ngrok http 3000
|
|
120
|
+
--preview https://9b1f-203-0-113-7.ngrok-free.app
|
|
121
|
+
|
|
122
|
+
# Cloudflare Tunnel — zero-auth quick tunnel
|
|
123
|
+
cloudflared tunnel --url http://localhost:3000
|
|
124
|
+
--preview https://random-words-1234.trycloudflare.com
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Vendor lockfile — `cipherwake.vendors.json`
|
|
128
|
+
|
|
129
|
+
Like `package-lock.json`, but for the third-party scripts that load on your domain. Capture currently observed vendor origins, commit the lockfile, and CI fails when a PR introduces a new vendor.
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npx pqcheck vendors export mycompany.com # write cipherwake.vendors.json
|
|
133
|
+
npx pqcheck vendors check mycompany.com # CI gate; exit 4 on new origins
|
|
134
|
+
npx pqcheck vendors sync mycompany.com # Starter+ — pull dashboard allowlist
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`pqcheck deps` also surfaces a one-line site-wide **CSP verdict** above the supply-chain table (`✗ No CSP enforcement` / `⚠ CSP is permissive` / `✓ Strict CSP enforced`) and friendly vendor labels (`New Relic · errors` / `Cloudflare · cdn` / `Adobe Fonts · fonts`) instead of raw hostnames. Same data shape ships on `/r/<domain>` and in the browser extension.
|
|
138
|
+
|
|
139
|
+
### Developer habit-loop subcommands
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
npx pqcheck init # interactive scaffold for .github/workflows/cipherwake.yml
|
|
143
|
+
npx pqcheck deploy-check # pre-deploy gate (Trust Diff alias, last-scan baseline)
|
|
144
|
+
npx pqcheck release-checklist # markdown trust checklist for release notes (offline)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The GitHub Action posts a **sticky PR comment** with results when `comment-on-pr: true` is set on `pull_request` events. Comment auto-edits on subsequent pushes — no spam.
|
|
74
148
|
|
|
75
149
|
---
|
|
76
150
|
|
|
77
|
-
##
|
|
151
|
+
## How DBR scoring works
|
|
78
152
|
|
|
79
153
|
`pqcheck` scans any HTTPS domain and computes its **Decryption Blast Radius score** — the first continuous metric for harvest-now-decrypt-later (HNDL) risk. Every other TLS scanner answers "is post-quantum cryptography enabled?" with yes/no. `pqcheck` answers the question that actually matters: *if an adversary harvests this traffic today and decrypts it in 2035, how much past + future data unlocks?*
|
|
80
154
|
|
|
@@ -100,7 +174,8 @@ npx pqcheck diff <old.lock> <new.lock> Compare two QXM lockfiles; exit 2
|
|
|
100
174
|
npx pqcheck history <domain> Show 90-day score history (sparkline + samples)
|
|
101
175
|
npx pqcheck changes <domain> Summarize public attack-surface changes in last 14 days
|
|
102
176
|
npx pqcheck cert <file.pem> Analyze a local PEM/CRT cert file (offline, no network)
|
|
103
|
-
npx pqcheck trust-diff <domain> Trust Diff vs configured baseline; CI gate (Free:
|
|
177
|
+
npx pqcheck trust-diff <domain> Trust Diff vs configured baseline; CI gate (Free: 100/repo/mo)
|
|
178
|
+
npx pqcheck preview-diff --preview U --production U Preview-URL vs production-URL diff; new scripts + header regressions + score drops (NEW in 0.14.0)
|
|
104
179
|
npx pqcheck deploy-check <domain> Pre-deploy gate (Trust Diff alias with last-scan baseline)
|
|
105
180
|
npx pqcheck onboard <domain> One-command setup wizard (scan + init + vendors + checklist)
|
|
106
181
|
npx pqcheck init Interactive scaffold for .github/workflows/cipherwake.yml
|
|
@@ -248,9 +323,8 @@ This CLI is one of four ways to consume the [Decryption Blast Radius API](https:
|
|
|
248
323
|
| Surface | Where |
|
|
249
324
|
|---|---|
|
|
250
325
|
| **CLI** (this package) | `npx pqcheck` |
|
|
251
|
-
| **Browser extension** | Chrome Web Store
|
|
326
|
+
| **Browser extension** | [Chrome Web Store](https://chromewebstore.google.com/) — toolbar badge per tab + dependency analysis. Runs on any Chromium-based browser (Edge, Brave, Arc) via sideload. |
|
|
252
327
|
| **GitHub Action** | [`cipherwakelabs/pqcheck/action@main`](https://github.com/cipherwakelabs/pqcheck/tree/main/action) — PR comments, SARIF upload, lockfile generation |
|
|
253
|
-
| **Slack `/pqcheck`** | [Install on workspace](https://cipherwake.io/install-slack) |
|
|
254
328
|
| **Web** | [cipherwake.io](https://cipherwake.io) — share-friendly URLs at `/r/<domain>` |
|
|
255
329
|
|
|
256
330
|
## Public API
|
package/bin/pqcheck.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// =============================================================================
|
|
8
8
|
|
|
9
9
|
const API_BASE = process.env.PQCHECK_API_BASE || "https://cipherwake.io";
|
|
10
|
-
const VERSION = "0.
|
|
10
|
+
const VERSION = "0.14.2";
|
|
11
11
|
|
|
12
12
|
// API-key support — paid tiers (Starter $29 / Growth $79 / Scale $199) get
|
|
13
13
|
// per-account monthly quotas instead of the per-IP rate limit. Set via:
|
|
@@ -2076,6 +2076,7 @@ async function runTrustDiffCommand(args) {
|
|
|
2076
2076
|
const body = await safeJSON(resp);
|
|
2077
2077
|
console.error(color("red", `error: /api/trust-diff returned ${resp.status}`));
|
|
2078
2078
|
if (body?.message) console.error(color("dim", body.message));
|
|
2079
|
+
if (body?.hint) console.error(color("dim", body.hint));
|
|
2079
2080
|
process.exit(3);
|
|
2080
2081
|
}
|
|
2081
2082
|
|
|
@@ -2213,6 +2214,10 @@ async function runPreviewDiffCommand(args) {
|
|
|
2213
2214
|
const body = await safeJSON(resp);
|
|
2214
2215
|
console.error(color("red", `error: /api/preview-diff returned ${resp.status}`));
|
|
2215
2216
|
if (body?.message) console.error(color("dim", body.message));
|
|
2217
|
+
// Server-side may return a `hint` field on rejected inputs (e.g. localhost
|
|
2218
|
+
// / private-IP URLs surface the tunnel-options hint). Print it so the
|
|
2219
|
+
// user knows what to do next instead of just seeing the rejection.
|
|
2220
|
+
if (body?.hint) console.error(color("dim", body.hint));
|
|
2216
2221
|
process.exit(3);
|
|
2217
2222
|
}
|
|
2218
2223
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pqcheck",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "HTTPS posture scanner with Preview Deploy Trust Diff for PRs, Trust Diff for CI, vendor lockfile + drift alerts, cross-tenant key map, and HNDL/quantum-decryption risk scoring. Free, no signup.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"post-quantum",
|