## TL;DR

Interpolating them into a run script builds shell code out of untrusted input. A crafted title can break out of your quoting and run arbitrary commands with the workflow's permissions.

## Steps

1. Values from the GitHub context, like a pull request title or issue body, are attacker-controlled. Interpolating them into a run script builds shell code out of untrusted input. A crafted title can break out of your quoting and run arbitrary commands with the workflow's permissions.

2. A run step like: echo "Title is ${{ github.event.issue.title }}"
If the title contains shell metacharacters, that echo line becomes whatever the attacker wants it to be.

3. Preferred for inline scripts: copy the value into an intermediate environment variable, then reference the variable. The value stays data, never code:
 env:
 TITLE: ${{ github.event.pull_request.title }}
 and then use "$TITLE" in the script body.
2. Better for complex handling: write a small JavaScript action that takes the value as an input argument. The value is passed as data to the action and never interpolated into a script, so injection is structurally impossible.

4. - Grep workflows for expression interpolation inside run blocks. Every interpolation of event data is suspect.
- Treat issue titles, PR titles and bodies, branch names, and commit messages as untrusted, always.

## When to use

You are seeing this: Values from the GitHub context, like a pull request title or issue body, are attacker-controlled. Use this skill when you run into "Script injection in Actions: stop interpolating expressions into run steps".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
