BM: Baca dalam Bahasa Melayu
World C4: Pipeline Shields · Boss challenge
Spot the holes
You will learn: to find and fix 5 security holes in a real-looking workflow, then prove it still works.
Checked with GitHub Actions 2026-10 on 31 Oct 2026
The problem
Tap each point on the timeline.
Mei copied a “PR helper” workflow from a blog. It runs green every day. Before it guards your public shop repo, find and fix its 5 holes.
Try it
Room 1: tap every hole. Each one shows the attack and the fix.
Tap every risky line. Each one shows the attack and the fix.
Workflow file .github/workflows/pr-helper.yml
Hint
Check the trigger, the permissions, runs-on, every uses: line and every run: line.Predict
The old file ran green every single day. Was it safe?
Pick one answer.
Try it
Room 2: build the safe PR helper. Each decoy is one of the holes.
Tap blocks to add them. Put them in order.
Blocks
Your workflow
Tap a block above to start.
Workflow file .github/workflows/
name: PR helper
What runs
Nothing to run yet.
Hint
Safe trigger, read key, hosted runner. Then checkout, the pinned check, the title in env, and the tests.Try it
Room 3: Mei adds a step that labels the PR “tested”. Red! Give the job only the key it needs. Then prove it is green.
The line is red. Fix the yellow lines, then run again.
Workflow file .github/workflows/pr-helper.yml
name: PR helper on: pull_request: permissions: contents: read jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 with: persist-credentials: false - run: npm ci && npm test - run: gh pr edit "$PR" --add-label tested env: GH_TOKEN: ${{ github.token }} PR: ${{ github.event.pull_request.number }}
Yellow: lines 4–5. You can change these.
The line
Pull request · feature → main
Hint
A label lives on the pull request.Check
Last check. Fixed, or still a hole? Swipe each line.
Swipe right for good, left for needs work. Or use the buttons.
on: pull_requestYou did it!
You can now find and fix the holes in any workflow.
Go deeper (optional)
Real rep (optional): run actionlint on your own workflows. Then hunt for the five holes by hand: the trigger, permissions:, runs-on:, every uses: and every run:. Fix one hole per pull request, so each change is easy to review.
Bahasa Melayu
Mei salin workflow “PR helper” dari sebuah blog. Ia jalan hijau setiap hari. Sebelum ia jaga repo kedai awam anda, cari dan baiki 5 lubangnya.
Bilik 1: tekan setiap lubang. Setiap satu tunjuk serangan dan pembaikannya.
Fail lama itu jalan hijau setiap hari. Adakah ia selamat?
Bilik 2: bina PR helper yang selamat. Setiap umpan ialah salah satu lubang.
Bilik 3: Mei tambah langkah yang label PR “tested”. Merah! Beri job itu kunci yang ia perlukan sahaja. Kemudian buktikan ia hijau.
Semakan terakhir. Dah dibaiki, atau masih lubang? Leret setiap baris.
Kini anda boleh cari dan baiki lubang dalam mana-mana workflow.
You finished this before. Practice is always welcome!
Official docs: Secure use reference · Script injections · Workflow syntax: permissions
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?