Skip to content

docs: security hardening info for actions untrusted content - #38048

Merged
Sharra-writes merged 53 commits into
github:mainfrom
wrslatz:gha-hardening-pull-request-target
Sep 22, 2025
Merged

docs: security hardening info for actions untrusted content#38048
Sharra-writes merged 53 commits into
github:mainfrom
wrslatz:gha-hardening-pull-request-target

Conversation

@wrslatz

@wrslatzwrslatz commented May 5, 2025

Copy link
Copy Markdown
Contributor

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-actionsgithub-actionsBot added the triage Do not begin working on this issue until triaged by the team label May 5, 2025
@github-actions

github-actionsBot commented May 5, 2025

Copy link
Copy Markdown
Contributor

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.

SourceReviewProductionWhat Changed
actions/reference/security/secure-use.mdfpt
ghec
ghes@ 3.173.163.153.14
fpt
ghec
ghes@ 3.173.163.153.14
actions/reference/workflows-and-actions/events-that-trigger-workflows.mdfpt
ghec
ghes@ 3.173.163.153.14
fpt
ghec
ghes@ 3.173.163.153.14
enterprise-onboarding/github-actions-for-your-enterprise/security-hardening-for-github-actions.mdghec
ghec

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

🤖 This comment is automatically generated.

@Sharra-writesSharra-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-writesSharra-writes added the needs SME This proposal needs review from a subject matter expert label May 28, 2025
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actionsgithub-actionsBot added the SME stale The request for an SME has staled label Jun 25, 2025
@Sharra-writesSharra-writes removed the SME stale The request for an SME has staled label Jun 25, 2025
@wrslatz
wrslatzforce-pushed the gha-hardening-pull-request-target branch from 565bb47 to 0ef89bbCompareJune 29, 2025 02:02
@wrslatz
wrslatzforce-pushed the gha-hardening-pull-request-target branch from 4ba4fac to 2b34cc3CompareJuly 9, 2025 15:47
@Sharra-writesSharra-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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Comment threaddata/reusables/actions/pull-request-target-permissions-warning.md Outdated
Comment threaddata/reusables/actions/workflow-run-permissions-warning.md Outdated
@wrslatz

Copy link
Copy Markdown
ContributorAuthor

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
wrslatzforce-pushed the gha-hardening-pull-request-target branch from 5b22da2 to f471511CompareJuly 10, 2025 18:49
@wrslatz

Copy link
Copy Markdown
ContributorAuthor

@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
@Sharra-writes

Copy link
Copy Markdown
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.

Comment threaddata/reusables/actions/pull-request-target-permissions-warning.md Outdated
Comment threaddata/reusables/actions/workflow-run-permissions-warning.md Outdated
@wrslatz
wrslatz requested a review from JarLobJuly 14, 2025 18:57

@subatoisubatoi left a comment

Copy link
Copy Markdown
Contributor

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! ▶️

Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threaddata/reusables/actions/pull-request-target-permissions-warning.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md
Comment threaddata/reusables/actions/workflow-run-permissions-warning.md Outdated
Sharra-writesand 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
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
Comment threadcontent/actions/reference/security/secure-use.md Outdated
@Sharra-writes

Copy link
Copy Markdown
Contributor

@wrslatz I got the go-ahead on this, so I'm going to get it added to the merge queue. You've been wonderful to work with. Thank you so much for your patience and for this great content. 💛

@Sharra-writes
Sharra-writes added this pull request to the merge queueSep 22, 2025
Merged via the queue into github:main with commit 2229c75Sep 22, 2025
41 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

@wrslatz

Copy link
Copy Markdown
ContributorAuthor

Thanks y'all!

@uchitwai

This comment was marked as spam.

@githubgithub deleted a comment from mulyana883Oct 21, 2025
@glasscoastwindowsanddoors-eng

This comment was marked as spam.

@lukevollmer964-ai

This comment was marked as spam.

@bayusaputra202405-cmd

This comment was marked as spam.

@18488292860-coder18488292860-coder left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@18488292860-coder18488292860-coder left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@wissamblue69-dotcom

This comment was marked as spam.

@CyberNFTCyberNFT left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeyjoy123r-stack

Copy link
Copy Markdown

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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contentThis issue or pull request belongs to the Docs Content teamgithub_actionsPull requests that update GitHub Actions codeSME reviewedAn SME has reviewed this issue/PRwaiting for reviewIssue/PR is waiting for a writer's review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@wrslatz@Sharra-writes@dhianne92@uchitwai@glasscoastwindowsanddoors-eng@lukevollmer964-ai@bayusaputra202405-cmd@wissamblue69-dotcom@jeyjoy123r-stack@JarLob@subatoi@CyberNFT@mulyana883@18488292860-coder@docs-bot