Skip to content

Conversation

wrslatz
Copy link
Contributor

@wrslatz wrslatz commented May 5, 2025

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:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label May 5, 2025
Copy link
Contributor

github-actions bot commented May 5, 2025

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 links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
actions/reference/security/secure-use.md fpt
ghec
ghes@ 3.17 3.16 3.15 3.14
fpt
ghec
ghes@ 3.17 3.16 3.15 3.14
actions/reference/workflows-and-actions/events-that-trigger-workflows.md fpt
ghec
ghes@ 3.17 3.16 3.15 3.14
fpt
ghec
ghes@ 3.17 3.16 3.15 3.14
enterprise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.md ghec
ghec

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@Sharra-writes Sharra-writes added content This issue or pull request belongs to the Docs Content team github_actions Pull requests that update GitHub Actions code and removed triage Do not begin working on this issue until triaged by the team labels May 5, 2025
@Sharra-writes Sharra-writes added the needs SME This proposal needs review from a subject matter expert label May 28, 2025
Copy link
Contributor

Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀

Copy link
Contributor

This is a gentle bump for the docs team that this PR is waiting for technical review.

@github-actions github-actions bot added the SME stale The request for an SME has staled label Jun 25, 2025
@Sharra-writes Sharra-writes removed the SME stale The request for an SME has staled label Jun 25, 2025
@wrslatz wrslatz force-pushed the gha-hardening-pull-request-target branch from 565bb47 to 0ef89bb Compare June 29, 2025 02:02
@wrslatz wrslatz force-pushed the gha-hardening-pull-request-target branch from 4ba4fac to 2b34cc3 Compare July 9, 2025 15:47
@Sharra-writes Sharra-writes added SME reviewed An SME has reviewed this issue/PR waiting for review Issue/PR is waiting for a writer's review and removed needs SME This proposal needs review from a subject matter expert labels Jul 9, 2025
@Sharra-writes
Copy link
Contributor

@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.

@wrslatz
Copy link
Contributor Author

wrslatz commented Jul 9, 2025

@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 !

@wrslatz
Copy link
Contributor Author

wrslatz commented Jul 10, 2025

I found an additional section of the docs that need an update related to this change. Pushing that up shortly.

@wrslatz wrslatz marked this pull request as draft July 10, 2025 14:04
@wrslatz wrslatz force-pushed the gha-hardening-pull-request-target branch from 5b22da2 to f471511 Compare July 10, 2025 18:49
@wrslatz
Copy link
Contributor Author

wrslatz commented Jul 10, 2025

@Sharra-writes @JarLob I found additional content in enterprise guidance that I updated in f471511. Let me know what you think.

@dhianne92

This comment was marked as spam.

@wrslatz wrslatz marked this pull request as ready for review July 10, 2025 21:44
@wrslatz wrslatz requested review from Sharra-writes and JarLob July 14, 2025 16:40
@Sharra-writes
Copy link
Contributor

@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.

@wrslatz wrslatz requested a review from JarLob July 14, 2025 18:57
Rearranging some things to be more efficient, and paring down some of the language where possible.
@Sharra-writes
Copy link
Contributor

@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?

@wrslatz
Copy link
Contributor Author

wrslatz commented Sep 18, 2025

@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.

Copy link
Contributor

@subatoi subatoi left a 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! ▶️

Sharra-writes and others added 2 commits September 18, 2025 08:52
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
Sharra-writes
Sharra-writes previously approved these changes Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team github_actions Pull requests that update GitHub Actions code SME reviewed An SME has reviewed this issue/PR waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants