github / github/platform-samples
block_file_extensions.sh can be circumvented with fork + PR
- Lenguaje dominante
- Shell
- Estrellas
- 2.2k
- Forks
- 1.9k
- Merge medio
- 7 d 19 h
- PR fusionados (30 d)
- 1
Descripción
The `block_file_extensions.sh` pre-receive-hook can be circumvented by:
1. Fork the repository
2. Add a file with the blocked exension
3. Submit a pull request
4. Merge pull request
We've done a little research and suspect that this is due to the:
```
excludeExisting="--not --all"
```
I guess we could mitigate, e.g. by adding `block_self_merge_prs.sh`, but this could still be circumvented if 2 users with write privileges colluded.
Any thoughts?
Guía de contribución
Línea de trabajo
Start by reviewing block_file_extensions.sh, especially the excludeExisting="--not --all" behavior, and trace how forked pull requests are evaluated. The issue does not name a test or a concrete fix; done would require an agreed mitigation that prevents the reported bypass while addressing the stated collusion concern.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- security
- Tipo de issue
- Error
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100