You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GitHub Actions: Consider hardening setup against CVE-2020-15228 #1246
Description of issue or feature request: #1242 added a GitHub Actions based CI workflow . GitHub Actions has a moderate injection vulnerability (CVE-2020-15228) against which we should consider hardening our setup.
Current behavior:
No particular hardening against CVE-2020-15228
Expected behavior:
Assess necessity and harden against CVE-2020-15228.
changed the title [-]GitHubAction: Consider hardening setup against CVE-2020-15228[/-][+]GitHub Actions: Consider hardening setup against CVE-2020-15228[/+]on Dec 17, 2020
Additional hardening we might consider is in the actions we use.
AFAICT an Action release on the marketplace corresponds to a tag in the repository that publishes the action, which leaves users open to malicious maintainer attacks - tags are not immutable, so a repo owner (or attacker) can replace the tag and point to a malicious version of the action.
GitHub allows us to restrict actions to either: only use actions defined in our org, only allow a predefined list of actions, or allow all actions.
Another reason to distrust 3rd-party Actions – they can push commits (and tags?) to the repository[1].
Furthermore, possibly due to the underlying shared object storage of GitHub, it seems that git activity on forks may have unintended consequences on the forked repo. So far as I can tell, this is not yet confirmed, but the Caddy Web Server seems to have had a release made – and pushed to the Go module proxy – by a tag being pushed to a fork of their repo[2].
using tags for actions does sound a little fishy -- but for the official github actions it seems reasonable: we've made the decision to trust github so we trust their tags to point to right places as well
verifying the build environment and making it auditable sounds potentially interesting but I think it should not be handled in this issue: please file specific issues if you think there's something we should do
That leaves us with (I think) just some configuration, like allow only actions created/hosted by GitHub: I think this makes sense since we currently only use githubs own actions (and should have a high bar for using actions made by others). Would one of the org admins like to make that call and maybe flick the switch in settings?
Activity
[-]GitHubAction: Consider hardening setup against CVE-2020-15228[/-][+]GitHub Actions: Consider hardening setup against CVE-2020-15228[/+]joshuagl commentedon Dec 17, 2020
Additional hardening we might consider is in the actions we use.
AFAICT an Action release on the marketplace corresponds to a tag in the repository that publishes the action, which leaves users open to malicious maintainer attacks - tags are not immutable, so a repo owner (or attacker) can replace the tag and point to a malicious version of the action.
GitHub allows us to restrict actions to either: only use actions defined in our org, only allow a predefined list of actions, or allow all actions.
lukpueh commentedon Dec 18, 2020
Good observation, @joshuagl! Here are some ideas to reduce the attack surface:
run:keyword instead of non-verified 3rd-party actions where feasibletrishankatdatadog commentedon Dec 18, 2020
You guys are really thinking this through. Very impressive! 👏🏽
Configure GitHub workflow to publish coverage
joshuagl commentedon Jan 5, 2021
Another reason to distrust 3rd-party Actions – they can push commits (and tags?) to the repository[1].
Furthermore, possibly due to the underlying shared object storage of GitHub, it seems that git activity on forks may have unintended consequences on the forked repo. So far as I can tell, this is not yet confirmed, but the Caddy Web Server seems to have had a release made – and pushed to the Go module proxy – by a tag being pushed to a fork of their repo[2].
Configure GitHub workflow to publish coverage
joshuagl commentedon Feb 9, 2021
GitHub's Security Lab have published some research and recommendations on securing GitHub Actions workflows:
Haven't had chance to dig into this at all, but found an experiment in "Verifiable GitHub Actions" verifyme
Configure GitHub workflow to publish coverage
jku commentedon Nov 4, 2021
I'd like to close this:
That leaves us with (I think) just some configuration, like allow only actions created/hosted by GitHub: I think this makes sense since we currently only use githubs own actions (and should have a high bar for using actions made by others). Would one of the org admins like to make that call and maybe flick the switch in settings?
lukpueh commentedon Nov 4, 2021
Done!
Thanks for the research and for creating two more specific issues. Closing..