TL;DR: most public repos check almost nothing about their own GitHub Actions. We tested 30 public repos (11,350 files) and 231 real pull requests. Only 3 of 30 check action pins, 3 of 30 audit workflow permissions, 1 of 30 scans for keys, and 0 of 30 notice a PR that says "all tests pass" while a check is red. Below are the four fixes, and a one-second check that does all of them.
If you are looking for GitHub Actions security best practices , this is the short list, ranked by how often it goes wrong.
1. Pin third-party actions to a commit SHA
uses: some-org/some-action@main runs whatever that branch holds today. A tag can be moved too. Pin to the full commit SHA and keep the tag in a comment:
- uses : actions/checkout@<full-commit-sha> # v4
Enter fullscreen mode
Exit fullscreen mode
In our bench, only 3 of 30 repos had any check for this. Planted unpinned actions caught by GEL: 90 of 90 .
2.…