allowlist
An allowlist names exactly what is permitted and a denylist names what is forbidden, with everything else allowed.
In more detail
A Content Security Policy is an allowlist of script and style sources. Allowlists are safer than blocklists, because anything new or unexpected is refused until someone adds it.
Examples
The course also uses them for writable fields in mass assignment, for hosts a server may fetch in SSRF, and for reviewed dependencies.When extracting indicators from a report, your own domains and well-known harmless values, such as the hash of an empty file, belong in the allowlist so they never reach a blocklist or raise alerts.Pick<UserEntity, "id" | "email"> works like an allowlist of keys: a newly added secret field is not exposed by defaultRelated terms
- CSP directive — One rule inside a Content Security Policy, such as script-src, that lists the allowed sources for one kind of resource.
- Content Security Policy — An HTTP response header that tells the browser which sources of scripts and other content a page may load, limiting what injected markup can do.
- blocklist — A list of values, such as addresses, domains or file hashes, that a control refuses outright.
- prepared statement — A SQL statement with placeholders, such as ?, whose values are sent separately from the SQL text instead of pasted into it.
- mass assignment — A bug where a handler copies every field of a request body into a data model, so a caller can set fields such as role or balance that were never meant to be writable.
- server-side request forgery — An attack where a server is tricked into fetching a URL the attacker chose, reaching internal systems the attacker cannot reach directly.
- IOC — Indicator of compromise: something observable, such as a file hash, address, domain or URL, that was seen in a known intrusion.
- Pick<T, K> — The utility type that keeps only the listed keys K of type T, like an allowlist of fields.
Taught in
- Remote Servers And Trust — AI Engineering: LLM Apps, RAG & Agents
- Excessive Agency — AI Engineering: LLM Apps, RAG & Agents
- Default Deny, Then Exactly The Doors You Need — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Network Exposure: NodePorts, Host Firewalls And Egress — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Seccomp: Which Syscalls A Container May Make — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Detection Review: Which Signal Catches It? — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Content Security Policy (CSP), Trusted Types And XSS Defenses — Frontend Architecture & Web Platform
- Indicator of Compromise Extraction & Threat Hunting Feeds — Security Operations & Threat Hunting (SOC)
- Injection In All Its Forms — Application Security & Threat Modeling for Engineers
- Server-Side Request Forgery — Application Security & Threat Modeling for Engineers
- Mass Assignment — Application Security & Threat Modeling for Engineers
- Dependency Risk And Typosquatting — Application Security & Threat Modeling for Engineers
- Static Application Security Testing — Application Security & Threat Modeling for Engineers
- Core Utilities: Partial, Required, Readonly, Pick And Omit — Production TypeScript
References
- OWASP Input Validation Cheat Sheet: allowlist vs denylist
- NIST CSRC Glossary: allowlist
- OWASP Input Validation Cheat Sheet