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

Security issue: possible command injection in GitHub Actions workflow

オープン
#2 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
1
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、参照されているコミットの .github/workflows/summary.yml を読み、推論レスポンスが gh issue comment --body にどのように渡されているかに注目してください。信頼できない出力が環境変数を介して転送され、引用符付きのシェル変数として参照されていることを確認してください。ワークフローが推論出力をシェルコマンドコンテキストに直接配置しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github-actions, shell
領域
ci-cd, security
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。