Claude Code Source Code Leaked (2026-03-31)
hackernews
|
|
📦 오픈소스
#ai 딜
#anthropic
#claude
#claude code
#command r
#leak
#npm
#security
#source code
원문 출처: hackernews · Genesis Park에서 요약 및 분석
요약
2026년 3월 31일, 앤스로픽(Anthropic)의 터미널 기반 소프트웨어 엔지니어링 CLI 도구인 '클로드 코드(Claude Code)'의 소스 코드가 npm 패키지 배포 과정에서 노출된 맵 파일(.map)을 통해 유출되었습니다. 이 경로를 통해 앤스로픽의 R2 스토리지에 저장되어 있던 난독화되지 않은 타입스크립트 기반의 소스 코드 스냅샷(약 1,900개 파일, 51만 2천 줄 이상)이 외부에서 다운로드 가능해진 것입니다. 해당 저장소는 소프트웨어 공급망 보안 및 아키텍처 분석을 목적으로 대학생에 의해 미러링되었으며, 내부에는 쉘 명령 실행, 파일 및 코드 검색, 웹 검색 등 약 40개의 에이전트 도구와 50여 개의 슬래시 명령어 구현체가 포함되어 있었습니다. 비록 공식적인 저장소는 아니지만, 이번 사태는 패키징 및 릴리스 과정의 실패로 인해 대규모 언어 모델(LLM) 기반 개발 도구의 상세 내부 구조와 보안 권한 모델이 학술 및 방어적 보안 연구 목적으로 공개되었음을 의미합니다.
본문
This repository mirrors a publicly exposed Claude Code source snapshot that became accessible on March 31, 2026 through a source map exposure in the npm distribution. It is maintained for educational, defensive security research, and software supply-chain analysis. This repository is maintained by a university student studying: - software supply-chain exposure and build artifact leaks - secure software engineering practices - agentic developer tooling architecture - defensive analysis of real-world CLI systems This archive is intended to support: - educational study - security research practice - architecture review - discussion of packaging and release-process failures It does not claim ownership of the original code, and it should not be interpreted as an official Anthropic repository. Chaofan Shou (@Fried_rice) publicly noted that Claude Code source material was reachable through a .map file exposed in the npm package: "Claude code source code has been leaked via a map file in their npm registry!" The published source map referenced unobfuscated TypeScript sources hosted in Anthropic's R2 storage bucket, which made the src/ snapshot publicly downloadable. Claude Code is Anthropic's CLI for interacting with Claude from the terminal to perform software engineering tasks such as editing files, running commands, searching codebases, and coordinating workflows. This repository contains a mirrored src/ snapshot for research and analysis. - Public exposure identified on: 2026-03-31 - Language: TypeScript - Runtime: Bun - Terminal UI: React + Ink - Scale: ~1,900 files, 512,000+ lines of code src/ ├── main.tsx # Entrypoint orchestration (Commander.js-based CLI path) ├── commands.ts # Command registry ├── tools.ts # Tool registry ├── Tool.ts # Tool type definitions ├── QueryEngine.ts # LLM query engine ├── context.ts # System/user context collection ├── cost-tracker.ts # Token cost tracking │ ├── commands/ # Slash command implementations (~50) ├── tools/ # Agent tool implementations (~40) ├── components/ # Ink UI components (~140) ├── hooks/ # React hooks ├── services/ # External service integrations ├── screens/ # Full-screen UIs (Doctor, REPL, Resume) ├── types/ # TypeScript type definitions ├── utils/ # Utility functions │ ├── bridge/ # IDE and remote-control bridge ├── coordinator/ # Multi-agent coordinator ├── plugins/ # Plugin system ├── skills/ # Skill system ├── keybindings/ # Keybinding configuration ├── vim/ # Vim mode ├── voice/ # Voice input ├── remote/ # Remote sessions ├── server/ # Server mode ├── memdir/ # Persistent memory directory ├── tasks/ # Task management ├── state/ # State management ├── migrations/ # Config migrations ├── schemas/ # Config schemas (Zod) ├── entrypoints/ # Initialization logic ├── ink/ # Ink renderer wrapper ├── buddy/ # Companion sprite ├── native-ts/ # Native TypeScript utilities ├── outputStyles/ # Output styling ├── query/ # Query pipeline └── upstreamproxy/ # Proxy configuration Every tool Claude Code can invoke is implemented as a self-contained module. Each tool defines its input schema, permission model, and execution logic. | Tool | Description | |---|---| BashTool | Shell command execution | FileReadTool | File reading (images, PDFs, notebooks) | FileWriteTool | File creation / overwrite | FileEditTool | Partial file modification (string replacement) | GlobTool | File pattern matching search | GrepTool | ripgrep-based content search | WebFetchTool | Fetch URL content | WebSearchTool | Web search | AgentTool | Sub-agent spawning | SkillTool | Skill execution | MCPTool | MCP server tool invocation | LSPTool | Language Server Protocol integration | NotebookEditTool | Jupyter notebook editing | TaskCreateTool / TaskUpdateTool | Task creation and management | SendMessageTool | Inter-agent messaging | TeamCreateTool / TeamDeleteTool | Team agent management | EnterPlanModeTool / ExitPlanModeTool | Plan mode toggle | EnterWorktreeTool / ExitWorktreeTool | Git worktree isolation | ToolSearchTool | Deferred tool discovery | CronCreateTool | Scheduled trigger creation | RemoteTriggerTool | Remote trigger | SleepTool | Proactive mode wait | SyntheticOutputTool | Structured output generation | User-facing slash commands invoked with / prefix. | Command | Description | |---|---| /commit | Create a git commit | /review | Code review | /compact | Context compression | /mcp | MCP server management | /config | Settings management | /doctor | Environment diagnostics | /login / /logout | Authentication | /memory | Persistent memory management | /skills | Skill management | /tasks | Task management | /vim | Vim mode toggle | /diff | View changes | /cost | Check usage cost | /theme | Change theme | /context | Context visualization | /pr_comments | View PR comments | /resume | Restore previous session | /share | Share session | /desktop | Desktop app handoff | /mobile | Mobile app handoff | | Service | Description | |---|---| api/ | Anthropic API client, file API, bootstrap | mcp/ | Mod
Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.
공유