Skip to content

chore: pin third-party GitHub Actions to SHAs + enable Dependabot - #1816

Merged
mokagio merged 3 commits into
trunkfrom
chore/pin-and-enable-dependabot
Jun 1, 2026
Merged

chore: pin third-party GitHub Actions to SHAs + enable Dependabot#1816
mokagio merged 3 commits into
trunkfrom
chore/pin-and-enable-dependabot

Conversation

@mahangu

@mahangu mahangu commented May 31, 2026

Copy link
Copy Markdown
Contributor

Two-in-one hardening:

  1. Pin third-party GitHub Actions in this repo to commit SHAs (tag preserved as trailing comment).
  2. Append Dependabot github-actions ecosystem to existing config (weekly, grouped, with cooldown).

Tracking: DEVPROD-1072.

Hardens against supply-chain risk on mutable tags. Dependabot keeps
the pinned SHAs fresh weekly, with major bumps held under cooldown.

Tracking: DEVPROD-1072
@wpmobilebot

wpmobilebot commented May 31, 2026

Copy link
Copy Markdown
Collaborator

📲 You can test the changes from this Pull Request in Simplenote Android by scanning the QR code below to install the corresponding build.

App NameSimplenote Android
Build TypeDebug
Commit48b7033
Direct Downloadsimplenote-android-prototype-build-pr1816-48b7033-019e7e9e-2440-4ed1-9be0-38d3ffafd617.apk

lastnode and others added 2 commits May 31, 2026 17:40
The original campaign run used pinact 4.0.0 which silently failed to pin
third-party refs in this PR (transient API issue, zero exit code, no diff).
This commit adds the missed pins using our own gh-api-backed resolver
(see gha-security-audit/pin_resolver.py + test_pin_resolver.py).

Tracking: DEVPROD-1072
@mahangu
mahangu requested review from Copilot, iangmaia and mokagio and removed request for mokagio June 1, 2026 03:39

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.

Pull request overview

Hardens the repository’s GitHub automation by pinning Gradle GitHub Actions to immutable commit SHAs and extending Dependabot to manage GitHub Actions updates.

Changes:

  • Pin gradle/actions/* workflow steps to a specific commit SHA (keeping the original tag as a comment).
  • Add a new Dependabot github-actions update configuration with weekly scheduling and grouping.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/submit-gradle-dependencies.yml Pins the Gradle dependency submission action to a commit SHA.
.github/workflows/gradle-wrapper-validation.yml Pins the Gradle wrapper validation action to a commit SHA.
.github/dependabot.yml Adds Dependabot support for GitHub Actions updates with grouping and weekly cadence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/dependabot.yml
Comment on lines +32 to +34
cooldown:
default-days: 7
semver-major-days: 14

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.

@mahangu in case you missed this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copilot appears to be confidently incorrect here. 😬

I checked the current GitHub Dependabot docs, and cooldown is a supported v2 option for version updates, including github-actions.

ignore is not equivalent: it suppresses matching updates entirely, while cooldown delays eligible updates and lets them through later. So for “wait 7 days by default / 14 days for majors,” cooldown is the right mechanism.

Comment on lines 18 to +19
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/dependency-submission@v4
uses: gradle/actions/dependency-submission@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is intentional for this campaign. The PR scope is third-party actions outside github.com/Automattic ownership: actions/* are GitHub-owned actions, and Automattic/dangermattic is an Automattic-owned reusable workflow, so both are deliberately excluded here. The external third-party Gradle actions in this repo are the ones being pinned in this PR.

@mokagio
mokagio self-requested a review June 1, 2026 06:30
@mokagio mokagio added the tooling Related to anything that supports the building & maintaining of the project. label Jun 1, 2026
@mokagio mokagio added this to the Future milestone Jun 1, 2026
@mokagio
mokagio enabled auto-merge June 1, 2026 06:30

@mokagio mokagio 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.

Pin third-party GitHub Actions in this repo to commit SHAs (tag preserved as trailing comment).

What's the advantage of SHA over tag?

@mahangu

mahangu commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

What's the advantage of SHA over tag?

@mokagio Tags are mutable, so SHA pinning prevents a later tag move from silently changing the code our CI runs. Tags can be used to mount supply chain attacks like - GHSA-69fq-xp46-6x23

@mokagio
mokagio merged commit dce087b into trunk Jun 1, 2026
17 of 18 checks passed
@mokagio
mokagio deleted the chore/pin-and-enable-dependabot branch June 1, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tooling Related to anything that supports the building & maintaining of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants