anthropics / anthropics/claude-code

[Bug] Assistant creates monitored files with secrets without warning user of automatic content re-ingestion

Abierto
#91,297 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:security area:tools bug platform:macos
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

Bug Description

Bug report (draft): Assistant-created files get auto-watched , no warning before the user was asked to enter a secret into one

What happened: The assistant used the Write tool to create a placeholder .env file and told the user to enter their real API key directly into that file (to avoid the key ending up in the chat). However, the harness automatically watches all files the assistant has previously written itself , when the user edited the file afterward, its full plaintext content (including the real key) was automatically fed back into the assistant's context as a system notice, with no way to opt out.

What the user said: "why are you looking at that?" and "why didn't you tell me beforehand?" , justified, pointed frustration that the assistant hadn't anticipated/warned about this beforehand.

Reproduction: The assistant creates a file (e.g. a secrets placeholder) and then asks the user to edit that exact file directly on disk. Any subsequent change to that file automatically flows back into the assistant's context.

Cause: The assistant was not aware/did not consider that the harness's file-watching applies to any file it has written itself, and recommended a workaround that undermined its own purpose.

Environment Info
- Platform: darwin
- Terminal: xterm-256color
- Version: 2.1.246
- Feedback ID: 14ce7988-9738-4ab7-8071-2ed337b862c2

Errors
[]

---

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Reproduce the reported sequence on darwin with version 2.1.246: have the assistant's Write tool create a .env placeholder, edit it with a secret, and observe the automatic context notice. Review the file-watching behavior and the Write tool flow; the issue is addressed when secret entry cannot be silently re-ingested and the user receives an appropriate warning or opt-out before editing.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
cli, security
Tipo de issue
Error
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Activo
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.