Repository navigation
Fix GitHub Actions workflow linter findings - #166
Merged
Merged
Conversation
- Fix template injection of github.ref_name in send-pr.yml - Write the PR body to a file instead of a step output - Set persist-credentials: false wherever git credentials are not needed - Add explicit permissions to update.yml and concurrency to all workflows - Run actionlint from its digest-pinned Docker image instead of curl | bash - Drop the always-empty head_ref checkout ref in update.yml - Correct setup-php version comments (tag is 2.40.0) and name unnamed jobs - Add zizmor, poutine and octoscan suppressions for reviewed false positives Amp-Thread-ID: https://ampcode.com/threads/T-01a197a7-55dd-77bd-9417-0623abc54212
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.
Runs every linter from
lint-workflows.ymllocally (actionlint 1.7.12 with shellcheck, octoscan, poutine 1.1.4, zizmor 1.31.1--persona=auditor) and fixes what they report. Before this change: actionlint 0, octoscan 10, poutine 12, zizmor 35 findings. After it: 0 for all four.Fixes
github.ref_namewas expanded straight into arun:script (template injection). It is now passed throughenv. The old version used to be written to$GITHUB_OUTPUT; the PR body is now written to$RUNNER_TEMP/pr-body.mdand passed withbody-path, so the PR body stays the same.tokeninput, so send-pr does not need the persisted credentials either.permissions: contents: read. All pushes usePHPSTAN_BOT_TOKEN, soGITHUB_TOKENonly needs read access. Also removesref: ${{ github.head_ref }}, which was always empty because that step never runs onpull_request.rhysd/actionlintDocker image pinned by digest (1.7.12), instead ofbash <(curl …/main/…). This matches the current upstream johnbillion/plugin-infrastructure config, and the image includes shellcheck. The problem matcher is still registered.# 2.40.0(the real tag name). Theactionlintandlockjobs now have names; the actionlint check name does not change.Suppressions (reviewed false positives)
.github/zizmor.yml:secrets-outside-envfor the bot token (fixing it means moving the secret into deployment environments, which is a repo settings change), andsuperfluous-actionsfor gh-release, create-pull-request and git-auto-commit..github/poutine.yml:github_action_from_unverified_creator_usedfor the listed SHA-pinned actions.ignorefor "checkout with a custom ref". Its static-ref regex is^[a-zA-Z-]+$, so it flags the fixed branch namesPHP-8.xand2.3.x.