Skip to content

Conversation

@maennchen
Copy link
Contributor

What’s changed

  • Actions pinned to commit SHAs – Every third-party Action reference now points to an immutable Git commit instead of a moving tag.
  • Least-privilege permissions – The workflow’s top-level token is limited to contents:read; individual jobs elevate only to the scopes they actually need (e.g., contents:write).

Why it matters

Pinning Actions guards against supply-chain attacks and unexpected upstream changes, giving us deterministic, auditable builds. Restricting the default token to read-only follows GitHub’s least-privilege guidance, reducing the blast radius if a job is ever compromised while still allowing specific jobs to perform their required tasks.

@SteffenDE
Copy link
Contributor

Thank you! Can we get dependabot to send PRs for updating actions?

@maennchen
Copy link
Contributor Author

That’s already set up:

- package-ecosystem: "github-actions"

Dependabot understands the sha / comment combo and will update both at the same time.

@maennchen
Copy link
Contributor Author

Elixir Example: elixir-lang/elixir#14537

@Gazler Gazler merged commit 6d77d9d into phoenixframework:main Jun 3, 2025
5 checks passed
@Gazler
Copy link
Member

Gazler commented Jun 3, 2025

Thanks <3

@maennchen maennchen deleted the jm/harden-ci branch June 3, 2025 08:04
@maennchen
Copy link
Contributor Author

Btw for anybody wanting to do the same to their project: I used this tool to generate the changes: https://app.stepsecurity.io/secure-workflow (minus the step-security/harden-runner part)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants