Repository navigation
Fix GitHub Actions workflow linter findings - #233
Open
ondrejmirtes wants to merge 1 commit into
Open
ondrejmirtes wants to merge 1 commit into
ondrejmirtes wants to merge 1 commit into
Conversation
Address actionlint, octoscan, poutine and zizmor findings: drop persisted checkout credentials, add explicit permissions and concurrency, install actionlint from a checksummed release, avoid template injection, and document intentional exceptions.
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.
Fixes everything that the linters in
lint-workflows.yml(actionlint, octoscan, poutine, zizmor--persona=auditor) currently report. I ran all four locally with the versions CI uses, and each one now reports nothing.Real fixes
actions/checkoutgetspersist-credentials: falseeverywhere exceptcreate-tag.yml. That workflow keeps the token becauserickstaa/action-create-tagpushes the tag with it.permissions:block now getcontents: read.release-toot.ymlandrelease-tweet.ymlgetpermissions: {}. Release and tag creation already usePHPSTAN_BOT_TOKEN, so they don't need write access.concurrencygroup. Builds use the existingbuild-${{ github.head_ref || github.run_id }}pattern, so pushes to branches are still never cancelled.download-actionlint.bashfrommaininto bash. It's now a pinned v1.7.12 release tarball with a SHA-256 check.run:scripts are passed throughenv:where that's possible (PHPUnit version, platform-test packages).ramsey/composer-installversion comment now says4.0.0, matching the tag the pinned SHA points to.Intentional, suppressed with a justification next to it
run: ${{ matrix.update-packages }}/${{ matrix.script }}: the whole script is defined statically in the matrix../build-infection/...local action: it's cloned at runtime, so the$/self-repository syntax can't load it. octoscan ignores the build-cs/build-infection custom-ref checkouts and this local action.postgres:latest/mysql:latestin platform tests run against the newest database servers on purpose.softprops/action-gh-release(superfluous-actions) is kept..github/zizmor.ymlallows the release secrets that are stored at repository level (secrets-outside-env)..github/poutine.ymlskipsgithub_action_from_unverified_creator_used, because every action is SHA-pinned.