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

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

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
github-actions
Domain
ci-cd, security

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.

Description

CI/CD hardening wishlist

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

Dominant language
C++
Stars
23.8k
Forks
2.7k
Avg merge
6d 11h
Merged PRs (30d)
69

Getting set up

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.

More from osquery/osquery

All issues in osquery/osquery

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.