build: fix expression injection in triage-issue.yml#1672
Merged
dkhawk merged 1 commit intogooglemaps:mainfrom Apr 14, 2026
Merged
build: fix expression injection in triage-issue.yml#1672dkhawk merged 1 commit intogooglemaps:mainfrom
dkhawk merged 1 commit intogooglemaps:mainfrom
Conversation
Move ${{ steps.run_script.outputs.labels }} from run: block to env: block to prevent GitHub Actions expression injection. Attacker-controlled issue body can prompt-inject Gemini API response, which flows unsanitized through ${{ }} into shell, enabling arbitrary command execution and secret exfiltration.
Collaborator
|
@XananasX7 , are you a large language model, or is this your own writing? |
Contributor
Author
|
@kikoso |
dkhawk
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes GitHub Actions expression injection vulnerability in the Apply Labels step of the issue triage workflow.
Problem
${{ steps.run_script.outputs.labels }}was expanded directly into a shellrun:block. Since the labels originate from Gemini API output (which processes attacker-controlled issue body), a prompt injection attack can cause the API to return labels containing shell metacharacters ($(),",;). GitHub Actions expands${{ }}before bash parses the script, enabling arbitrary command execution and exfiltration ofGEMINI_API_KEYandGITHUB_TOKEN.Fix
Moved
${{ steps.run_script.outputs.labels }}to theenv:block asLABELS, then reference it as$LABELSin the shell. Environment variables are not subject to expression injection.