.gitignore 保护不了你的密钥npm 包和 AI Agent 都可能读到 .env

很多开发者以为只要把 env 写入 gitignore,密钥就安全了,实际上 gitignore 仅仅是阻止 git 把这个文件提交到代码仓库,它没有系统层