Copilot constantly nags about "parent directory" access when it's clearly in a subfolder of the project directory
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Shell
- Estrellas
- 11.2k
- Forks
- 1.9k
- Merge medio
- 14 h 16 min
- PR fusionados (30 d)
- 6
Descripción
Describe the bug
When using Claude Opus, it will occasionally cd into a lower directory and then access a sibling directory using the relative parent directory shortcut (..). This will inevitably be flagged by Copilot CLI as going outside of the project directory, which is clearly incorrect. Rather than assuming .. is going out of the project directory, Copilot CLI should be getting the absolute directory and checking that.
Affected version
Copilot v1.0.80
Steps to reproduce the behavior
Example issue:
- Start Copilot CLI in
/work. - Ask Claude to review code with a deep directory structure.
- Claude will use something like the following command:
cd subfolder/subfolder3/subfolder5 && grep -rn "searching for text" ../subfolder4 - The CLI incorrectly "warns" me that it's accessing a directory outside my workspace. And then wants me to add
../subfolder4to my "allowed" directories, which is not secure. If it was added to the "allowed" directories, it actually could do it at the top level.
Expected behavior
The CLI should be converting relative addressing to absolute addressing and checking the full path.
Additional context
No response
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.
Línea de trabajo
Empieza reproduciendo el comando indicado desde una sesión de Copilot CLI cuyo directorio de trabajo sea /work, especialmente la ruta relativa ../subfolder4 después de cambiar de directorio. Traza la comprobación de acceso al workspace de la CLI y verifica que resuelve la ruta del comando antes de compararla. Se considera completado cuando se acepta un elemento hermano dentro del workspace sin mostrar un aviso de allow-list, mientras que una ruta realmente externa sigue siendo rechazada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- cli, security
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 66/100