Anthropic Leaks 512k Lines of Code Due to Missing Config Line

Anthropic had a mistake. They leaked 512,000 lines of their code. It was not a hacker or a cyberattack. One line missing in a config file caused the problem. Their Claude Code is built using Bun. Bun creates .map files, by default. Someone forgot to add *.map to. npmignore before publishing to npm. That was the reason. A 59.8 MB source map file became public. It had 1,900 files and 512k lines of TypeScript. Anyone could download it and thousands did. One wrong config line caused a security incident. If you publish npm packages do this now. Add these to your.npmignore. *.Map .env /src /test *.log Use "files" in package. json to choose what you want to share. #Java #JavaScript #NPM #SoftwareEngineering #BackendDevelopment #CleanCode #DevSecOps #TechAlert #DeveloperLife #LearnFromMistakes #FullStackDeveloper #JavaDeveloper

  • text

To view or add a comment, sign in

Explore content categories