跳到正文
DEV Community· Alexandr G·· 5 小時前AI 評分29

將 PII tracer 從 Python 原封不動移植至 TypeScript,避免 coding agent 洩漏機密

Porting a PII tracer byte-exact from Python to TypeScript, so a coding agent cannot leak your secrets

AI 導讀

作者將 PII tracer 從 Python 逐位元組精確移植至 TypeScript,讓它能在 coding agent 的處理流程內執行。目標是在請求離開前先確保內容乾淨,而不是依賴提示詞保護 API key 等機密資料。

正文

Alexandr G

My coding agent is good at its job. It is also one cat .env away from sending my keys to a vendor. I did not want to trust a prompt for that. I wanted the request itself to be clean, provably, before it leaves.

This is the story of porting a PII tracer from Python to TypeScript - byte-exact - so it could run inside the agent's pipeline instead of next to it.

來源:DEV Community · dev.to