Skip to content

Fix template injection vulnerabilities in workflows#27184

Open
dschuff wants to merge 1 commit into
emscripten-core:mainfrom
dschuff:template-inj
Open

Fix template injection vulnerabilities in workflows#27184
dschuff wants to merge 1 commit into
emscripten-core:mainfrom
dschuff:template-inj

Conversation

@dschuff

@dschuff dschuff commented Jun 25, 2026

Copy link
Copy Markdown
Member

Address security findings from zizmor by passing GitHub context
variables through the environment instead of expanding them directly
in shell scripts.

Address security findings from zizmor by passing GitHub context
variables through the environment instead of expanding them directly
in shell scripts.

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just use single quotes here instead?

Funny I was just telling @tlively about this crazy injection the other day

@dschuff

dschuff commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

I think using single quotes won't do it, because an attacker who controls github.base_ref can inject either single or double quotes into it to terminate the string and follow it with a malicious command. (which gets written into the temporary script). Using env variables means that the value doesn't get written into the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants