Repository navigation
Harden GitHub actions - #1715
Merged
cpeel merged 3 commits intoNov 17, 2026
Merged
Conversation
We don't need git authentiction tokens to be saved to disk on the job runner, as we do no authenticated actions such as checking out a branch, or pushing a commit to the repo. This limits the severity of any potential github action attack.
None of these jobs need to perform any github operations, so remove GITHUB_TOKEN permissions for all jobs by default for security's sake.
`./path/to/action` looks for an action in the filesystem of the job runner, and is subject to any filesystem changes performed by any of the preceeding jobs. This flexibility is almost never needed and opens the potential for jobs to overwrite actions. `$/path/to/action` on the other hand specifically references the action as found in the git repository and doesn't require any checkout and can't be modified by a job. See https://github.blog/changelog/2026-07-30-reference-same-repository-actions-with-self-repository-syntax/
chrismiceli
approved these changes
Nov 15, 2026
cpeel
approved these changes
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prompted by a similar audit done to phpstan-src using the zizmor linter.