PulseAugur
实时 18:39:44
English(EN) How do you all stop Cursor from reading your .env?

Cursor AI 代码编辑器暴露敏感 .env 文件,用户寻求解决方案

AI 驱动的代码编辑器 Cursor 的用户遇到了该工具访问并可能暴露其 .env 文件中敏感信息的问题。据报道,该 AI 代理会读取这些文件以了解配置,即使它们被 gitignored 了,然后由于感知到的暴露而建议轮换密钥。开发者正在寻求解决方案,其中一位用户通过在运行时加载密钥来实现自定义 CLI,以完全避免存储 .env 文件。 AI

影响 突出了访问敏感项目配置的 AI 代码助手可能存在的安全风险。

排序理由 用户讨论特定功能行为以及软件工具中潜在的安全影响。

在 r/cursor 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

报道来源 [1]

  1. r/cursor TIER_2 English(EN) · /u/Zinzolino ·

    How do you all stop Cursor from reading your .env?

    <!-- SC_OFF --><div class="md"><p>Hit this with Claude Code, and from the threads here it sounds the same in Cursor: the agent opens your .env to &quot;understand the config&quot;, and gitignored does nothing, it just reads the file. Then it suggests I rotate the keys since they …