jd-opensource / jd-opensource/jd-github-template

Security issue: possible command injection in GitHub Actions workflow

Abierto
#2 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
1
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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_TOKEN or GH_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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza leyendo .github/workflows/summary.yml en el commit referenciado, centrándote en cómo se pasa la respuesta de inferencia a gh issue comment --body. Confirma que la salida no confiable se transfiere mediante una variable de entorno y se referencia como una variable de shell entrecomillada. La tarea estará terminada cuando el workflow deje de colocar la salida de inferencia directamente en un contexto de comando de shell.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
github-actions, shell
Área
ci-cd, security
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.