script injection
An attack where untrusted text such as an issue title, pasted into a run script through an expression, ends the intended command and runs the attacker's own.
An injected command runs with the job's token and secrets.
In more detail
GitHub replaces expressions with their values before the shell starts, so quotes and semicolons in the value become script. Passing the value through an environment variable keeps it as data. actionlint reports untrusted inputs used directly in inline scripts.
Related terms
- pull_request_target — A pull request event that runs the base repository's workflow with its secrets and a write-capable token, even for pull requests from forks.
Taught in
- Environments: Reviewers, Wait Timers And Deployment Rules — GitHub Actions (GH-200) Exam Prep
- Script Injection: When An Issue Title Becomes Code — GitHub Actions (GH-200) Exam Prep