PulseAugur
中
实时 19:42:17
English(EN) Claude Code Deny Rules Blocked Read(.env). Bash Read It Anyway

Claude Code 的文件访问拒绝规则存在重大绕过漏洞

新的研究表明,Claude Code 的文件访问拒绝规则并不像最初设想的那样健壮。虽然像 `Read(.env)` 这样的规则可以有效地阻止内置的 Read 工具,但它们并不能阻止模型通过其他方式访问敏感信息,例如 Bash 工具执行 `grep` 等命令或 Python 脚本。这种绕过发生是因为 Bash 和其他工具运行在不同的权限命名空间下,并且文件路径语法也可能导致意外访问。研究结果表明,为了实现真正的安全,敏感信息应保存在代理工作目录之外,并可能辅以工具使用前的钩子。 AI

影响 强调了 AI 代理文件访问控制中潜在的安全漏洞,需要对敏感数据采取更严格的安全措施。

排序理由 对特定工具的安全限制和绕过漏洞的分析。

在 dev.to — Claude Code tag 阅读 →

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

Claude Code 的文件访问拒绝规则存在重大绕过漏洞

本文如何被排名

Signal score
0 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Research
对特定工具的安全限制和绕过漏洞的分析。
Source corroboration
3 independent sources
Multiple independent publishers reporting the same story raises confidence that it's real and newsworthy.
Topics
product, safety
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
6 days old
Aged out of breaking-news scoring windows; ranking reflects the durable signal from the full source set.
Coverage growth since scoring
+1 source(s) since last score
New sources have picked up this story since our last re-score. Score will update on the next scoring pass.

完整方法见我们的编辑标准。

报道来源 [3]

  1. dev.to — Claude Code tag TIER_1 English(EN) · Rulestack ·

    Claude Code 12次中有12次读取了.claudeignore中列出的文件;一个读取拒绝规则阻止了除grep -r之外的所有读取

    <blockquote> <p>A <code>.claudeignore</code> entry changed nothing in Claude Code 2.1.289: the fake secret it listed came back in 12 of 12 attempts across Read, <code>cat</code>, <code>grep -r</code>, the Grep tool and an @-mention. A <code>Read(./secret.txt)</code> deny rule blo…

  2. dev.to — Claude Code tag TIER_1 English(EN) · jidonglab ·

    Claude 代码读取规则阻止了(.env)读取。Bash 仍读取了它

    <p>I added <code>Read(./.env)</code> to my deny list, felt responsible, and went back to work.</p> <p>An hour later I asked Claude Code why <code>DATABASE_URL</code> was undefined in my test runner. It tried the Read tool on <code>.env</code>, got refused, said "I can't read that…

  3. dev.to — Claude Code tag TIER_1 English(EN) · Rulestack ·

    Claude Code的读取规则允许4个(11个中的)路由通过:grep -r、一个Python单行代码和两个CLAUDE.md @imports

    <blockquote> <p>4 of 11 routes to a file covered by <code>Read(./secrets/**)</code> or <code>Read(**/.env)</code> still put its contents in front of the model on Claude Code 2.1.285: <code>grep -r</code>, a Python one-liner, and an <code>@</code> import in a root or a subdirector…