jd-opensource / jd-opensource/jd-github-template
Security issue: possible command injection in GitHub Actions workflow
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hello maintainers,
I would like to report a potential command-injection vulnerability in your GitHub Actions workflow.
The affected workflow file(s) invoke an LLM to process and summarize issues, and then directly concatenate the LLM output into a shell command argument for gh issue comment --body. Because untrusted model output is inserted into a shell command context, an attacker may craft a malicious issue so that the LLM response contains an injection payload.
Impact:
- Possible command injection during workflow execution.
- Possible leakage of sensitive environment variables (for example
GITHUB_TOKENorGH_TOKEN). - Although these tokens are typically short-lived and scoped to workflow job/step execution, an attacker may attempt to prolong execution time (for example via sleep-based techniques) and abuse the token during that window.
Recommended remediation:
- Do not place
${{ steps.inference.outputs.response }}directly in a shell command argument. - Pass it through a step environment variable first (for example
RESPONSE). - In shell, reference it only as a double-quoted variable (for example
"$RESPONSE").
Affected workflow file(s) observed:
Thank you for your time and for maintaining this project.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo .github/workflows/summary.yml al commit indicato, concentrandoti su come la risposta dell’inferenza viene passata a gh issue comment --body. Conferma che l’output non attendibile venga trasferito tramite una variabile d’ambiente e referenziato come variabile shell tra virgolette. Il lavoro è completato quando il workflow non inserisce più direttamente l’output dell’inferenza nel contesto di un comando shell.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- github-actions, shell
- Ambito
- ci-cd, security
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100