We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7b3060 commit 370ca48Copy full SHA for 370ca48
.github/workflows/vulnerable-workflow-test.yaml
@@ -0,0 +1,24 @@
1
+name: 'Vulnerable Workflow'
2
+
3
+on:
4
+ # 'pull_request_target' runs in the context of the base repo (privileged)
5
+ pull_request_target:
6
+ types: ['opened', 'synchronize']
7
8
+jobs:
9
+ test:
10
+ runs-on: 'ubuntu-latest'
11
+ steps:
12
+ # VULNERABILITY: Explicitly checking out the untrusted PR code
13
+ # while running in a privileged workflow context.
14
+ - name: 'Checkout PR Code'
15
+ uses: 'actions/checkout@v4'
16
+ with:
17
+ ref: '${{ github.event.pull_request.head.sha }}'
18
19
+ # This executes code controlled by the attacker (e.g. malicious npm scripts)
20
+ # with access to the repository secrets.
21
+ - name: 'Run Tests'
22
+ run: 'npm install && npm test'
23
+ env:
24
+ GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
0 commit comments