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
Anthropic Leaks 512k Lines of Code Due to Missing Config Line
More Relevant Posts
-
Completed Episode 5 " Middlewares & Error Handlers " of Namaste Node.js season -2 #NamasteNodejs by Akshay Saini learned middleware functions handle requests and responses in a sequence. ⚙️ • Middleware Flow -> Middleware runs top → bottom (sequentially). -> next() controls whether request continues . -> Missing next() or response = request hangs . 📤 • Sending Response (res.send()) -> Ends the request-response cycle. -> After this, no further changes should be made . - > Misuse leads to common errors . 🔗 • Multiple Handlers in One Route -> You can chain multiple middleware/handlers. -> Executes in order until response is sent. 📊 • HTTP Status Codes -> Indicate result of request (200, 404, 500). -> Set using res.status(code). 🚨 • Error Handling -> Use error middleware (err, req, res, next). -> Always send proper status + message. #NodeJS #ExpressJS #BackendDevelopment #WebDevelopment #JavaScript #FullStackDeveloper #SoftwareEngineering #Programming #Coding #API #RestAPI #Backend #Developer #LearnToCode #TechContent #CodingJourney #DevCommunity #SystemDesign #ScalableSystems #100DaysOfCode #ProgrammingTips #CodeNewbie #Developers #TechEducation #CareerGrowth
To view or add a comment, sign in
-
-
𝗡𝗼𝗱𝗲.𝗷𝘀 𝐓𝐨𝐩𝐢𝐜 𝟐: 𝐓𝐡𝐞 𝐓𝐡𝐫𝐞𝐚𝐝 𝐏𝐨𝐨𝐥 Under the hood, libuv maintains a pool of 4 threads (by default) that runs in parallel with your JavaScript. Every time you call certain Node.js APIs, the work is offloaded to this pool - silently, invisibly. 📂 What goes to the thread pool: ➡️ fs.readFile / fs.writeFile — all file system operations ➡️ crypto.pbkdf2, crypto.randomBytes, crypto.scrypt ➡️ dns.lookup (not dns.resolve — that uses the network directly) ➡️ zlib compression and decompression What goes directly to the OS kernel, bypassing the pool entirely: ➡️ TCP / UDP sockets ➡️ HTTP / HTTPS requests ➡️ Unix pipes ❗𝘛𝘩𝘦 𝘱𝘳𝘰𝘥𝘶𝘤𝘵𝘪𝘰𝘯 𝘣𝘶𝘨 Default pool size: 4 threads. If your server receives 8 simultaneous requests that each call crypto.pbkdf2 (common in authentication flows), 4 of them will wait - blocked - until a thread is free. Your Event Loop stays responsive. But your response times double. This is invisible in development. It surfaces under load in production. 💡𝐓𝐡𝐞 𝐅𝐢𝐱: Set this before your process starts: UV_THREADPOOL_SIZE=8 The maximum is 1024. The right value depends on your workload - profile before guessing. Node.js is single-threaded where it matters - your JavaScript. But the infrastructure running beneath it is not. Knowing the boundary between the two is what separates application developers from systems developers. #nodejs #javascript #backend #performance #softwaredevelopment #systemdesign
To view or add a comment, sign in
-
-
"SELECT * FROM users WHERE email = '" + userInput + "'" This single line has destroyed more applications than most developers realize. SQL Injection is not dead. It is still one of the most exploited web vulnerabilities because developers assume: “Framework handle kar lega.” Spring Boot helps — but unsafe native queries, manual JDBC, dynamic filters, and careless repository methods can still leave your application open. Recently even modern Spring ecosystem vulnerabilities reminded teams that input sanitization mistakes are still very real. I created a deep practical guide for developers with: ✔ attack examples ✔ vulnerable code demos ✔ prevention implementation ✔ testing strategies ✔ production-ready secure coding checklist Useful for every Java/Spring Boot engineer. Read the full article 👇 https://lnkd.in/gCtWkSrC #SpringBoot #JavaDeveloper #ApplicationSecurity #SQLInjection #Coding #Programming #TechBlog #Developers
To view or add a comment, sign in
-
🔍 Filters vs Interceptors in Spring Boot — and why most devs mix them up Both intercept HTTP requests. Both let you run logic before and after your controller. But they live at completely different layers — and choosing the wrong one leads to subtle bugs. Here's the mental model that clears it up: Filter = Servlet Container layer. Runs before DispatcherServlet even knows a request came in. It sees everything — including static resources. Interceptor = Spring MVC layer. Runs after DispatcherServlet, before your controller method. It knows which handler is being called. The one-line rule I use: If it needs to apply to every request, use a Filter. If it needs to know which endpoint is being called, use an Interceptor. This distinction matters for: → Security — JWT pre-checks live in Filters, role validation in Interceptors → Logging — request metadata at filter level, execution time at interceptor level → Clean architecture — putting logic at the right layer keeps things testable Swipe through the full breakdown with code examples and comparison table 👇 💬 Drop a comment: Which one do you use more in production, and for what? #SpringBoot #Java #BackendDevelopment #Microservices #SpringMVC #JavaDeveloper #SoftwareArchitecture #TechInterview #SpringFramework #Programming
To view or add a comment, sign in
-
-
Spring Boot Filters vs Interceptors — Most developers confuse this 🤯 Let’s simplify 👇 ✅ Filter (Servlet level) - Works BEFORE DispatcherServlet - Used for logging, authentication, request modification ✅ Interceptor (Spring level) - Works AFTER DispatcherServlet - Used for business-level checks 💡 Flow: Request → Filter → DispatcherServlet → Interceptor → Controller ⚡ Real use case: - Filter → JWT validation - Interceptor → role-based access 👉 Choosing wrong = messy architecture Know the difference = cleaner backend 🔥 #SpringBoot #Java #BackendDeveloper
To view or add a comment, sign in
-
Hey Developers, 🚀 Spring WebFlux — Do we still need Thread Pools? When I started exploring Spring WebFlux, one question came to my mind: 👉 “If everything is non-blocking… do we even need thread pools?” Here’s the clarity I found 👇 🧠 Myth: ❌ WebFlux = No threads / No thread pools ✅ Reality: ✔ Threads still exist ✔ Thread pools still exist ✔ But… YOU don’t manage them manually ⚡ What changes in WebFlux? Instead of: 👉 1 request = 1 thread (blocking) WebFlux uses: 👉 Event-loop model (few threads handling many requests) 💡 Key Idea: WebFlux is NOT “no threads” WebFlux is “no thread blocking” 🔥 Important scenario: If you use blocking code (like JDBC): ❌ This breaks WebFlux performance ✔ Correct way: Use a separate scheduler: → boundedElastic thread pool 💻 Example: Mono.fromCallable(() -> blockingCall()) .subscribeOn(Schedulers.boundedElastic()); 🚨 Takeaway for Developers: • Don’t create thread pools manually • Avoid blocking operations • Use reactive drivers (Mongo, R2DBC) • Offload blocking work properly ⚡ Final Thought: “WebFlux doesn’t remove threads, it uses them smarter.” #SpringBoot #WebFlux #Java #BackendDevelopment #ReactiveProgramming #Microservices #Concurrency #LearnInPublic
To view or add a comment, sign in
-
Nobody explained JWT to me clearly in college. So here's the version I wish I had 👇 JWT = JSON Web Token. It's how your API knows WHO you are after login. How it works (simple): 1. You log in → server creates a token with your info + a secret signature 2. That token is sent back to you 3. On every future request, you send the token 4. Server verifies the signature no database lookup needed Why it's powerful: ✅ Stateless server stores nothing ✅ Works perfectly with REST APIs ✅ Scales easily across multiple servers The one mistake I made when I first used it: Not setting token expiry. Anyone with the token had permanent access. Always set expiry. Always. I used JWT + RBAC in my Employee Task Management Portal reduced unauthorized access to zero. Any backend developers want to add to this? 👇 #Python #BackendDevelopment #JWT #APISecurity #LearningInPublic #TechTips
To view or add a comment, sign in
-
-
I found a bug in my own logger that had been there since day one. A single typo — `fileProecssing` instead of `fileProcessing` — meant the queue processor was never properly re-armed after completing a batch. The fix was one word. The impact was that every benchmark I had ever run was measured against a crippled version of my own software. After fixing it (1.0.2), I kept going. Switched the serializer from string concatenation to an array join pattern (1.0.3). The result: ✅ Up to 62% less memory at 1M logs ✅ Up to 23% less CPU across the board ✅ Throughput maintained or improved Sometimes the best performance optimization is just fixing what was broken. Silo v1.0.3 is live now on npm — a zero-dependency, self-hosted, privacy-first Node.js logging library. npm install @flowrdesk/silo #nodejs #javascript #opensource #logging #flowrdesk
To view or add a comment, sign in
-
FilenameUtils.getName() looks like a safe choice. It strips path components and returns just the filename. Without canonical path validation against a base directory though, you've solved one problem and left another wide open. Part 2 of the directory traversal series on Security Depth digs into what actually holds up in production: Apache Commons IO done right, frontend designs that never expose server paths, rate limiting and audit logging for active exploitation attempts, comprehensive unit tests for path validation, and SAST integration to keep regressions out of main. 🔗 https://lnkd.in/disppiww #AppSec #DirectoryTraversal #JavaSecurity #SpringBoot #OWASP #SecureCoding #ApplicationSecurity
To view or add a comment, sign in
-
🧠 After exploring singleton and prototype, I discovered a very practical Spring Boot scope today 👀 Request Scope 🌐 Here’s the simple idea 👇 ✅ A new bean object is created for every HTTP request ✅ Different requests never share the same object ✅ Perfect for request-specific processing This makes it super useful for 👇 🔹 request tracing IDs 🔹 temporary request metadata 🔹 audit logging helpers 🔹 request-level user context The cleanest way to use it 👇 @RequestScope 💡 My takeaway: Scope is not just about memory — it directly shapes how safely your web app handles request data ⚡ #Java #SpringBoot #RequestScope #BackendDevelopment #LearningInPublic
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development