Improve actions setup, add static analysis#416
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
rkistner
left a comment
There was a problem hiding this comment.
I'm happy with these checks and changes.
Just to check - it looks like this also adds dependabot config to semi-automatically update github action versions?
Yes, I should have mentioned that in the PR description. My thinking is that dependabot would create PRs to update refs since we no longer get updates for new minor releases (unlike with |
stevensJourney
left a comment
There was a problem hiding this comment.
I like these checks, I'd be happy if we added these to our other repos :)
This adopts zizmor as a static analysis tool for GitHub actions workflows in this repository, and fixes most lints. I'm mainly opening this to start a discussion - is this a tool we want to use or are the reports too noisy to be useful for us?
In this repository, the default configuration flagged:
actions/checkout@v6sincev6is a mutable tag that could change between runs. GitHub allows us to forbid mutable references altogether, too. IMHO, this is a bit too strict by default:actions/checkout, we'd have bigger problems. So I think explicitly using the latest version makes sense.subosito/flutter-actionis community-maintained and adding an explicit ref can make sense for those.permissionsblock since the default value is too broad. This makes sense to fix, and we also get warnings from GitHub about this.actions/checkoutuses withoutpersist-credentials: false. That's a good point IMO, we don't need these credentials.${{ ... }}expansions in scripts since it could "lead to running attacker-controlled code". This is a false-positive inpublish.ymlwhich was flagged here, but it can still be cleaned up with relatively little effort.Zizmor can also be configured with a more strict ruleset (
zizmor --persona pedantic .). In this repository, that additionally flags:concurrencysetting (only affects the publishing workflow in this repository which is harmless).