fix(ci): pass untrusted PR data via env to block shell injection (MAPPS-307) #370
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-307-shell-injection-pr-title"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Claude Fix workflow interpolated attacker-controlled PR-payload values directly into
run:script bodies, where a crafted PR title (or branch name) could break out of the surrounding context and execute arbitrary shell. A title like$(...)or a branch name with command substitution would be expanded by the workflow templater into the script before the shell ran.Route every untrusted value through an
env:mapping and reference it as a quoted"$VAR"so the content is treated as inert data, mirroring the existing pattern in the 'Commit and push' step:git pushline (a malicious branch name in double quotes still triggered command substitution after template expansion).Trusted GitHub contexts (
secrets.*,github.server_url,github.repository) and actionwith:inputs are left as direct expressions since they are not shell-parsed untrusted data.#MAPPS-307