Content exclusion incorrectly blocks commands when a child process loads .env
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 55/100
Direção de pesquisa
Comece reproduzindo o comando aprovado com a regra da organização que exclui **/.env, usando a aplicação Python e load_dotenv() descritos na issue. Rastreie o tratamento da exclusão de conteúdo para processos filhos; considera-se concluído quando a aplicação aprovada é iniciada enquanto o conteúdo de .env permanece indisponível para o Copilot como contexto do modelo.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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/
- Linguagem predominante
- Shell
- Estrelas
- 11.2k
- Forks
- 1.9k
- Merge médio
- 14h 16min
- PRs com merge (30d)
- 6
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/copilot-cli
-
triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/copilot-cli#4848 ·
-
area:agents area:mcp
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/copilot-cli#4729 ·
-
area:sessions
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/copilot-cli#4712 ·
-
triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
github/copilot-cli#4638 ·
-
Expose large_output_file_path on TaskShellProgress so clients can read complete shell-task output Abertaarea:tools
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
github/copilot-cli#4630 · 1 comentário ·
Todas as issues de github/copilot-cli
Issues semelhantes
-
Update Vish to 1.1.5 Abertapackage-update
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
oSoWoSo/vOid_Community_repOsitory#144 · 1 comentário ·
-
help wanted new command
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
tldr-pages/tldr#24151 ·
-
PacReq: Rune IDE Abertapackage request
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
pacstall/pacstall-programs#9402 ·
-
[BUG] ci: the first prefetch-images.sh call runs before shard.txt exists, so it is always a no-op Abertabug github-actions
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
update-request
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
msys2/MINGW-packages#31768 ·