Repository navigation
Fix findings reported by GitHub Actions workflow linters - #117
Open
ondrejmirtes wants to merge 1 commit into
Open
ondrejmirtes wants to merge 1 commit into
ondrejmirtes wants to merge 1 commit into
Conversation
- zizmor: don't persist checkout credentials, add concurrency limits, drop default permissions, name all jobs, use a release environment for jobs that read secrets, replace softprops/action-gh-release with gh release create, fix setup-php version comments (tag is 2.40.0) - octoscan: install build-cs via make cs-install instead of a checkout with a custom ref - poutine: download a pinned, checksum-verified actionlint release instead of piping a script from main; acknowledge reviewed, SHA-pinned third-party actions in .github/poutine.yml - create-tag: pass PHPSTAN_BOT_TOKEN to action-create-tag explicitly so the tag is still pushed by the bot (and still triggers release.yml) Amp-Thread-ID: https://ampcode.com/threads/T-01a197a7-1631-70e7-8dbe-fc0e1bc44573
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 reported by the linters in
lint-workflows.yml. Each was run locally with the same versions and flags as CI.--persona=auditor, online auditsChanges
artipacked): everyactions/checkoutnow setspersist-credentials: false.create-tag.yml,rickstaa/action-create-tagused to push the tag with the bot token persisted by checkout. That token now goes to the action throughgithub_token: ${{ secrets.PHPSTAN_BOT_TOKEN }}. The tag is still pushed by the bot, so it still triggersrelease.yml.permissions: {}where defaults were used before. Jobs get only what they need (contents: readfor checkout;lockkeepsissues: write).concurrencygroup.1.4.xstill all run.secrets-outside-env: jobs that read secrets (create-tag, release, toot, tweet) now run in areleaseenvironment. Repository secrets still resolve there, so nothing breaks, and GitHub creates the environment on first use.PHPSTAN_BOT_TOKEN,MASTODON_ACCESS_TOKENand theTWITTER_*secrets into thereleaseenvironment, and optionally restrict it to tags and1.4.x.superfluous-actions:softprops/action-gh-releaseis replaced withgh release create --verify-tag, using the same token, title and notes. The changelog is passed throughenv, not interpolated into the script.ref-version-mismatch: the setup-php pin comment is now# 2.40.0. The upstream tag has novprefix; the SHA is unchanged and verified.dangerous-checkout: thephpstan/build-cscheckout withref: 2.xis replaced by the existingmake cs-installtarget, which does the same thing. Verified locally:make cs-install && make cspasses.unverified_script_exec: actionlint is now downloaded from a pinned release (1.7.12) and checked withsha256sum, instead of pipingdownload-actionlint.bashfrommain. Bumping actionlint now means updating the version and checksum.github_action_from_unverified_creator_used: the reviewed, SHA-pinned third-party actions are acknowledged per action in.github/poutine.yml, so any newly added action is still reported. It lives under.github, so it stays out of the dist archive.actionlint,toot,tweet,lock) now have one.Note: octoscan was run locally from the v0.1.7 release binary. CI uses
ghcr.io/synacktiv/octoscan:latest, which may include a few newer commits.