Harden GitHub Actions using full commit SHAs and enable Dependabot for action
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 23.6k
- Forks
- 2.6k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 14
Description
This PR: https://github.com/osquery/osquery/pull/9058 got me thinking: We should consider pinning github Actions to a full SHA to protect against supply chain attacks:
Pin actions to a full-length commit SHA
Pinning an action to a full-length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork.
Personally I use that in combination with dependabot to keep my github action SHAs up to date, however that does introduce more PRs to merge. I'm Happy to help review the PRs if that would be useful.
https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repository's GitHub Actions workflows and the GitHub security guidance linked in the issue, along with the related pull request 9058. Pin third-party actions to verified full commit SHAs and add Dependabot configuration for action updates; done means the workflows are hardened and future SHA updates can be proposed automatically.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100