Skip to content

ci: declare job permissions and pin actions to full SHAs (M04, M06) - #168

Merged
RGood merged 1 commit into
mainfrom
m04-m06/declare-permissions-pin-actions
Nov 10, 2026
Merged

RGood merged 1 commit into
mainfrom
m04-m06/declare-permissions-pin-actions

Conversation

@RGood

@RGood RGood commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Applies mitigations M04 (declare job permissions) and M06 (pin actions) from the Reddit GitHub Actions hardening plan (2026-10-26).

  • Add top-level permissions: contents: read to ci.yaml. The test job only builds and tests, so it needs nothing more.
  • Set persist-credentials: false on checkout. The job never pushes.
  • Pin actions/checkout and actions/setup-node to full commit SHAs, with version comments.
  • Add a github-actions ecosystem to .github/dependabot.yml so the pins are updated automatically.

Testing

Check the CI run on this PR: the "GITHUB_TOKEN Permissions" section of the job log should show only Contents: read and Metadata: read, and the job should pass.

Notes

  • M14 (require SHA pinning) should be enabled only after this merges.
  • An unrelated Dependabot PR (typescript 7.0.2) currently fails at "Install Dependencies" on this repo; that failure is independent of this change.

@RGood
RGood marked this pull request as ready for review November 10, 2026 18:22
@RGood
RGood merged commit d6ca73a into main Nov 10, 2026
1 check passed
@RGood
RGood deleted the m04-m06/declare-permissions-pin-actions branch November 10, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants