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

未關閉
#1,690 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
半天
新手友好度
38/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
security, typescript
領域
devtools, security

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
TypeScript
星號
335
分支
74
平均合併
1 天 11 小時
30 天內合併 PR
91

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

SocketDev/socket-cli 的其他 Issue

查看 SocketDev/socket-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。