ESC

Type to search the knowledge base.

Security

Guides in Security. Written like documentation — short paragraphs, real examples, interview-relevant depth.

XSS for Frontend Engineers

intermediate

How cross-site scripting reaches UI sinks, what React/HTML escaping does and doesn’t save, and layered defenses.

intermediate

Frontend Security Threat Model

intermediate

Threat-model SPAs: assets, attackers, XSS/CSRF/supply-chain, and where frontend controls actually land.

intermediate

XSS Prevention Checklist

intermediate

Actionable XSS checklist: sinks, sanitization, CSP, cookies, URLs, markdown, and PR review prompts.

intermediate

CSRF Basics for SPAs

intermediate

Cross-site request forgery against cookie sessions: SameSite, CSRF tokens, and SPA fetch patterns.

intermediate

Content Security Policy (CSP)

advanced

Reduce XSS blast radius with CSP — script-src nonces/hashes, strict-dynamic, report-only rollout, and what CSP does not fix.

advanced

Secure Cookie Flags

intermediate

HttpOnly, Secure, SameSite, Path, Domain, and Priority: set session cookies so XSS and CSRF have less room.

intermediate

JWT Storage Pitfalls

intermediate

Why localStorage JWTs are XSS bait, cookie alternatives, refresh patterns, and SPA session designs that age better.

intermediate

Open Redirects

intermediate

Unsafe redirect targets in login return URLs and how to allowlist paths without breaking product flows.

intermediate

Clickjacking and X-Frame-Options

intermediate

Stop UI redress attacks with frame-ancestors CSP and X-Frame-Options; know when embedding is intentional.

intermediate

Subresource Integrity

intermediate

SRI hashes on script/link tags so CDN tampering fails closed; generate integrity and pair with CSP.

intermediate

Dependency Supply Chain Risk

intermediate

npm malware, lockfiles, pin policies, and practical frontend controls against dependency attacks.

intermediate

Secrets in Frontend Bundles

beginner

API keys in React env vars are public: what’s safe in the browser, map keys, and how leaks happen.

beginner

HTTPS and Mixed Content

beginner

TLS everywhere, HSTS, and mixed active/passive content blocks that break modern browsers.

beginner

Safe URL Handling

intermediate

Validate href/src/navigation targets: block javascript: and data: traps, open redirects, and XSS via URLs.

intermediate

postMessage Security

advanced

Secure window.postMessage: targetOrigin, event.origin checks, schema validation, and iframe bridges.

advanced

Sandboxing iframes

advanced

iframe sandbox flags explained: lock down embeds, re-enable only needed capabilities, combine with CSP.

advanced

Auth Session UX Security

intermediate

Session UX that doesn’t weaken security: login states, logout everywhere, idle timeouts, and step-up auth.

intermediate

Rate Limiting UX Considerations

intermediate

Design FE for 429s: Retry-After, backoff, idempotency, and login lockouts without trapping users.

intermediate

Privacy and Fingerprinting Basics

advanced

What browser fingerprinting collects, FE APIs that leak entropy, and privacy-preserving product defaults.

advanced