-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new audit: encourage use of shell: bash
#288
Comments
Thanks for the request @lishaduck! This is an interesting one: I agree that this isn't a security issue per se, but is potentially worth flagging at the "auditor" level (since that level is intended for things that need manual review). For ongoing reference, here's where the current shell behavior in GHA is documented: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#custom-shell -- Curious what other users think about this as an audit, as well 🙂 |
shell: bash
shell: bash
I also think that it would be a useful addition. See actions/runner-images#6668 for problem of swallowing exit codes in |
Thanks for the additional example. Yeah, I'd be OK with an auditor or pedantic-level audit for this! |
An even more pedantic suggestion would be to enforce That also pretty verbose, so 🤷♂️ |
Could be set as the default shell on a workflow level |
Pre-submission checks
What's the problem this feature will solve?
When
shell: bash
isn't set, pipefail and friends aren't enabled. This makes it easy for failing ci to go undetected. Not a security issue per se, but it could be probably be exploited.Describe the solution you'd like
Warn when there's a
runs:
clause without an explicit shell argument (ideally suggest usingdefaults.run.shell
, which is much less verbose and leads people into the pit of sucess).Additional context
I discovered zizmor yesterday, and it's great! It automates a lot of the audits I do and pointed out a lot of others I hadn't considered.
The text was updated successfully, but these errors were encountered: