-
Notifications
You must be signed in to change notification settings - Fork 63.3k
docs: security hardening info for actions untrusted content #38048
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
base: main
Are you sure you want to change the base?
Conversation
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀 |
This is a gentle bump for the docs team that this PR is waiting for technical review. |
565bb47
to
0ef89bb
Compare
4ba4fac
to
2b34cc3
Compare
@wrslatz Sorry this took a while! I think I talked to most of the Actions teams before I found the one I needed to get the SME review. I'm referring it to our writers to review for style now. Thank you for being patient. |
Thanks, @Sharra-writes ! |
...how-tos/security-for-github-actions/security-guides/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...how-tos/security-for-github-actions/security-guides/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...how-tos/security-for-github-actions/security-guides/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
data/reusables/actions/pull-request-target-permissions-warning.md
Outdated
Show resolved
Hide resolved
I found an additional section of the docs that need an update related to this change. Pushing that up shortly. |
5b22da2
to
f471511
Compare
@Sharra-writes @JarLob I found additional content in enterprise guidance that I updated in f471511. Let me know what you think. |
This comment was marked as spam.
This comment was marked as spam.
@wrslatz We're doing some work on the organization of Actions articles, so the team asked me to put this on hold on our review board until that's finished, but hopefully that will give you time to get another review from the security folks, since the writing review needs to be the final thing once we know the information is correct. |
data/reusables/actions/pull-request-target-permissions-warning.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
Rearranging some things to be more efficient, and paring down some of the language where possible.
data/reusables/actions/pull-request-target-permissions-warning.md
Outdated
Show resolved
Hide resolved
@wrslatz Hey, so, my teammate advised massively cutting down the warnings, because our experience with documentation tells us that people don't properly read long warnings and sometimes miss the DO NOT DO THIS we want them to see. I picked out what I thought was the punchiest and most expressive sentence from the warnings, but this isn't my area of expertise. Do you think the sentence I picked represents the primary threat we're trying to warn against, or would you choose a different one/word it differently for better accuracy? |
@Sharra-writes I did a quick scan and I think this still looks good and meets the objective while linking to specific details. I'll defer to security experts whether it provides sufficient guidance while remaining brief. The main question I have is how important it is to call out the specific permissions granted (write) and access risks (reading secrets) to understand the potential impact. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks @wrslatz for writing this up and for your patience 🙏 , and thanks also to @Sharra-writes for all the edits so far and coordinating this ✏️
I've made a few additional comments and suggestions, and have two questions within those; I'm happy to follow up on anything I've written. I've also commented and in one or two cases made very minor link-based edits to Sharra's suggestions. Theoretically, applying all the outstanding suggestions should resolve the CI failures, too 🤞
I'd also just like to provide some context as to why reviewing this has been a little challenging. It's clear that we need to work on improving this article's readability, and we've recently reorganised a lot of the Actions content. As a general rule, we always try to apply current best-practice thinking to new reviews, but unfortunately some of the content in this article as it's currently written doesn't always adhere to our current best practices. Thank you for your patience with it!
Once we've resolved these outstanding points, I'll be happy to take a final look and then I think we'll be good to go ahead and merge this, thank you!
...prise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md
Outdated
Show resolved
Hide resolved
data/reusables/actions/pull-request-target-permissions-warning.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
Why:
The Security hardening for GitHub Actions documentation currently has no content or recommendations covering untrusted contents being checked out and executed in Actions workflow runs. Someone recently shared the Grafana GitHub Actions Security Incident write up from StepSecurity and I went to share the hardening guide with them only to not find any recommendations covering this case. I did share https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ with them, but this was harder to find since it is not in the GitHub docs. I expected this security issue to be covered in the docs since untrusted input and third-party Actions, which have similar implications, are covered in the same docs already.
What's being changed (if available, include any code snippets, screenshots, or gifs):
Document the risks and recommended hardening mitigations for untrusted content being checked out and executed in GitHub Actions pull requests.
Check off the following: