token-hygiene: `cat .env.local 2>/dev/null` counts as redacted

Aberta
#1,690 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
Meio dia
Facilidade para iniciantes
38/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
security, typescript
Domínio
devtools, security

Direção de pesquisa

Start in .claude/hooks/repo/token-hygiene/index.mts, where any > in a command is treated as a redaction step, and the .env read rule matches only bat|cat|head|less|more|tail. First confirm whether fleet/index.cjs loads this file or a synced copy, since that decides where the fix goes. Done means cat .env.local 2>/dev/null and cat .env.local 2>&1 are blocked, other readers of .env files are caught, and existing hook tests still pass.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

In .claude/hooks/repo/token-hygiene/index.mts, any > in the command counts as a redaction step, so cat .env.local 2>/dev/null and cat .env.local 2>&1 are allowed while still printing every value to stdout. The .env read rule also only names bat|cat|head|less|more|tail, so other readers of the same file pass it.

I checked the rules in this file against our spellings by copying its patterns; I couldn't tell from the repo whether fleet/index.cjs runs this file or its own copy, so this may apply only to the copies synced to other repos. Happy to send the full list and a PR. I build Paveo, an open-source test for agent guards: uvx paveo test runs a repo's hooks the way Claude Code calls them.

Linguagem predominante
TypeScript
Estrelas
335
Forks
74
Merge médio
1d 11h
PRs com merge (30d)
91

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de SocketDev/socket-cli

Todas as issues de SocketDev/socket-cli

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.