Skip to content

chore(ci): pin actions to commit SHAs and add dependabot cooldown - #168

Merged
ManukMinasyan merged 1 commit into
4.xfrom
chore/pin-actions-sha-and-cooldown
Aug 19, 2026
Merged

chore(ci): pin actions to commit SHAs and add dependabot cooldown#168
ManukMinasyan merged 1 commit into
4.xfrom
chore/pin-actions-sha-and-cooldown

Conversation

@ManukMinasyan

Copy link
Copy Markdown
Contributor

Closes the two failing Plumb security checks. Together they are the only thing keeping the package below 100.

Check Weight Before After
security.actions-sha-pinned 8 fail (0 / 12 pinned) pass (13 / 13)
security.dependency-update-cooldown 4 fail (no cooldown) pass (7 days)

Security is scored 25 / 37 today, which is the 67.57 reported by Plumb. With both passing it is 37 / 37, taking the composite from 82.16 to 100. Maintenance and Ecosystem are already 100.

Pins

Every SHA was resolved through the GitHub API and cross-checked against the tag object it dereferences to. actions/checkout and shivammathur/setup-php match byte-for-byte what bezhanSalleh/filament-shield already ships.

Action SHA Version
actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 v7.0.1
actions/setup-node 820762786026740c76f36085b0efc47a31fe5020 v7.0.0
aglipanci/laravel-pint-action 36de00d5f5a8a4e12d443e01671daa12a18f4c79 2.6
dependabot/fetch-metadata 25dd0e34f4fe68f24cc83900b1fe3fe149efef98 v3.1.0
peter-evans/create-pull-request 5f6978faf089d4d20b00c7766989d076bb2fc7f1 v8.1.1
shivammathur/setup-php f3e473d116dcccaddc5834248c87452386958240 2.37.2
stefanzweifel/changelog-updater-action a938690fad7edf25368f37e43a1ed1b34303eb36 v1.12.0
stefanzweifel/git-auto-commit-action 4a55954c782fc1ea30b9056cd3e7a2b40ca8887d v7.2.0

The trailing version comments are load-bearing. Dependabot reads them to know the current version, so auto-merge.yml keeps classifying updates as semver-minor/patch correctly after pinning.

uses: ./.github/workflows/tests.yml is left alone. Plumb exempts first-party refs, which are covered by branch protection.

Cooldown

default-days: 7 on both update entries. github-actions supports default-days only, not the semver-*-days variants. The threshold is at most 5 days (laravel/framework and laravel/pint pass at 5); 7 matches filamentphp/filament and bezhanSalleh/filament-shield.

No composer ecosystem was added. "Dependabot or Renovate configured" already passes, and a library with no committed lockfile would just get constraint-churn PRs.

Regression guard

New actions-pinned job in tests.yml fails on any third-party uses: lacking a 40-hex SHA. Because release.yml calls tests.yml via workflow_call, releases are gated on it too.

tests.yml also gets permissions: contents: read. It was the only workflow with no permissions: block, so it was inheriting the repo default token scope. This is more restrictive than the caller in release.yml, which is allowed for reusable workflows.

Verification

  • All 6 workflows and dependabot.yml parse as YAML.
  • 13 of 13 third-party refs match @[0-9a-f]{40}; 1 first-party ref exempt.
  • Guard proven load-bearing: run against the pre-change tree it fails and lists exactly the 8 distinct unpinned refs Plumb flagged; against this branch it passes clean. Confirmed under two grep implementations.
  • The actions-pinned and test jobs on this PR exercise the new pins live.

Note on when the score moves

Plumb scores the latest release tag, not the branch head. Confirmed on packages where the two differ: spatie/laravel-permission is scored at tag 8.3.0 (60e8ed5b) while main is at afd24018; livewire/livewire at tag v4.4.1 (0c925c55) while 4.x is at 10b445a1.

So merging this will not move the badge. It needs a v4.1.1 tag, after which Plumb rescans on its 24h cadence.

Plumb's package audit fails two security checks for this package, which
together hold the composite score at 82.16:

  security.actions-sha-pinned        0 of 12 refs pinned  (weight 8)
  security.dependency-update-cooldown  no cooldown config (weight 4)

Tag refs are mutable: a compromised maintainer can re-point v7 at
arbitrary code, as tj-actions/changed-files did in March 2025. Every
third-party action is now pinned to a full 40-character commit SHA with
the resolved version in a trailing comment, which is also what Dependabot
reads to keep the pins current. The first-party reusable workflow ref
(./.github/workflows/tests.yml) stays as-is; it is covered by branch
protection.

The dependabot cooldown adds a 7-day minimum age before an update is
proposed, so an obviously malicious release has time to be caught before
it lands. Matches filamentphp/filament and bezhanSalleh/filament-shield.

Also adds a CI job that fails on any unpinned third-party ref, so this
cannot silently regress, and pins tests.yml to a read-only token.
Copilot AI lite review requested due to automatic review settings August 19, 2026 14:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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