Blog

Security

API security for Node.js teams: BOLA and IDOR, SSRF, CORS, API keys, rate limiting, credential stuffing and what to log to spot attacks.

ApiTraffic card: 'A model API key leaked. The first hour.' with a timeline: 00:00 revoke at the provider, 00:10 compare provider usage with your own log, 00:30 new key and deploy, 01:00 rotate every secret nearby. Source: Wiz Research, Oct 30 2026.
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.

Jason Fill November 12, 2026 7 min read
Header: 'Your auth check passed. Now prove what the agent did.' beside an illustrative request log of one agent run, including a duplicate refund and a denied DELETE.
Security

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.

Jason Fill November 12, 2026 7 min read
Illustrative request log for user u_118: POST /orders 201, the payment step skipped, then POST /orders/8812/confirm 200, flagged reason=step_skipped missing=payment. Headline: Every request got a 200. Nobody paid.
Security

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.

Jason Fill November 9, 2026 5 min read
Terminal showing a gitleaks pre-commit hook blocking a commit that adds an API key to .mcp.json, next to the headline 'Catch secrets before they reach git.'
Security

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.

Jason Fill November 7, 2026 3 min read
Header image: Scanners want your .env and your .mcp.json
Security

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.

Jason Fill November 6, 2026 4 min read
Before and after: a Node.js login that answered 401 'Wrong password' or 404 'No account' with different timings now answers 401 'Invalid email or password' in about 33 ms for both real and unknown emails.
Security

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.

Jason Fill November 5, 2026 6 min read
Header: 'Log every model call. Then count the ones you didn't make.' beside an illustrative daily reconcile table of provider usage against logged calls per key fingerprint, with one key showing 117 unexplained calls, and a sample JSON log line with model, keyId, customerId, status and token counts.
Security

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.

Jason Fill November 4, 2026 5 min read
Lock down npm installs: headline 'Turn off install scripts before an agent runs npm install' with .npmrc ignore-scripts=true, npm rebuild and npm ci commands, and Safeguard's count for 26 to 28 Oct 2026: 96 malicious npm packages, 112 malware advisories.
Security

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.

Jason Fill October 30, 2026 4 min read
What small Node teams should log in the AI-attack era. Cover graphic for a guide to logging API requests to spot bot attacks.
Security

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.

Jason Fill October 27, 2026 8 min read
SSRF in Node.js, blocked at connect. Cover graphic for a guide to preventing server-side request forgery in Node.js fetch and undici calls.
Security

SSRF in Node.js: the fetch() you didn't mean to make

A customer pastes a webhook URL pointing at your cloud metadata endpoint, and your API fetches it. Learn how SSRF in Node.js happens, why blocklists on URL strings fail, and a tested safeFetch() you can ship today.

Jason Fill September 8, 2026 6 min read
API key security, from format to rotation. Cover graphic for a guide to generating, hashing, scoping and rotating API keys in Node.js.
Security

API key security for Node APIs: prefixes, hashing, scopes and rotation

A customer just pushed their API key to a public repo. Can you tell if anyone used it, and could a database leak expose every key? Design API key security in Node properly: prefixes, hashing, scopes and rotation.

Jason Fill July 27, 2026 6 min read
Spot a CORS misconfiguration in one curl. Cover graphic for a guide to finding, fixing and testing CORS misconfiguration in Express and Fastify.
Security

CORS misconfiguration in Express and Fastify: how to find it and test for it

One line added to silence a frontend error, cors({ origin: true, credentials: true }), lets any website read your users' data. Find CORS misconfiguration in Express and Fastify APIs, fix it, and test it in CI.

Jason Fill June 12, 2026 5 min read