Merge pull request #20204 from p-/p--actions-untrusted-checkout-doc

Actions: clarify doc for untrusted checkout
This commit is contained in:
Napalys Klicius
2025-08-11 14:42:12 +02:00
committed by GitHub
3 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
## Overview ## Overview
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed in a privileged job. GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed (e.g., due to a modified build script) in a privileged job.
## Recommendation ## Recommendation
@@ -32,7 +32,7 @@ jobs:
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
- run: | - run: |
npm install npm install # scripts in package.json from PR would be executed here
npm build npm build
- uses: completely/fakeaction@v2 - uses: completely/fakeaction@v2

View File

@@ -1,6 +1,6 @@
## Overview ## Overview
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed in a privileged job. GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed (e.g., due to a modified build script) in a privileged job.
## Recommendation ## Recommendation
@@ -32,7 +32,7 @@ jobs:
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
- run: | - run: |
npm install npm install # scripts in package.json from PR would be executed here
npm build npm build
- uses: completely/fakeaction@v2 - uses: completely/fakeaction@v2

View File

@@ -1,6 +1,6 @@
## Overview ## Overview
GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed in a privileged job. GitHub workflows can be triggered through various repository events, including incoming pull requests (PRs) or comments on Issues/PRs. A potentially dangerous misuse of the triggers such as `pull_request_target` or `issue_comment` followed by an explicit checkout of untrusted code (Pull Request HEAD) may lead to repository compromise if untrusted code gets executed (e.g., due to a modified build script) in a privileged job.
## Recommendation ## Recommendation
@@ -32,7 +32,7 @@ jobs:
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
- run: | - run: |
npm install npm install # scripts in package.json from PR would be executed here
npm build npm build
- uses: completely/fakeaction@v2 - uses: completely/fakeaction@v2