Posts tagged “Security”
A model API key leaked. The first hour, for a Node team
In October, stolen Amazon Bedrock credentials made about 2.5 million API calls before anyone stopped them. A first-hour runbook for a small Node team when a model provider key leaks: revoke, scope the damage from your own logs, then rotate the right way.
Your auth check passed. Now prove what the agent did.
An agent calls your API with a valid token, the scopes allow it, and the write lands with a clean 201. Nobody asked for it. Here's how to fix authorization for agents first, then build an audit trail that shows exactly what the agent did.
API business logic abuse: requests that are valid but wrong
Akamai says 61% of API attacks in 2025 involved unauthorized workflows, double the year before. Four examples for a small SaaS, how to map the expected order of calls, and Express code to catch the ones that skip a step.
401 vs 403 in your Node API logs: what each pattern means
401 and 403 look alike in a log but answer different questions. What each means under RFC 9110, four auth patterns worth an alert, how to return the right one in Express and Fastify, and five searches to run on last week's logs.
Catch secrets before they reach git: a pre-commit check for Node repos
GitGuardian found commits co-authored by Claude Code leaked secrets at 3.2%, twice the 1.5% baseline. A 10-minute pre-commit secret scan for Node repos, a CI backstop for --no-verify, and what to do when a key slips through anyway.
Block .env and config-file probes in Express and Fastify
One site logged 1,028 requests for credential paths in a day, including /.mcp.json and other AI tool configs. How to check none can succeed, return a fast 404 in Express and Fastify, and block the IPs doing it.
Stop user enumeration on your Node.js login, signup and reset endpoints
AI agents made hundreds of millions of requests to login pages in the first half of 2026. If your API answers differently for real and unknown emails, it hands them a target list. Here's how to make login, reset and signup give one answer.
Debugging webhooks in Node: failed signatures, retries and duplicate events
Webhook bugs rarely reproduce on your laptop: a signature check that fails one time in ten, the same event processed twice, a retry storm after a slow deploy. Here's the fix for each, plus how to get the exact request in front of you.
Log every LLM API call your Node app makes
October's AI platform breaches leaked model provider keys, and one stolen key ran about 800,000 calls in 30 hours. How to log every LLM call from Node with tokens, customer and a key fingerprint, then reconcile against provider usage to catch calls your code didn't make.
API traffic monitoring: what to track, and how to set it up for a Node API
Your uptime check is green and a customer says the API has been timing out for an hour. API traffic monitoring keeps the requests that explain it. Here's what to track, how to capture it in Node with working code, and the queries that turn traffic into answers.
Lock down npm installs when an AI agent adds your dependencies
In late October, 96 malicious npm packages appeared in three days, several running code at install time. How to turn off install scripts in npm and pnpm, allow the few builds you need, and review every dependency an AI agent adds.
What small Node teams should log in the AI-attack era
Bots are now more than half of web traffic, and 27% of attacks target APIs and identity systems. You don't need a security team to see it, just the right fields on every request. Here's the minimum to capture, five patterns to watch, and when to block.