Skip to content

Commit bce193a

Browse files
authored
security: fix expression injection in triage-issue.yml (#1672)
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.
1 parent 4c6e76a commit bce193a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/triage-issue.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ jobs:
5656
env:
5757
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5858
ISSUE_NUMBER: ${{ github.event.issue.number }}
59+
LABELS: ${{ steps.run_script.outputs.labels }}
5960
run: |
6061
# Convert comma-separated labels to gh command arguments
61-
IFS=',' read -ra ADDR <<< "${{ steps.run_script.outputs.labels }}"
62+
IFS=',' read -ra ADDR <<< "$LABELS"
6263
priority_added=false
6364
for i in "${ADDR[@]}"; do
6465
# Trim whitespace
@@ -70,4 +71,4 @@ jobs:
7071
fi
7172
done
7273
# Remove 'triage me' label
73-
gh issue edit "$ISSUE_NUMBER" --remove-label "triage me" || true
74+
gh issue edit "$ISSUE_NUMBER" --remove-label "triage me" || true

0 commit comments

Comments
 (0)