Skip to content

ci: enforce the action pinning rules in the shared hygiene workflow - #3

Merged
lessevv merged 1 commit into
mainfrom
chore/enforce-action-pins
Jul 27, 2026
Merged

ci: enforce the action pinning rules in the shared hygiene workflow#3
lessevv merged 1 commit into
mainfrom
chore/enforce-action-pins

Conversation

@lessevv

@lessevv lessevv commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

ADR-0012 settled two pinning rules and nothing ever checked either one. ADR-0021 then found three repositories doing two different things — which is what an unenforced rule looks like after a few months.

The new action pins step in hygiene encodes both rules exactly:

  • anything outside beatrax-app/ must be a full 40-character commit SHA (ADR-0012 rule 1)
  • a first-party reusable workflow must ride its major-version tag (ADR-0021)
  • local composite actions (./…) are exempt — no supply-chain risk of their own

It sits in the existing actionlint job, so no repository has to add a job name to its ruleset to gain it.

Verified against all four repositories (all pass) and against a fixture containing both violation classes (fails with the offending file:line).

Spec: GOV-R12

ADR-0012 settled two pinning rules and nothing ever checked either one.
ADR-0021 then found three repositories doing two different things,
which is what an unenforced rule looks like after a few months.

The `action pins` step encodes both rules exactly: anything outside
beatrax-app/ needs a full 40-character SHA, and a first-party reusable
workflow needs its major-version tag. Local composite actions are
exempt — they carry no supply-chain risk of their own.

It lives in `hygiene` so every repository that already calls the shared
workflow picks it up without adding a job name to its ruleset.

Spec: GOV-R12
Signed-off-by: Wessel Verheij <info@nightworks.io>
@github-actions github-actions Bot added documentation Docs only ci Pipelines, workflows, and release engineering architecture labels Jul 27, 2026
@sonarqubecloud

Copy link
Copy Markdown

lessevv added a commit to beatrax-app/beatrax that referenced this pull request Jul 27, 2026
Sonar wants a full commit SHA on every `uses:`. ADR-0021 puts
first-party reusable workflows on a moving major-version tag instead,
so the rule reports thirteen findings that are the decision rather
than a defect, and the quality gate fails on a C security rating.

Disabling the rule drops its third-party half too, and that half is
the one that matters — so the shared hygiene workflow now carries an
`action pins` step enforcing both halves precisely (beatrax-app/spec#3).
It is stricter than S7637 about the case S7637 was right about.

Spec: GOV-R12
Signed-off-by: Wessel Verheij <info@nightworks.io>
@lessevv
lessevv merged commit 0deee96 into main Jul 27, 2026
13 checks passed
@lessevv
lessevv deleted the chore/enforce-action-pins branch July 27, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture ci Pipelines, workflows, and release engineering documentation Docs only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant