Live data from Hacker News

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

twitter.com

101–110 of 1001 posts

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

#101
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...

If anyone at anthropic is reading this and wants more logs from me add jfc.

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

#102
src/cli/print.ts

This is the single worst function in the codebase by every metric:

  - 3,167 lines long (the file itself is 5,594 lines)
  - 12 levels of nesting at its deepest
  - ~486 branch points of cyclomatic complexity
  - 12 parameters + an options object with 16 sub-properties
  - Defines 21 inner functions and closures
  - Handles: agent run loop, SIGINT, rate-limits, AWS auth, MCP lifecycle, plugin install/refresh, worktree bridging, team-lead polling (while(true) inside), control message dispatch (dozens of types), model switching, turn interruption
  recovery, and more
This should be at minimum 8–10 separate modules.

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

#103
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.

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

#104

Earlier quoted context omitted.

I think that you do not need to feel uneasy at all. It is your computer and your memory space that the data is stored and operating in you can do whatever you like to the bits in that space. I would encourage you to continue that experiment.

You are not allowed to use the assistance of Claude to manufacture hacks and bombs on your computer

This is neither.

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

#105
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.

They're searching for multiple substrings in a single pass, regexes are the optimal solution for that.

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

#106
post #90

I am waiting now for someone to make it work with a Copilot Pro subscription.

does this not work? https://www.mintlify.com/samarth777/claude-code-copilot/intr...

I believe GitHub can and does suspend accounts that use such proxies.

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

#107

It shows that a company you and your organization are trusting with your data, and allowing full control over your devices 24/7, is failing to properly secure its own software. It's a wake up call.

It is a client running on an interpreted language your own computer, there is nothing to secure or hide as source is provided to you already.

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

#108

It shows that a company you and your organization are trusting with your data, and allowing full control over your devices 24/7, is failing to properly secure its own software. It's a wake up call.

It is a client running on an interpreted language your own computer, there is nothing to secure or hide as source was provided to you already or am I mistaking?

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

#109
post #95
post #86

Earlier quoted context omitted.

won't they just try to dmca or take these down especially if they're more popular

They can't. AI generated code cannot be copyrighted. They've stated that claude code is built with claude code. You can take this and start your own claude code project now if you like. There's zero copyright protection on this.

Given that from 2026 onwards most of the code is going to be computer generated, doesn't it open some interesting implications there ?

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

#110
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.

Because they want it to be executed quickly and cheaply without blocking the workflow? Doesn’t seem very weird to me at all.
Post reply on HN