[Bug] Potential command injection risk in auto_assign_reviewers GitHub Actions workflow
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
Piste de recherche
Commencez par examiner .github/workflows/auto_assign_reviewers.yml et suivez les métadonnées des fichiers modifiés depuis l’événement pull_request_target, à travers le mapping intermédiaire et l’évaluation du shell. Remplacez le traitement non sécurisé par une approche qui ne construit pas de code shell à partir des noms de fichiers, puis vérifiez que les pull requests non fiables ne peuvent pas injecter de commandes, tout en conservant le comportement requis d’attribution des reviewers et les permissions.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
RT-Thread Version
master branch, commit 630f4fa7a37ca99af5952946eea327cf9f1df21c Affected file: .github/workflows/auto_assign_reviewers.yml
Hardware Type/Architectures
Not hardware-specific. This issue affects a GitHub Actions workflow in the repository, not a specific BSP, board, MCU, or CPU architecture.
Develop Toolchain
Other
Describe the bug
This is a security-sensitive GitHub Actions workflow issue. I am intentionally not including the full PoC payload in this public issue. I can provide the detailed validation case privately to the maintainers if needed.
Summary
The affected workflow appears to be:
.github/workflows/auto_assign_reviewers.yml
The workflow processes pull request changed-file metadata in a pull_request_target context. The changed file names are attacker-controlled input. The workflow then stores these file names in an intermediate mapping and later reconstructs shell data structures from that mapping using shell evaluation logic.
If pull request file names are not safely encoded before reaching shell evaluation, specially crafted file names may be interpreted as shell syntax. This can lead to command injection in the GitHub Actions workflow.
Current version checked
I checked the current master branch at:
630f4fa7a37ca99af5952946eea327cf9f1df21c
At this commit, the relevant workflow structure still appears to be present.
Security impact
If exploitable, an attacker who can open or update a pull request may be able to execute shell commands in the affected GitHub Actions workflow context.
This is security-relevant because the workflow runs under pull_request_target and has pull request write permission.
I did not attempt to read, print, exfiltrate, or use any token or secret. I also did not run a destructive test against the project infrastructure.
High-level technical indicators
The risky pattern appears to involve:
pull_request_targetworkflow trigger;- reading changed file names from pull request metadata;
- writing pull request file names into an intermediate mapping without sufficient encoding;
- reconstructing shell variables from that mapping using shell evaluation;
- running the workflow with
pull-requests: writepermission.
I am omitting the exact payload and reproduction filename from this public issue to avoid making the issue directly exploitable.
Suggested remediation
Possible remediation approaches:
- Avoid using shell
evalon data derived from pull request metadata. - Do not construct shell code from pull request file names.
- Treat all pull request file names as untrusted input.
- Use a safe JSON processing path, such as Python
jsonor directjqprocessing, instead of converting JSON data into shell assignments. - Safely encode or reject file names containing shell metacharacters before processing.
- Reduce permissions for jobs that process untrusted pull request metadata.
- Consider splitting the workflow into:
- a low-privilege job that computes reviewer information;
- a separate trusted job that performs pull request write operations only after consuming sanitized output.
Private details
I can provide maintainers with:
- exact source-to-sink explanation;
- affected workflow snippets;
- current commit evidence;
- non-destructive maintainer-side validation steps;
- full PoC details using a harmless marker only.
Please let me know the preferred way to share those details privately.
Other additional context
GitHub Actions workflow environment.
Relevant context:
- GitHub Actions
- pull_request_target event
- ubuntu-22.04 runner
- bash / jq based workflow scripts
- Langage dominant
- C
- Étoiles
- 12.4k
- Forks
- 5.5k
- Merge moyen
- 3 j 7 h
- PR mergées (30 j)
- 79
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de RT-Thread/rt-thread
-
Arch: ARM/AArch64 Doc
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
RT-Thread/rt-thread#12082 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
RT-Thread/rt-thread#11951 · 2 commentaires ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug] [libc] timer_gettime 拆秒前将总纳秒截断为 uint32_t,剩余时间查询错误Peut-être à nouveau libre @Yunlk l’a pris il y a 28 jours, et aucune pull request n’est ouverte. Ouvertein progress
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
RT-Thread/rt-thread#11924 · 7 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug] dfs_v2 tmpfs: ftruncate(fd, 0) frees the file buffer but reports success — use-after-free read/write and double free from a legal POSIX callPeut-être pris @remukisama l’a pris il y a 33 jours. Ouvertein progress
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
RT-Thread/rt-thread#11902 · 4 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
[bsp][stm32][bluepill] README「快速上手」缺少重新生成 MDK 工程这一步,按文档操作无法编译通过Peut-être à nouveau libre @moment-NEW l’a pris il y a 50 jours, et aucune pull request n’est ouverte. Ouvertein progress
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
RT-Thread/rt-thread#11818 · 4 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de RT-Thread/rt-thread
Issues similaires
-
Builder: a structure opened without calculation data shows the Diffraction (fibre) view by defaultOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
FriendsofECCE/ECCE#1245 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/nuttx-apps#4108 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 84/100
VirtualBox/virtualbox#996 ·
Les mainteneurs répondent en général sous 6 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
trezor/trezor-firmware#8357 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour