Security
Practical security guides for your next development decision.
Keep Untrusted Text and URLs in Separate DOM Boundaries
Separate DOM text insertion from URL authorization, test an HTTPS origin policy in Node.js, and trace denied updates without leaving a stale link active.
Read field noteDesign Archive Extraction Around Containment and Failure
Review archive extraction across path traversal, links, expansion limits, duplicate destinations, and publication so rejected input cannot become usable output.
Read field noteParse Explicit Records to Limit Prototype Pollution
Replace recursive JSON option merges with a bounded flat parser, reject unknown fields, and test that denied preferences cannot change shared object behavior.
Read field noteBound Validation Work Before Matching Untrusted Strings
Define an ASCII identifier grammar, reject oversized input before matching, and test failure boundaries without exposing a shared event loop to costly regexes.
Read field noteEnforce Object Authorization Across Tenant Boundaries
Bind object lookups and mutations to authoritative tenant context, cover alternate access paths, and verify that denied requests leave no unauthorized effects.
Read field noteConfigure Credentialed CORS with Explicit Boundaries
Review allowed origins, credentialed response access, preflight behavior, and cache variation while keeping API authorization and CSRF controls authoritative.
Read field noteDesign Session Rotation and Revocation Together
Define browser-session authority, rotate identifiers at privilege changes, and test revocation across concurrent requests, caches, and delayed background work.
Read field noteConstrain Subprocesses Against Command Injection
Choose fixed executables and validated operands, distinguish shell injection from argument injection, and bound subprocess authority, output, and failure behavior.
Read field noteDesign API Rate Limits Around Resource Budgets
Define API limits by trusted identity, operation cost, and concurrency, with shared enforcement, useful rejection responses, and tested failure behavior.
Read field noteVerify Webhooks Before Accepting Durable Work
Authenticate webhook bytes before durable acceptance, separate delivery identity from business effects, and recover from duplicates and interrupted processing.
Read field notePrevent SSRF at the Outbound Request Boundary
Constrain user-controlled outbound requests with destination policy, connection-aware validation, network enforcement, bounded work, and recovery tests.
Read field noteValidate File Uploads Before Making Them Available
Design upload quarantine, bounded content validation, controlled publication, and authorized downloads with explicit failure and cleanup behavior.
Read field noteRoll Out Content Security Policy with Useful Evidence
Introduce Content Security Policy through resource inventory, scoped trust rules, report-only observation, browser verification, and bounded recovery.
Read field noteProtect Cookie-Authenticated Actions Against CSRF
Protect cookie-authenticated mutations with request-intent validation, scoped cookies, authentication lifecycle handling, and browser-based failure tests.
Read field noteChecksums, Signatures, and Provenance Solve Different Problems
A threat-based guide to release checksums, digital signatures, and build provenance, including trust distribution, verification policy, and residual risks.
Read field noteApply Least Privilege to CI Credentials
A threat-based CI credential design covering token scope, untrusted code, short-lived identity, protected environments, third-party actions, logs, and recovery.
Read field noteDesign Application Logs Without Leaking Sensitive Data
A secure logging workflow for selecting events, minimizing data, preventing injection, protecting transport and storage, controlling access, and testing failures.
Read field noteThreat-Model a Small Feature Before It Ships
A lightweight threat-modeling method for mapping assets, actors, data flow, trust boundaries, abuse cases, controls, residual risk, and verification evidence.
Read field noteSecret Scanning Before a Git Commit: A Practical Defense
How to prevent credentials from entering Git with staged-content scanning, entropy and format checks, allowlists, secure storage, and an incident response plan.
Read field noteSecure Token Storage in React and Tauri Desktop Applications
A practical architecture for short-lived access tokens, rotating refresh tokens, OS credential vaults, IPC validation, logout, and unrestricted local work in Tauri.
Read field note