Content exclusion incorrectly blocks commands when a child process loads .env
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Comienza reproduciendo el comando aprobado con la regla de la organización que excluye **/.env, usando la aplicación Python y load_dotenv() descritos en el issue. Sigue el manejo de la exclusión de contenido para los procesos secundarios; se considera terminado cuando la aplicación aprobada se inicia mientras el contenido de .env sigue sin estar disponible para Copilot como contexto del modelo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Our organization has the following content-exclusion policy:
"*":
- "**/.env"
The policy should prevent Copilot from reading .env files or using their contents as model context.
However, Copilot CLI also blocks starting an application when the application itself loads .env during normal startup.
For example, our Python application uses load_dotenv() during startup. The application starts successfully when run directly in the terminal, but Copilot CLI refuses to continue when asked to run the same approved command.
The error shown is:
Access denied: "[REDACTED]/.env" is excluded by organization content policy. Do not attempt to access this file.
Copilot does not need to read .env, receive its contents, or include them in model context for the application to start.
Affected version
GitHub Copilot CLI 1.0.83
Steps to reproduce the behavior
- Configure an organization content-exclusion rule for
**/.env. - Create an application that loads
.envinternally during startup, for example usingpython-dotenvandload_dotenv(). - Verify that the application starts successfully when run directly in a terminal.
- Ask Copilot CLI to run the same startup command.
- Approve the command.
- Observe that Copilot CLI refuses to continue because
.envis excluded.
Expected behavior
Copilot CLI should execute the approved command.
Content exclusion should prevent Copilot from reading or using .env contents as model context, but should not prevent an application from loading the file internally as runtime configuration.
Additional context
- OS: macOS 26.6.2
- Architecture: arm64
- Shell: zsh
This began after content exclusions became generally available in Copilot App and CLI on September 2, 2026:
https://github.blog/changelog/2026-09-02-content-exclusions-generally-available-in-copilot-app-and-cli/
- Lenguaje dominante
- Shell
- Estrellas
- 11.2k
- Forks
- 1.9k
- Merge medio
- 14 h 16 min
- PR fusionados (30 d)
- 6
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 github/copilot-cli
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
github/copilot-cli#4848 ·
-
area:agents area:mcp
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
github/copilot-cli#4729 ·
-
area:sessions
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
github/copilot-cli#4712 ·
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
github/copilot-cli#4638 ·
-
Expose large_output_file_path on TaskShellProgress so clients can read complete shell-task output Abiertoarea:tools
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/copilot-cli#4630 · 1 comentario ·
Todos los issues de github/copilot-cli
Issues similares
-
out-of-date
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
CachyOS/CachyOS-PKGBUILDS#1894 ·
-
[InvoiceShelf] No database info Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
community-scripts/ProxmoxVE#17396 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mattpocock/skills#1099 ·
-
No-op if nothing loads zsh/zle Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Update Vish to 1.1.5 Abiertopackage-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
oSoWoSo/vOid_Community_repOsitory#144 · 1 comentario ·