2026 DevSec Advent Calendar
Twenty-four focused security briefs for frontend, Node.js, and DevOps engineers. Each door explores a concrete attack vector backed by real-world incidents & advisories, why default configurations fail, and a production-ready fix you can verify and ship in minutes.
Day 00 (Zero-Day): Why I Built a 24-Day DevSec Advent Calendar
Launching December 1: an AI-assisted deep dive into my own security knowledge gaps as CVEs skyrocket across the web stack, sharing 24 practical daily briefs with anyone on the same journey.
Week 1: Frontend & Browser Traps
Content Security Policy exfiltration guards, route isolation, dev server bindings, HttpOnly cookies, postMessage validation, and Subresource Integrity.
CSP connect-src Isn't Optional: Stopping Compromised Third-Party Scripts
Allowlisting a vendor <script> in script-src isn't enough. Locking down connect-src prevents a compromised third-party script from exfiltrating scraped data to attacker-controlled domains.
Keep Third-Party Tags Off Sensitive Routes
Analytics, chat widgets, and A/B testing scripts have zero business executing on /login, /checkout, /billing, or /settings. Isolate sensitive routes from tag managers and use hosted payment iframes.
Dev Servers Belong on localhost: Why 0.0.0.0 Turns Into RCE
Hardcoding vite --host or server.host: true (0.0.0.0) in package.json or mapping -p 5173:5173 in Docker exposes your dev server to local networks and browser pivot attacks.
Stop Storing Auth Tokens in localStorage
Any XSS bug or poisoned npm dependency can read localStorage and sessionStorage in a single line of JS. Store session tokens in HttpOnly, Secure, SameSite cookies instead.
window.postMessage Without event.origin Checks Is DOM XSS Waiting to Happen
Listening to window.addEventListener('message', ...) without strictly validating event.origin against an exact allowlist lets any malicious popup or iframe inject untrusted payloads into your app.
Subresource Integrity (SRI) for Static CDNs
If you load a versioned script or stylesheet from a public CDN without an integrity="sha384-..." hash and crossorigin="anonymous", a CDN compromise turns into arbitrary code execution.
Week 2: Secrets, Tokens & AI Tooling
Auditing forgotten PATs, sandboxing untrusted repos, hardening IDE extensions & MCP servers, keeping secrets out of docs/prompts, CI OIDC federation, and Git history scanning.
Audit Your Forgotten GitHub & GitLab PATs
Revoke personal access tokens created 'temporarily' two years ago. Replace classic broad-scope PATs with fine-grained, repository-scoped tokens with mandatory expiration dates.
Never Run Untrusted Repos on Your Host Machine
Coding interview take-home assignments, random GitHub PoCs, and 'troubleshooting scripts' belong inside a disposable VM or isolated container, never on your primary laptop next to ~/.ssh and ~/.aws.
Treat IDE Extensions & MCP Servers Like Prod Dependencies
AI coding agents, MCP servers, and IDE extensions execute with your full local OS user permissions. Verify publisher identities, pin versions, and audit tool permissions.
Stop Pasting Raw Secrets Into Docs, Tickets, and AI Prompts
Pasting .env files, database URIs, or API tokens into Slack threads, Google Docs, Jira tickets, or non-private AI sessions creates a searchable treasure map when a single SaaS account is compromised.
Replace Static CI Secrets With OIDC Federation
Stop storing long-lived AWS/GCP/Azure JSON keys in GitLab CI or GitHub Actions variables. Use OpenID Connect (OIDC) federation so pipelines mint short-lived, job-scoped credentials that expire automatically.
.env in .gitignore Isn't Enough: Scanning Git History for Secrets
Adding .env to .gitignore does nothing if the file was already tracked, and deleting a secret in a follow-up commit leaves it intact in git history. Enforce pre-commit hooks and CI secret scanning.
Week 3: Dependencies & Supply Chain
Deterministic frozen lockfiles, disabling postinstall lifecycle scripts, patching transitive trees, pinning Docker digests, non-root containers, and stack-aware CVE triage.
Commit Lockfiles & Enforce --frozen-lockfile (npm ci)
Running npm install or pnpm install without --frozen-lockfile in CI can silently pull unreviewed minor/patch versions into production builds. Always use npm ci or pnpm install --frozen-lockfile.
Lifecycle Scripts (postinstall) Are Silent RCE
Any package in your dependency tree can execute arbitrary shell commands during npm install via preinstall/postinstall hooks. Audit packages with lifecycle scripts and use --ignore-scripts or allowlists.
Audit Transitive Dependencies, Not Just package.json
Your top-level package.json can look spotless while a nested dependency three levels deep carries a CVSS 9.1 flaw. Use npm ls and version-scoped lockfile overrides to patch deep dependency trees.
Pin Docker Base Images by SHA256 Digest
Mutable tags like node:22-alpine or nginx:alpine can change silently between builds. Pin base images by immutable @sha256:... digest and automate updates with Renovate or Dependabot.
Don't Run Node & Web Containers as root
Docker containers run as UID 0 (root) by default. Adding USER node or running unprivileged nginx restricts filesystem writes and drastically reduces blast radius if an attacker achieves RCE.
Automate CVE Triage Against Your Actual Stack
Reading every security newsletter manually leads to patch fatigue. Pipe official vendor advisories against your actual repo SBOMs/manifests so you only alert on CVEs that match your deployed versions.
Week 4: Backend, Databases & Ops
Least-privilege database runtime roles, firewalling database wire ports, SSRF outbound validation, headless Chromium container rebuilds, tenant-scoped RBAC/IDOR guards, and the holiday freeze checklist.
Split Your DB Migration User From Your Runtime App User
Your runtime application role only needs SELECT, INSERT, UPDATE, DELETE, never CREATE or ALTER TABLE rights. Separating DDL migration users from runtime users blocks privilege escalation and host RCE chains.
Firewall Internal Database Ports (5432, 1521, 6379)
Database wire protocols aren't designed to face untrusted networks. Pre-authentication bugs can crash or compromise database servers before a login handshake even finishes. Keep DB ports strictly inside private subnets.
Validate Outbound URLs to Kill SSRF
Any backend endpoint that fetches a user-supplied URL (webhooks, avatar importers, link previews, PDF generators) can be abused to query internal services or cloud metadata (169.254.169.254). Pin resolved IPs at connect time to stop SSRF and DNS rebinding.
Rebuild Headless Chromium Containers on Every Browser CVE
Patching Chrome on your laptop doesn't protect your Node/Puppeteer/Playwright microservice rendering PDFs or screenshots in Docker. Whenever an actively exploited Chromium zero-day drops, rebuild and redeploy your headless browser images immediately.
Never Trust Client-Side RBAC Alone (IDOR Prevention)
Hiding a button in Angular or guarding a frontend route only improves UX. It isn't security. Every API endpoint must verify both role permissions and resource ownership on the server.
The 5-Minute Holiday Freeze Security Checklist
Before logging off for the holidays: rotate shared deployment/API tokens, verify automated dependency & CVE alerts route to an active on-call channel, confirm production backups restore cleanly, and check for leftover debug rules.