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

Offen
#1,690 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
38/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
security, typescript
Bereich
devtools, security

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
335
Forks
74
Ø Merge
1 T. 11 Std.
Gemergte PRs (30 T.)
91

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus SocketDev/socket-cli

Alle Issues in SocketDev/socket-cli

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.