World map

 

BM: Baca dalam Bahasa Melayu

World C4: Pipeline Shields

Script injection

You will learn: how a stranger's title can become a command, and the env: fix.

Checked with GitHub Actions 2026-10 on 31 Oct 2026

The problem

Your robot thanks everyone who opens an issue:

- run: echo "Thanks for ${{ github.event.issue.title }}"

Who writes that title?

Pick one answer.

Watch

Tap each point on the timeline.

Tap through it. The title became code. An order slip with a hidden instruction: that is script injection: An order slip with a hidden instruction: text from a stranger becomes a command in your run: script..

Predict

The fix: pass the title through env: first. Bash then sees plain data, never code.

- run: echo "Thanks for $TITLE"
  env:
    TITLE: ${{ github.event.issue.title }}

Same sneaky title. What does bash print now?

Pick one answer.

Try it

Tap every line where a stranger’s text becomes code.

Tap every risky line. Each one shows the attack and the fix.

Workflow file .github/workflows/greet.yml

Try it

Build the safe welcome robot. Pass the title through env:.

Tap blocks to add them. Put them in order.

Blocks

Your workflow

Tap a block above to start.

Workflow file .github/workflows/

name: Welcome

What runs

Nothing to run yet.

Check

Safe straight inside run:, or should it go through env:? Swipe each value.

Swipe right for good, left for needs work. Or use the buttons.

1 / 4${{ github.event.issue.title }}
${{ github.event.issue.title }}

You did it!

You can now stop a stranger’s text from turning into a command.

Go deeper (optional)

Tools catch this for you. actionlint warns that a value “is potentially untrusted”. CodeQL has a check too. Another fix: a small JavaScript action that takes the value as an input. Real rep: search your workflows for github.event inside run: lines.