Skip to content
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

Harden GitHub Actions workflows #1761

Merged
merged 1 commit into from
Nov 3, 2024
Merged

Harden GitHub Actions workflows #1761

merged 1 commit into from
Nov 3, 2024

Conversation

ericcornelissen
Copy link
Owner

Relates to #395, #401, #1114

Summary

Update all GitHub Actions workflows following an analysis by zizmor. In particular, this avoids persisting git credentials when the job does not need it, there's only one job that needs it which is the one that creates the git tag and updates the major version branch upon releases.

zizmor did have more concerns but these were not addressed, namely:

  • Overly permissive permissions: read-all: I think this is okay, the project is entirely open so I don't see a risk of an attacker reading anything.
  • Use of pull_request_target: ~ in laberer.yml: as far as I'm aware this is the only way to have this setup work, and it does not run any untrusted code.

Update all GitHub Actions workflows following an analysis by zizmor [1].
In particular, this avoids persisting git credentials when the job does
not need it, there's only one job that needs it which is the one that
creates the git tag and updates the major version branch upon releases.

Zizmor did have more concerns but these were not addressed, namely:
- Overly permissive `permissions: read-all`: I think this is okay, the
  project is entirely open so I don't see a risk of an attacker reading
  anything.
- Use of `pull_request_target: ~` in laberer.yml: as far as I'm aware
  this is the only way to have this setup work, and it does not run any
  untrusted code.

--
1. https://github.com/woodruffw/zizmor
@ericcornelissen ericcornelissen added ci/cd Relates to ci/cd security Relates to security labels Nov 3, 2024
@ericcornelissen ericcornelissen merged commit 181c42a into main Nov 3, 2024
53 checks passed
@ericcornelissen ericcornelissen deleted the harden-ghaw branch November 3, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd Relates to ci/cd security Relates to security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant