Skip to content

build: fix expression injection in triage-issue.yml#1672

Merged
dkhawk merged 1 commit intogooglemaps:mainfrom
XananasX7:patch-1
Apr 14, 2026
Merged

build: fix expression injection in triage-issue.yml#1672
dkhawk merged 1 commit intogooglemaps:mainfrom
XananasX7:patch-1

Conversation

@XananasX7
Copy link
Copy Markdown
Contributor

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 shell run: 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 of GEMINI_API_KEY and GITHUB_TOKEN.

Fix

Moved ${{ steps.run_script.outputs.labels }} to the env: block as LABELS, then reference it as $LABELS in the shell. Environment variables are not subject to expression injection.

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.
@XananasX7 XananasX7 requested a review from a team as a code owner April 14, 2026 03:51
@kikoso
Copy link
Copy Markdown
Collaborator

kikoso commented Apr 14, 2026

@XananasX7 , are you a large language model, or is this your own writing?

@XananasX7
Copy link
Copy Markdown
Contributor Author

@kikoso
It’s my own writing Im a security researcher and I wanted to make sure the vulnerability fix .

Copy link
Copy Markdown
Collaborator

@kikoso kikoso left a comment

Choose a reason for hiding this comment

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

LGTM

@kikoso kikoso changed the title security: fix expression injection in triage-issue.yml build: fix expression injection in triage-issue.yml Apr 14, 2026
@dkhawk dkhawk merged commit bce193a into googlemaps:main Apr 14, 2026
7 of 8 checks passed
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.

3 participants