Repository navigation
fix(workflows): stop reading repo-level sync App secrets - #740
Conversation
The two scheduled audits read private repositories through the standards-sync App token. Run their jobs in the main-only standards-sync environment (deployment: false), whose secrets carry the App key, so the repository-level STANDARDS_SYNC_APP_* secrets can be deleted. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01T7GukBojtE99rLCPY7Cw3R
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 1m 33s —— View job Security review complete
Scope: No security issues found. Analysis:
|
|
Claude finished @kyle-sexton's task in 2m 42s —— View job Code review complete
No blocking findings. The change is a small, well-scoped move of two scheduled-audit jobs from repo-level Notes from review:
|
|
claude-security-review has reviewed this pull request through 42e7222; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 42e7222; a later push is reviewed from there. |
…udit (#741) No related issue: follow-on to #740, part of moving the STANDARDS_SYNC_APP_* secrets into the main-only standards-sync environment; no standards issue tracks it. ## Summary The `verify-pr-convention-lockstep` job ran on every pull request and minted a standards-sync App token to read five private gate callers for the caller-pin scan. Those secrets are moving to the `standards-sync` environment, whose branch policy admits only `main`, so a pull-request job can no longer mint the token. This splits the lockstep check (ADR-0008) in two: the copy check, which reads only public repositories, stays on pull requests; the pin scan moves to a `main`-only audit workflow. Based on #740 (`fix/stop-reading-repo-sync-secrets`), which is still open; merge #740 first, and this diff then shrinks to its own two commits. ## Fix - `pr-require-checks.yml`: `verify-pr-convention-lockstep` becomes `check-pr-convention-copies`. It keeps the gawk step, the hermetic tests and the copy check, reads the public repositories with `github.token`, and no longer references `STANDARDS_SYNC_APP_*`. `ci-status` `needs:` and `results` use the new id. The note about mirroring the App secrets into Dependabot secrets is dropped: the PR job no longer reads them, and Dependabot never triggers the push or schedule events the new workflow runs on. - New `maintenance-audit-pr-convention-pins.yml`: runs on every push to `main`, weekly at `29 7 * * 3`, and on dispatch. The `audit` job declares `environment: { name: standards-sync, deployment: false }` (the #740 shape), mints the read-only contents App token behind the `HAS_APP_CREDENTIAL` guard, runs the pin scan, and fails on drift. It opens no issue, per the CI posture (AGENTS.md, README); the scheduled-run failure notification is the signal. - `lockstep-drift.mjs` takes one mode, `copies` or `pins`. npm scripts `lint:pr-convention-copies` and `audit:pr-convention-pins` replace `lint:pr-convention-lockstep`. The pin mode fails up front when neither `LOCKSTEP_GITHUB_TOKEN` nor `GITHUB_TOKEN` is set, so it can never pass on the public callers alone. New hermetic tests cover mode parsing, the token requirement, and the CLI exit codes for a missing mode and a tokenless pin scan. - `vocabulary.json`: maintenance function `audit-pr-convention-pins`. - ADR-0008 gains a "Revisited 2026-10-08" section; the component README, the README CI posture section describe the split. ## Verification - `npm run test:pr-convention-lockstep`: 85 tests, 85 pass (3 new). - `npm run test:pr-convention-policy`: pass. - `npm run lint:pr-convention-copies` with no token set: "every copy matches policy.json", exit 0. - `npm run audit:pr-convention-pins` with no token set: fails with "fetch-error: the pin scan reads private gate callers and needs LOCKSTEP_GITHUB_TOKEN or GITHUB_TOKEN; neither is set", exit 1. The live pin scan with a token was not run locally; the first `main` run of the new workflow exercises it. - `npm run test:github-actions-conventions`: 14 pass; `npm run lint:github-actions-conventions`: 0 findings. - `actionlint` and `zizmor --offline` on both workflows: no findings. - `npm run lint:concurrency-policy` and `npm run lint:runner-policy`: pass. - `code-review-rules.sh file`: AGENTS.md carries the section. - biome, markdownlint, typos, editorconfig and gitleaks through the lefthook pre-commit hooks: pass. ## Related - Refs #740 (moves the two audit jobs into the `standards-sync` environment; this branch is based on it). - The STANDARDS_SYNC_APP_* repository-secret retirement plan owned by the Automation Lanes session: this removes the last pull-request reader of those secrets. - melodic-software/github-iac `.github/governance-verify/expected-contract-only-gates.json` maps the standards lane `pr-convention-lockstep` to `verify-pr-convention-lockstep` under `jobRenames`; it needs `check-pr-convention-copies` in step with this merge, or the daily governance verification reports the job missing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T7GukBojtE99rLCPY7Cw3R --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
No related issue: prep for deleting the repository-level
STANDARDS_SYNC_APP_*secrets now that the sync App key lives in the main-onlystandards-syncenvironment.Summary
Three workflows still read the repository-level
STANDARDS_SYNC_APP_CLIENT_ID/STANDARDS_SYNC_APP_PRIVATE_KEY. This PR moves the two scheduled audits onto thestandards-syncenvironment. The third,pr-require-checks.ymljobverify-pr-convention-lockstep, is left unchanged and needs an owner decision before the repository secrets are deleted (see below).Fix
maintenance-audit-code-review-rules.yml/audit. The App token (contents: read,metadata: read, whole installation) listsinstallation/repositories, keeps the private ones, and reads each one'sAGENTS.md. Those repositories are private, soGITHUB_TOKENcannot replace it. The job runs only onscheduleandworkflow_dispatch, so it now declaresenvironment: {name: standards-sync, deployment: false}; the environment's secrets of the same names supply the key, and itsmainbranch policy admits these runs. No deployment record is created.maintenance-audit-link-check-excludes.yml/audit. The App token (metadata: read, whole installation) readsinstallation/repositoriesnames and visibility once. That is the installation's repository set, whichGITHUB_TOKENcannot read. Same trigger shape, same change.In both, the missing-credential warning now names the environment. A
workflow_dispatchfrom a non-main branch is now refused by the environment's branch policy instead of running.pr-require-checks.yml/verify-pr-convention-lockstep: unchanged. The token (contents: read, whole installation) is passed asLOCKSTEP_GITHUB_TOKENtocomponents/pr-convention-policy/lockstep-drift.mjs, which reads gate files through the contents API in everyCONSUMER_REPOSITORIESentry. Five of them are private (claude-code-proxy,dotfiles,github-iac,medley,provisioning, checked withgh api repos/melodic-software/<r> --jq .private), soGITHUB_TOKENcannot read them. The job runs on PR branches, so the main-only environment cannot serve it either. Once the repository secrets are deleted, the mint step is skipped, the private fetches fail asfetch-error, and the lane goes red on every PR. The owner needs to choose one of:contents: readonly, installed on the gate callers) whose key stays a repository secret (and a Dependabot secret);standards-sync, leaving only the hermetic fixture tests on PRs.Verification
actionlinton both changed workflows: clean.zizmor --offlineon both: no findings.npm run lint:github-actions-conventions(enforcing): 0 findings.gh api repos/melodic-software/standards/environments/standards-sync: branch policymainonly; secretsSTANDARDS_SYNC_APP_CLIENT_ID,STANDARDS_SYNC_APP_PRIVATE_KEYpresent.workflow_dispatchof each audit onmainafter merge confirms the environment key mints.Related
environmentinput on the sync-standards reusable that moved the App key intostandards-sync.🤖 Generated with Claude Code
https://claude.ai/code/session_01T7GukBojtE99rLCPY7Cw3R