scanDiff ignores commitConfig.diff.block rules from the --config file
Los mantenedores suelen responder en 1 día
@goldensyntax ya está trabajando en esto.
Desde el 2/11/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Empieza con scanDiff.ts en src/proxy/processors/push-action, donde getCommitConfig() y getPrivateOrganizations() se ejecutan una vez al cargar el módulo (líneas 24-25). Compara con isMessageAllowed en checkMessages.ts, que lee la configuración en cada ejecución, y revisa cómo index.ts aplica --config en las líneas 50-51 después de importar el proxy. Está terminado cuando un diff que contiene un literal del bloque commitConfig.diff.block del archivo --config es rechazado por scanDiff al iniciar el proxy con --config.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
When Git Proxy is started with --config <file>, scanDiff doesn't enforce the
commitConfig.diff.block rules (literals, patterns, providers) from that file. Pushes that
should be blocked go to approval instead, with no error or warning.
Cause
scanDiff reads its config once, when the module is imported
(src/proxy/processors/push-action/scanDiff.ts, lines 24–25):
const commitConfig = getCommitConfig();
const privateOrganizations = getPrivateOrganizations();
index.ts imports the proxy on line 25 but only applies --config on lines 50–51, so
scanDiff keeps the default config, where the block lists are empty.
Other processors read config each time they run (e.g. getCommitConfig() inside
isMessageAllowed in checkMessages.ts), so they aren't affected.
To reproduce
-
Add a diff block rule to a config file:
"commitConfig": { "diff": { "block": { "literals": ["blocked.example.com"], "patterns": [], "providers": {} } } } -
Start Git Proxy with
--config <that file>. -
Push a commit that adds a line containing
blocked.example.com.
Expected: the push is blocked by scanDiff.
Actual: scanDiff passes and the push goes to approval.
Setting the CONFIG_FILE environment variable to the same file makes it work, because
it's read before scanDiff loads.
Reproduced on 2.2.0 and 2.3.0.
Suggested fix
Move the two calls into the code that runs per push, as checkMessages does, e.g.:
const combineMatches = (organization: string) => {
const commitConfig = getCommitConfig();
const privateOrganizations = getPrivateOrganizations();
// ...
};
Happy to pick this issue up in a week or two.
- Lenguaje dominante
- TypeScript
- Estrellas
- 263
- Forks
- 185
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 39
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de finos/git-proxy
-
documentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
finos/git-proxy#1878 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
checkUserPushPermission is checking the wrong user's permission to pushQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
finos/git-proxy#1400 · 17 comentarios ·
Los mantenedores suelen responder en 1 día
-
meeting
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
meeting
Dificultad 1/5 Menos de una hora Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de finos/git-proxy
Issues similares
-
[Text] Add Reading Time & Word Count Estimator for Reflection Notes in src/lib/text/reading-time.tsAbiertoarea:core beginner-friendly community contributions-welcome difficulty:easy enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timingAbiertoe2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
devswha/herdr-web-ui#2884 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
b:minor bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
software-mansion/argent#1771 ·
Los mantenedores suelen responder en 1 día