Add trusted-publisher + secrets pre-flight health check for the release pipeline - #1291
Add trusted-publisher + secrets pre-flight health check for the release pipeline#1291schickling-assistant wants to merge 2 commits into
Conversation
Weekly workflow (and on every release-workflow PR) exercises every external token, OIDC binding, and DNS path the publish job depends on without ever publishing: - npm / Netlify / Cloudflare / Mixedbread API read probes, - presence of `NPM_TOKEN`, `NETLIFY_AUTH_TOKEN`, `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID`, `MXBAI_API_KEY`, `MXBAI_VECTOR_STORE_ID`, - PATH sanity for `pnpm`/`node`/`bun`/`gh`/`jq`, - GitHub OIDC endpoint reachability. Failures aggregate into one structured report. On any failure the workflow opens (or updates) a `bug`-labelled issue listing every probe that regressed. On all-green the report is uploaded as an artifact so later runs can see when the pipeline was last verified end-to-end. The script also accepts `--json` so other release-validation workflows can consume the structured report directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> agent-session-id: c1934b02-14a7-4f20-a3e4-9e7b987c77ab agent-tool: Claude Code agent-tool-version: 2.1.145 agent-model: claude-opus-4-7 tooling-profile: dotfiles@unknown-dirty
The release publish path uses npm trusted publishing via OIDC (`id-token: write`) and explicitly rejects token auth — `release.yml` fails any publish job where `NPM_TOKEN`/`NODE_AUTH_TOKEN` is set. So the pre-flight requiring an `NPM_TOKEN` secret probed a credential the pipeline forbids. - Drop `NPM_TOKEN` from `REQUIRED_SECRETS`; the probe now checks only the release job's non-npm surfaces (Netlify / Cloudflare / Mixedbread). - Reframe the OIDC endpoint check as the npm trusted-publisher readiness probe (`npm trusted-publisher OIDC readiness`): same reachability mechanism, now the explicit stand-in for npm publish readiness. No workflow-permission or genie-output change: the generated workflow already declared `id-token: write` and never passed `NPM_TOKEN`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
95124d5 to
cd37349
Compare
PR preview
Report historyPR 1291 · 2026-07-27 09:16 UTC
|
|
Closing in favour of #1505, which keeps this PR's genuinely useful half — credential liveness — and drops the parts that could not work as intended. What #1505 keeps Tokens expire on wall-clock time, so a PR-triggered check can never prove they are still valid. That is a real gap and a scheduled probe is the right answer. #1505 probes Netlify, Cloudflare and Mixedbread weekly, using endpoints that report token status where available. Why this branch is superseded rather than landed
Minor: HTTP status was parsed by substring-matching a header dump ( One thing this PR got right that I initially misread: the reasoning for not probing Posted on behalf of @schickling
|
Problem
The release publish job touches five external surfaces (npm, Netlify, Cloudflare, Mixedbread, GitHub OIDC) and roughly half a dozen tools on `PATH`. Today the first time we discover any of them have rotted is during an actual release — see #1284 / #1285 for the `PATH` regression class.
Solution
Weekly pre-flight workflow (Mon 08:00 Europe/Berlin) that exercises every external token, OIDC binding, and tooling path the publish job depends on — without ever publishing. The workflow also runs on any PR that touches `.github/workflows/release.yml*` so the next regression of that class trips this check, not the actual release.
Probes:
Failures aggregate into one structured report; the workflow opens (or warms) a `bug`-labelled `release pre-flight regressed` issue. On all-green the report is uploaded as the `release-preflight-state` artifact (30d retention).
The script is reusable: pass `--json` to consume the structured report from `validate-publish-substance.yml` (in flight).
Trade-offs / follow-ups
Validation
Files
🤖 Generated with Claude Code
Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile