92 points shmulc 2 hours ago 71 comments
qezz 2 hours ago | parent
> Is it public?
>
> Search your GitHub organization for .claude/settings.local.json and .claude/settings.json. Each hit is a file anyone can read right now.
So, it's not necessarily "public", it's simply in the repository, and whether it's actually public or not depends on the repository settings.Or am I missing something
shmulc 2 hours ago | parent
mschuster91 1 hour ago | parent
Even then, you might not want every developer in your company to have the password to the production SQL database...
Aurornis 2 hours ago | parent
So pressing “Don’t Ask Again” by itself doesn’t expose passwords by itself. If you commit your local Claude settings and in those settings you have manually approved commands containing secrets directly in the command and then you publish the repo, that’s exposed.
shmulc 2 hours ago | parent
cassianoleal 1 hour ago | parent
kccqzy 37 minutes ago | parent
Anyways this probably indicates that these repos don’t have a good code review process. The settings.local.json file name screams it’s local and shouldn’t be committed.
Aurornis 19 minutes ago | parent
A fresh clone wouldn’t have the file. This claim doesn't make any sense.
The only way I can see this getting committed is if someone edited their global .gitignore or, more likely, did a whole directory transfer to do a different machine to work on.
rvz 2 hours ago | parent
This incident would have been caught in an open source harness. This one is closed source malware, and you don't know what Claude Code does internally to behave like this.
Yet another reason why you cannot trust a closed harness.
happyopossum 2 hours ago | parent
Same thing could/would happen with an open source harness.
cassianoleal 1 hour ago | parent
> Often Claude commits the file itself. In 539 of the 1,105 repos with a real secret that we traced, a commit co-authored by Claude changed the file. Those commits name every recent model, from Sonnet 4.5 to Opus 5.5.
Could open source harnesses do that? Sure, if they were programmed in a similar fashion as Claude Code. Do you have any evidence of it happening?
ceejayoz 59 minutes ago | parent
Humans do it!
skeledrew 58 minutes ago | parent
happyopossum 53 minutes ago | parent
None of this has anything to do with open vs. closed source.
skeledrew 1 hour ago | parent
jedisct1 2 hours ago | parent
Groxx 1 hour ago | parent
bcherny 2 hours ago | parent
That said, a few thoughts:
1. .claude/settings.local.json is meant to stay local. This is not a file you should check into source control. We automatically gitignore it when Claude creates the file, so in this case the files were manually created and checked in (docs: https://code.claude.com/docs/en/settings)
2. Permission rules are old hat. Everyone should be using auto mode instead. It is safer and also does not require manually maintaining finicky allow/deny lists. Auto mode is enabled by default and is included for free in all plans.
3. Regardless of what agent you use, you should have secret scanning enabled. GitHub and other source control hosts offer it. There are many threat models that it protects against and you should absolutely use it if you can. (see https://github.com/security/plans)
agentdev001 2 hours ago | parent
> "but we are looking into what we can do to prevent this"
I would presume that CC's auto-review of tool-call turns would already solve this >99% of the time, no? From my read, any harness-side deterministic solution here would be saving the user from themselves, which seems like a bad pattern. Somewhat dulling the scalpel in my mind.
bcherny 2 hours ago | parent
agentdev001 1 hour ago | parent
If we've already crossed the bridge to being confident in a non-deterministic reviewer for auto-mode, then, I see no obvious reason as to why we couldn't have the proposed rules be generated by a model. If that were reality, then- all rules placed in settings.local could be secretless, with the confidence of whatever model we tell 'make sure the rule does not contain secret material, consider its destination as potentially public'.
[1] https://code.claude.com/docs/en/permissions#wildcard-pattern... AFAICT, CC will either save off a prefix+wildcard rule, or exact command. Sounds like the former is likely not the cause of the problem here.
skeledrew 52 minutes ago | parent
markasoftware 2 hours ago | parent
bcherny 2 hours ago | parent
ceejayoz 1 hour ago | parent
bcherny 1 hour ago | parent
ceejayoz 1 hour ago | parent
gsnedders 1 hour ago | parent
As it says:
> 5% allow any shell command outright, and another 43% have interpreter rules like Bash(python:*) or Bash(node:*) that are essentially equivalent in practice
Claude Code never should have prompted to always allow Bash(python:*) or Bash(node:*) — that’s clearly a bad idea, and Anthropic know that (given the references in the article!).
Of course, Bash(python a.py) still isn’t safe if you also allow Write(a.py), because you may as well allow Bash(python:*) at that point, and that’s often practically what people want (“I want to both make edits to the source and then run the test suite”). So maybe the whole permission system is broken to start with — and the actual answer is leaning more heavily on fine-grained sandboxing.
You also, as the article rightfully points out, run into permission fatigue and users blindly hitting allow.
I do still wish you could do more with hooks — outside of auto, I might want to allow a given command via a hook if Claude Code has read access to given file, but there’s no way to query if a given path allows/denies read/write.
bcherny 1 hour ago | parent
Ultimately, the threat model here is: human has to approve a lot of commands, so gets tired and accidentally approves a command they shouldn’t have. We spent a significant amount of effort to build a richer permission system, allow configuration at multiple levels, use static analysis to detect dangerous and safe commands, monitor the model to detect and block prompt injection at the inference layer, etc. Some of these components we rewrote and red teamed dozens of times. Our conclusion was that despite all of this work, in practice the threat model is that human attention is limited and that that a different approach performs an order of magnitude better in practice.
aftbit 25 minutes ago | parent
kragen 24 minutes ago | parent
Speaking of really significant things being at risk, it's pretty infuriating that the web-chat Incognito mode can't write and test code locally, and neither the non-Incognito web-chat nor the local Claude Code client can be shielded from the knowledge of my email address and my geolocation. (Even the Incognito mode knows my geolocation.) This gives users no alternative but to put privacy-sensitive information at the disposal of Claude Code, which is far too unreliable to be entrusted with it. It's tempting to attribute this to Anthropic's corporate DNA valuing users' interests at a very low level, but conceivably it's just an oversight, and if I mention it here, it will be corrected in a month or two?
Currently, my assessment is that Claude Code, and in particular the Opus 5.5 model, is head and shoulders above the competition in software development capabilities. Nothing else is even close. But I've seen several small signs like this which suggest that Anthropic, as a company, is maliciously misaligned. So, if Grok, Qwen, GLM, or Astra starts to come anywhere close to being competitive, I'll switch as soon as I can. I imagine that most of your users feel the same way.
wonnage 19 minutes ago | parent
kragen 12 minutes ago | parent
ceejayoz 3 minutes ago | parent
cozzyd 1 hour ago | parent
eterm 1 hour ago | parent
knollimar 42 minutes ago | parent
markasoftware 1 hour ago | parent
bulder 36 minutes ago | parent
Many of the problems when it comes to the manual approval feel like they stem from the expectation of using auto mode in the first place. After all, what's the point of improving the manual approval and safety matching if auto mode is the end all be all, and what's the point of training the model to output commands in a manner that can be parsed by a human if auto mode is always meant to be used? It's very rare for me to not see "command could not be statically analyzed", because the model keeps outputting bash golf.
wyager 40 minutes ago | parent
bluebands 2 hours ago | parent
bcherny 2 hours ago | parent
80fj0348i 1 hour ago | parent
mococa 2 hours ago | parent
dang 2 hours ago | parent
When knowledgeable people show up to address concerns on HN, that's good for all of us. We don't need you to like or agree with what they say, but we do need you to follow HN's guidelines.
Threads like this can easily turn into mob dynamics—it has happened before—and when they do, that's bad for all of us.
80fj0348i 2 hours ago | parent
bcherny 1 hour ago | parent
1. After a command is blocked, run /permissions to retry and allow it going forward
2. More deeply configure the classifier itself: https://code.claude.com/docs/en/auto-mode-config
We are working on making these easier and more automated.
written-beyond 1 hour ago | parent
I frequently hit stop on and auto mode task to prevent it from completely flooding my context with some completely unrelated garbage.
Claude really should push away tasks that end up needing more exploration in worker contexts. That way the workers can maintain a sensible amount of context without pushing the main chat into the dumb region.
skeledrew 42 minutes ago | parent
bulder 17 minutes ago | parent
kay_o 40 minutes ago | parent
dcrazy 14 minutes ago | parent
deadbunny 1 hour ago | parent
1. We store any of your secrets we find in plaintext please don't commit them with `git add -A`, don't worry Claude will do this for you.
2. Just let us run arbitrary commands on your laptop, it's totally safe (for us)
3. Fuck you, it's not our problem
stogot 28 minutes ago | parent
Use this instead for free https://github.com/awslabs/git-secrets
cerved 10 minutes ago | parent
and teach Claude to not git add .
While we're at it, maybe we can also discourage the spurious use of -f for rm -- me personal pet peave
GeoAtreides 2 hours ago | parent
cassianoleal 1 hour ago | parent
> Often Claude commits the file itself. In 539 of the 1,105 repos with a real secret that we traced, a commit co-authored by Claude changed the file. Those commits name every recent model, from Sonnet 4.5 to Opus 5.5.
flufluflufluffy 2 hours ago | parent
binarymax 1 hour ago | parent
GaryBluto 1 hour ago | parent
skeledrew 1 hour ago | parent
fuckaiagi 9 minutes ago | parent