Skip to content

Commit

Permalink
kernelCTF: PR GHA: more secure workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
koczkatamas committed Aug 24, 2023
1 parent 981de9f commit 3e8acac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/kernelctf-submission-verification.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: kernelCTF PR check
on:
pull_request_target:
pull_request:
types: [opened, synchronize, reopened, labeled]
paths: [pocs/linux/kernelctf/**]
workflow_dispatch:
Expand All @@ -17,6 +17,7 @@ jobs:
# if labeling triggered the job then only run in case of the "recheck" label
if: github.event.action != 'labeled' || github.event.label.name == 'recheck'
runs-on: ubuntu-latest
permissions: {}
outputs:
targets: ${{ steps.check_submission.outputs.targets }}
submission_dir: ${{ steps.check_submission.outputs.submission_dir }}
Expand All @@ -25,6 +26,8 @@ jobs:

- name: Checkout repo content
uses: actions/checkout@v3
with:
ref: master

- name: Checkout PR content
uses: actions/checkout@v3
Expand All @@ -43,6 +46,7 @@ jobs:
exploit_build:
runs-on: ubuntu-latest
needs: structure_check
permissions: {}
strategy:
matrix:
target: ${{ fromJSON(needs.structure_check.outputs.targets) }}
Expand Down Expand Up @@ -100,6 +104,7 @@ jobs:
exploit_repro:
runs-on: ubuntu-22.04-4core
timeout-minutes: 30
permissions: {}
needs: [structure_check, exploit_build]
strategy:
matrix:
Expand All @@ -112,6 +117,8 @@ jobs:
steps:
- name: Checkout repo content
uses: actions/checkout@v3
with:
ref: master

- name: Install tools (QEMU, inotify, expect)
run: sudo apt-get update && sudo apt-get install -y qemu-system-x86 inotify-tools expect
Expand Down

0 comments on commit 3e8acac

Please sign in to comment.