osquery / osquery/osquery

Harden GitHub Actions using full commit SHAs and enable Dependabot for action

Open
#9,059 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CI/CD hardening wishlist
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.