Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock down GitHub Actions Security #1256

Open
briansmith opened this issue Apr 26, 2021 · 1 comment
Open

Lock down GitHub Actions Security #1256

briansmith opened this issue Apr 26, 2021 · 1 comment

Comments

@briansmith
Copy link
Owner

Over the weekend, I merged PR #1253 which minimizes the permissions of the GitHub token. I also changed the default permission of the GitHub token from read-write to read-only in the repository settings, but I don't think people can see this.

Now we still need to follow the (rest of the) guidance in https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions to lock down our CI/CD.

Further, we need to ensure that all the dependencies of ring have implemented that guidance.

Further, we need to extend our CI/CD to ensure that no new dependencies without such hardening are added as dependencies of ring.

@briansmith
Copy link
Owner Author

  • I audited the (use of) secrets in this repository. There were two secrets. One was a test secret; it was never used and I removed it. The other was a codecov token that I intended to use to make the codecov jobs more reliable; I never got around to using it and the reliability issues with codecov seem to have been fixed without it, so I removed it. Now there are no secrets in this repository.
  • PR CI/CD: Remove optimization for repository owner's PRs. #1258 removes the optimization that I put in place to avoid mostly-duplicate CI job runs for my own PRs. See that PR for details.
  • PR CI/CD: Use my own fork of (third-party) GitHub Actions. #1257 switches this repo to use forks of each (third-party) action I use. See Lock down GitHub Actions Security untrusted#50 (comment) for the reasoning behind this approach.
  • Except for its (implicit) use by actions/checkout, I don't use the GitHub Token.
  • I verified no deploy keys, GitHub app tokens, personal access tokens, or SSH keys are used.
  • I verified no self-hosted runners are used.

See briansmith/untrusted#50 regarding TODOs; in general everything I wrote there applies to this repo too.

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

No branches or pull requests

1 participant