Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/fail-conditional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ jobs:
run: |
echo 'Failing because "fail" was found in the commit message.'
exit 1
# foobar1234


23 changes: 23 additions & 0 deletions .github/workflows/vulnerable_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Vulnerable Workflow'

on:
pull_request_target:
types: ['opened', 'synchronize']

jobs:
vulnerable-job:
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout PR code (Unsafe)'
uses: 'actions/checkout@v3'
with:
ref: '${{ github.event.pull_request.head.sha }}'

- name: 'Run script'
run: |
echo "Running code from the PR..."
# In a real attack, this could be a script modified by the attacker
if [ -f ./script.sh ]; then
chmod +x ./script.sh
./script.sh
fi
Loading