We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de173ae commit bc5c6cbCopy full SHA for bc5c6cb
1 file changed
.github/workflows/vulnerable_test.yml
@@ -0,0 +1,23 @@
1
+name: 'Vulnerable Workflow'
2
+
3
+on:
4
+ pull_request_target:
5
+ types: ['opened', 'synchronize']
6
7
+jobs:
8
+ vulnerable-job:
9
+ runs-on: 'ubuntu-latest'
10
+ steps:
11
+ - name: 'Checkout PR code (Unsafe)'
12
+ uses: 'actions/checkout@v3'
13
+ with:
14
+ ref: '${{ github.event.pull_request.head.sha }}'
15
16
+ - name: 'Run script'
17
+ run: |
18
+ echo "Running code from the PR..."
19
+ # In a real attack, this could be a script modified by the attacker
20
+ if [ -f ./script.sh ]; then
21
+ chmod +x ./script.sh
22
+ ./script.sh
23
+ fi
0 commit comments