Skip to content

ci: lint every workflow and action, each with the credentials it is allowed - #205

Merged
aRustyDev merged 3 commits into
mainfrom
ci/lint-every-workflow
Nov 16, 2026
Merged

aRustyDev merged 3 commits into
mainfrom
ci/lint-every-workflow

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

The third of the review's smaller CI fixes (.agents/plans/cicd-review/PLAN.md): lint every workflow and action, not a hand-written list of them.

Before

deps ran lint-workflow.sh over five files: deploy.yml, release.yml, release-plz.yml and two actions. These were never linted, and a new workflow wouldn't have been either:

  • ci.yml
  • contract-cell.yml
  • e2e-schedule.yml
  • flake-hunt.yml
  • setup-rust

After

.github/scripts/lint-all-workflows.sh finds every workflow (*.yml and *.yaml) and every composite action by directory. It lints each workflow with the jobs that may hold secrets, an environment or id-token: write:

Workflow secrets. and environment: id-token: write
deploy.yml deploy, deploy-do build
release.yml none build
release-plz.yml release, release-pr none
any other, including a new one none none
  • release.yml is now held to what it needs. Before, it was linted with the deploy's defaults.
  • How "no job" is passed. lint-workflow.sh reads an empty value as its own default (the deploy's jobs), so the wrapper passes -, which can't be a job id.
  • All 7 workflows and 3 actions pass as they are, so no workflow changes were needed.

ci.yml:

  • deps runs the wrapper in place of its two lint lines.
  • ci-scripts runs the new test.

plan-ci.py treats the wrapper as a deps guard. cicd.md describes the new coverage.

Tests

  • test-lint-all-workflows.sh, 126 checks:
    • Every workflow name × every credential × every job name, against the policy written out again in the test. A refusal must come from rule R7.
    • A .yaml workflow.
    • An action with an unpinned uses.
    • One bad file before, and one after, a clean one.
    • No workflow at all (exit 2).
    • This repository, with every file counted.
  • 9 hand mutants of the wrapper, all caught.
  • Every ci-scripts test and deps guard under dash: 37/37. My local runner now also flags any test file that ci.yml doesn't run; there are none.

Overlap with #202 and #204

All three edit the same "still open" paragraph of cicd.md, so whichever merges later will need main merged in, which I'll do.

Refs: #49

🤖 Generated with Claude Code

…llowed

`deps` ran lint-workflow.sh over a hand-written list: deploy.yml,
release.yml, release-plz.yml and two actions. ci.yml,
contract-cell.yml, e2e-schedule.yml, flake-hunt.yml and setup-rust
were never linted, and a new workflow would not have been either.

- .github/scripts/lint-all-workflows.sh finds every workflow
  (.github/workflows/*.yml and *.yaml) and every composite action by
  directory, and lints each.
- Each workflow is linted with the jobs that may hold secrets, an
  environment, or id-token: write:
  - deploy.yml: its two gated jobs, and `build` for id-token;
  - release.yml: no secrets, `build` for id-token;
  - release-plz.yml: the release App's two jobs.
- A workflow it does not name gets none of the three. release.yml was
  linted before with the deploy's defaults; it is now held to what it
  actually needs.
- An empty SECRET_JOBS reads as lint-workflow.sh's default (the
  deploy's jobs), so "no job" is passed as `-`, which cannot be a job
  id.
- All seven workflows and three actions are clean as they are.
- ci.yml: `deps` runs the wrapper in place of its two lint lines;
  ci-scripts runs the new test.
- plan-ci.py treats the wrapper as a `deps` guard.
- cicd.md: what the lint covers.

Tests:
- test-lint-all-workflows.sh, 126 checks. Every workflow name (the
  three named, ci.yml, a new one) x every credential (none, secrets,
  environment, id-token) x every job name (deploy, deploy-do, build,
  release, release-pr, other), against the policy written out again in
  the test; a refusal must come from R7. Also: a .yaml workflow, an
  action with an unpinned uses, one bad file before and after a clean
  one, no workflow at all (exit 2), and this repository with every file
  counted.
- 9 hand mutants of the wrapper, each caught.
- Every ci-scripts test and deps guard under dash: 37/37.

Refs: #49
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aRustyDev
aRustyDev merged commit 7431554 into main Nov 16, 2026
38 checks passed
@aRustyDev
aRustyDev deleted the ci/lint-every-workflow branch November 16, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant