Live data from Hacker News

Claude Code's source code has been leaked via a map file in their NPM registry

twitter.com

531–540 of 1001 posts

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#531
post #395

Earlier quoted context omitted.

You're perfectly free to scrape the web yourself and train your own model. You're not free to let Anthropic do that work for you, because they don't want you to, because it cost them a lot of time and money and secret sauce presumably filtering it for quality and other stuff. Stole? Courts have ruled it's transformative, and it very obviously is. AI doomerism is exhausting, and I don't even use AI that much, it's jus…

> Stole? Courts have ruled it's transformative, and it very obviously is. The courts have ruled that AI outputs are not copyrightable. The courts have also ruled that scraping by itself is not illegal, only maybe against a Terms of Service. Therefore, Anthropic, OpenAI, Google, etc. have no legal claim to any proprietary protections of their model outputs. So we have two things that are true: 1) Anthropic (certainly)…

>The courts have ruled that AI outputs are not copyrightable.

"not copyrightable" doesn't imply they can't frustrate attempts to scrape data.

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#533
post #69

ANTI_DISTILLATION_CC This is Anthropic's anti-distillation defence baked into Claude Code. When enabled, it injects anti_distillation: ['fake_tools'] into every API request, which causes the server to silently slip decoy tool definitions into the model's system prompt. The goal: if someone is scraping Claude Code's API traffic to train a competing model, the poisoned training data makes that distillation attempt less…

Haven’t looked at the code, but is the server providing the client with a system prompt that it can use, which would contain fake tool definitions when this is enabled? What enables it? And why is the client still functional when it’s giving the server back a system prompt with fake tool definitions? Is the LLM trained to ignore those definitions? Wonder if they’re also poisoning Sonnet or Opus directly generating si…

Not sure, and not completely convinced of the explanation, but the way this sticks out so obviously makes it look like a honeypot to me.

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#534

Earlier quoted context omitted.

The issue isn't that regex are a solution to find a substring. The issue is that you shouldn't be looking for substrings in the first place. This has buttbuttin energy. Welcome to the 80s I guess.

Very likely vibe coded. I've seen Claude Code went with a regex approach for a similar sentiment-related task.

My understanding of vibe coding is when someone doesn’t look at the code and just uses prompts until the app “looks and acts” correct.

I doubt you are making regex and not looking at it, even if it was AI generated.

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#535
post #349
post #84

They have an interesting regex for detecting negative sentiment in users prompt which is then logged (explicit content): https://github.com/chatgptprojects/claude-code/blob/642c7f94... I guess these words are to be avoided...

I'm clearly way too polite to Claude. Also: // Match "continue" only if it's the entire prompt if (lowerInput === 'continue') { return true } When it runs into an error, I sometimes tell it "Continue", but sometimes I give it some extra information. Or I put a period behind it. That clearly doesn't give the same behaviour.

Makes me wonder what happens once flagged behind the api.

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#536
post #134

Earlier quoted context omitted.

You'll never win this battle, so why waste feelings and energy on it? That's where the internet is headed. There's no magical human verification technology coming to save us.

I assume we're heading to a place where keyboards will all have biometric sensors on every key and measure weight fluctuations in keystrokes, actually.

That’s like having your security on the frontend.

If someone owns the keyboard then they can fake those metrics and tell the server it is happening when it isn’t.

That will be easy to beat.

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#537
post #84

They have an interesting regex for detecting negative sentiment in users prompt which is then logged (explicit content): https://github.com/chatgptprojects/claude-code/blob/642c7f94... I guess these words are to be avoided...

An LLM company using regexes for sentiment analysis? That's like a truck company using horses to transport parts. Weird choice.

Oh it’s worse than that. This one ended up getting my account banned: https://github.com/anthropics/claude-code/issues/22284

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#538

Earlier quoted context omitted.

So, think of it as a business man: You don't really care if your customers swear or whatever, but you know that it'll generate bad headlines. So you gotta do something. Just like a door lock isn't designed for a master criminal, you don't need to design your filter for some master swearer; no, you design it good enough that it gives the impression that further tries are futile. So yeah, you do what's less intesive to…

This door lock doesn’t even work against people speaking French, so I think they could have tried a mite harder.

The up-side of the US market is (almost) everyone there speaks English. The down side is, that includes all the well-networked pearl-clutchers. Europe (including France) will have the same people, but it's harder to coordinate a network of pearl-clutching between some saying "Il faut protéger nos enfants de cette vulgarité!" and others saying "Η τηλεόραση και τα μέσα ενημέρωσης διαστρεβλώνουν τις αξίες μας!" even when they care about the exact same media.

For headlines, that's enough.

For what's behind the pearl-clutching, for what leads to the headlines pandering to them being worth writing, I agree with everyone else on this thread saying a simple word list is weird and probably pointless. Not just for false-negatives, but also false-positives: the Latin influence on many European languages leads to one very big politically-incorrect-in-the-USA problem for all the EU products talking about anything "black" (which includes what's printed on some brands of dark chocolate, one of which I saw in Hungary even though Hungarian isn't a Latin language but an Ugric language and only takes influences from Latin).

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#539
post #302
post #290

Earlier quoted context omitted.

Paranoia. And also ironic considering their base LLM is a distillation of the web and books etc etc.

They stole everything and now they want to close the gates behind them. "I got the loot, Steve!" I feel like the distillation stuff will end up in court if they try to sue an American company about it. We'll see what a judge says.

[flagged]

Re: Claude Code's source code has been leaked via a map file in their NPM registry

#540

I think this is ultimately caused by a Bun bug which I reported, which means source maps are exposed in production: https://github.com/oven-sh/bun/issues/28001 Claude code uses (and Anthropic owns) Bun, so my guess is they're doing a production build, expecting it not to output source maps, but it is.

[flagged]
Post reply on HN