Skip to content

Commit bc5c6cb

Browse files
committed
Test that a failing scan can still be merged (rule is in evaluate mode)
1 parent de173ae commit bc5c6cb

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)