Skip to content

Pin the Playwright image by digest, lock the workflow actions and run Plumber on every change - #6835

Open
Totara-thib wants to merge 4 commits into
plausible:masterfrom
Totara-thib:plumber-score
Open

Totara-thib wants to merge 4 commits into
plausible:masterfrom
Totara-thib:plumber-score

Conversation

@Totara-thib

Copy link
Copy Markdown
Contributor

Changes

Hi again! Follows up on #6784, merged yesterday. Three commits, each stands on its own, a new official GitHub method exist for pinning actions with sha commits gh actions-lock, I'm suggesting using it and I've also add Plumber in CI to ensure workflows don't drift again and are secured (each commits could be removed).

  • The tracker tests run in mcr.microsoft.com/playwright, pulled by tag, now pinned by digest with the tag kept so the version stays readable.
  • .github/workflows/actions.lock, GitHub's own workflow dependency lockfile, records the commit every action resolves to, transitive ones included, enforced by the runner even if a tag moves. Refs become the release each commit is, readable in the workflow, and Dependabot keeps bumping them and matching its security alerts, which skip bare commit pins. The commits recorded are the ones pinned here already. Maintenance: gh actions-lock after adding or bumping an action, Dependabot updates the file with its bumps.
  • A small workflow runs the Plumber CLI on pushes to master and pull requests, checks the classes Declare what each workflow may do with the token and stop persisting checkout credentials #6784 fixed and gates at 85 points so one small finding never blocks a PR. The .plumber.yaml overlay inherits the built-in defaults and trusts the twelve actions this repository uses.

Score badge

Like OpenSSF Scorecard's published results: every run publishes the score, the badge in SECURITY.md shows master, a failed publish never fails your CI. No token or secret is needed. It reads UNKNOWN until the first run on master. Removing score-push is the whole opt-out.

I work on Plumber. If you do not want the tool, no hard feelings, say so and I drop the last commit, the other two stand on their own.

Tests

  • This PR does not require tests

Changelog

  • This PR does not make a user-facing change

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

The tracker tests run in mcr.microsoft.com/playwright, pulled by tag.
A tag can be re-pushed, so the job would run whatever the registry
serves under that name on the day. The digest pins the exact image,
and the tag stays in the reference so the Playwright version under
test is still readable and bumped the same way as before.
The workflows pinned each action by commit, with the version in a
comment, and Dependabot kept the pins current. GitHub's workflow
dependency lockfile now holds that same guarantee in one place:
.github/workflows/actions.lock, generated with gh actions-lock, records
the commit every action reference resolves to, transitive actions
included, and the runner uses those commits even if a tag moves later.
Every reference moves from the commit to the exact release that commit
is, so the version is readable in the workflow and Dependabot keeps
bumping it and matching its security alerts, which do not cover bare
commit pins. One reference, useblacksmith/build-push-action, has no
release for its commit and stays on it.

Maintenance: after adding or bumping an action, run gh actions-lock at
the repository root and commit the file with the workflow change.
Dependabot updates the lockfile alongside the version it bumps.
A small workflow runs the Plumber CLI on pushes to master and on pull
requests. It checks the GitHub workflows for the classes of findings
the previous commits fixed (missing permissions, tokens left in
checkouts, a container pulled by tag, floating action refs) and fails
under 85 points, so one small finding never blocks a pull request. Its
two actions are recorded in actions.lock like the others. The overlay
keeps the built-in defaults and trusts the twelve actions this
repository uses on top of them. The score badge goes under the title
of SECURITY.md, the page GitHub shows in the Security tab.
@cnkk cnkk self-assigned this Nov 3, 2026
Plumber v0.7.24 adds a check that every tag is covered by a tag
ruleset. This repository has none, and a ruleset is a repository
setting only an admin can add, so no pull request can satisfy it. The
check is off in .plumber.yaml, with a comment that says to delete
those lines once tags are protected.
@Totara-thib
Totara-thib force-pushed the plumber-score branch 3 times, most recently from e3f5966 to f0f01ad Compare December 4, 2026 15:29

This branch has not been deployed

No deployments
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.

2 participants