aptdot-dev commited on
Commit
6eceab2
·
verified ·
1 Parent(s): 28808d2

Upload 4 files

Browse files

Initial upload v<version>

README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc0-1.0
3
+ pretty_name: "HTTP Security Headers Reference"
4
+ language:
5
+ - en
6
+ size_categories:
7
+ - n<1K
8
+ tags:
9
+ - security
10
+ - http-headers
11
+ - csp
12
+ - hsts
13
+ - web-security
14
+ - json
15
+ - json-schema
16
+ configs:
17
+ - config_name: headers
18
+ data_files: records-headers.jsonl
19
+ default: true
20
+ ---
21
+ # HTTP Security Headers Reference
22
+
23
+ 9 HTTP response headers (CSP, HSTS, Permissions-Policy, COOP/COEP/CORP and more) with baseline and hardened values, browser support notes, common pitfalls and config snippets for Nginx, Apache, Next.js, Vercel, Netlify, Caddy and Helmet.
24
+
25
+ Reference data for security linters, config generators, header scanners and documentation.
26
+
27
+ **Full guide and live preview: [www.aptdot.com/datasets/http-security-headers/](https://www.aptdot.com/datasets/http-security-headers/)**
28
+
29
+ | | |
30
+ | :--- | :--- |
31
+ | Version | 1.1.2 (2026-09-27) |
32
+ | License | CC0 1.0 (public domain) |
33
+ | JSON Schema | [`http-security-headers.schema.json`](https://www.aptdot.com/data/v1/http-security-headers.schema.json) (Draft 2020-12) |
34
+ | Source repository | [github.com/mkchd25/aptdot-datasets](https://github.com/mkchd25/aptdot-datasets) |
35
+ | Publisher | [Aptdot](https://www.aptdot.com) |
36
+
37
+ ## Files
38
+
39
+ | File | What it is |
40
+ | :--- | :--- |
41
+ | `http-security-headers.json` | The complete dataset, identical to the file on aptdot.com and GitHub |
42
+ | `http-security-headers.schema.json` | Its JSON Schema (Draft 2020-12) |
43
+ | `records-*.jsonl` | The main lists, one record per line, for the viewer and the `datasets` library |
44
+
45
+ ## Tables
46
+
47
+ | Table | Rows | File | Fields |
48
+ | :--- | ---: | :--- | :--- |
49
+ | `headers` | 9 | `records-headers.jsonl` | `header`, `category`, `rfc_w3c_spec`, `baseline_default`, `recommended_production`, `risk_level`, `app_targets`, `deprecated_alternatives`, ... |
50
+
51
+ ## Load it
52
+
53
+ ```python
54
+ from datasets import load_dataset
55
+
56
+ rows = load_dataset("aptdot/http-security-headers", "headers", split="train")
57
+ ```
58
+
59
+ Or use the complete JSON file as it is:
60
+
61
+ ```python
62
+ import json
63
+ from huggingface_hub import hf_hub_download
64
+
65
+ path = hf_hub_download("aptdot/http-security-headers", "http-security-headers.json", repo_type="dataset")
66
+ data = json.load(open(path, encoding="utf-8"))
67
+ ```
68
+
69
+ ## Check your own data against the schema
70
+
71
+ Paste your records and `http-security-headers.schema.json` into the free [JSON Schema Validator](https://www.aptdot.com/tools/json-schema-validator/). It runs in your
72
+ browser, uploads nothing and explains every problem in plain English with its line number.
73
+
74
+ ## Notes
75
+
76
+ - The `records-*.jsonl` files are generated from `http-security-headers.json`. If they ever disagree, `http-security-headers.json` is the reference.
77
+ - Versions match aptdot.com and GitHub. Changes are listed in the repository's [CHANGELOG](https://github.com/mkchd25/aptdot-datasets/blob/main/CHANGELOG.md).
78
+
79
+ ## License
80
+
81
+ CC0 1.0 Universal: public domain. You can copy, change and use it for any purpose, including commercial use, without asking.
http-security-headers.json ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://www.aptdot.com/data/v1/http-security-headers.schema.json",
3
+ "metadata": {
4
+ "name": "HTTP Security & Permissions Policy Headers Matrix",
5
+ "version": "1.1.2",
6
+ "generated_at": "2026-09-27T07:15:00.000Z",
7
+ "license": "https://creativecommons.org/publicdomain/zero/1.0/",
8
+ "total_headers": 9,
9
+ "description": "Standardized baseline and hardened reference configurations for HTTP response headers across web applications, edge runtimes, and APIs."
10
+ },
11
+ "headers": [
12
+ {
13
+ "header": "Content-Security-Policy",
14
+ "category": "Cross-Site Scripting & Injection Mitigation",
15
+ "rfc_w3c_spec": "https://www.w3.org/TR/CSP3/",
16
+ "baseline_default": "default-src 'self';",
17
+ "recommended_production": "default-src 'self'; script-src 'self' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none';",
18
+ "risk_level": "Critical",
19
+ "app_targets": ["spa", "ssr", "monolith"],
20
+ "deprecated_alternatives": ["X-XSS-Protection", "X-Frame-Options (superseded by frame-ancestors)"],
21
+ "browser_compatibility": {
22
+ "chrome": "25+",
23
+ "firefox": "23+",
24
+ "safari": "7+",
25
+ "edge": "12+"
26
+ },
27
+ "common_pitfalls": "Using 'strict-dynamic' requires supplying a per-request cryptographic nonce or hash to script tags; otherwise, legitimate inline scripts fail with 'Refused to load'. If enabling CSP violation reporting, avoid the deprecated 'report-uri' directive; instead use 'report-to <endpoint-name>;' paired with the modern HTTP response header 'Reporting-Endpoints: <endpoint-name>=\"https://example.com/csp-reports\"'.",
28
+ "snippets": {
29
+ "nginx": "add_header Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\" always;",
30
+ "apache": "Header always set Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\"",
31
+ "next_js": "{ key: 'Content-Security-Policy', value: \"default-src 'self'; frame-ancestors 'none';\" }",
32
+ "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Content-Security-Policy\", \"value\": \"default-src 'self'; frame-ancestors 'none';\" } ] }",
33
+ "netlify": "/*\n Content-Security-Policy: default-src 'self'; frame-ancestors 'none';",
34
+ "caddy": "header Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\"",
35
+ "helmet": "helmet({ contentSecurityPolicy: { directives: { defaultSrc: [\"'self'\"], frameAncestors: [\"'none'\"] } } })"
36
+ }
37
+ },
38
+ {
39
+ "header": "Strict-Transport-Security",
40
+ "category": "Transport Layer & Protocol Security",
41
+ "rfc_w3c_spec": "https://datatracker.ietf.org/doc/html/rfc6797",
42
+ "baseline_default": "max-age=31536000",
43
+ "recommended_production": "max-age=63072000; includeSubDomains; preload",
44
+ "risk_level": "High",
45
+ "app_targets": ["spa", "ssr", "api-only", "microservice"],
46
+ "deprecated_alternatives": [],
47
+ "browser_compatibility": {
48
+ "chrome": "4+",
49
+ "firefox": "4+",
50
+ "safari": "7+",
51
+ "edge": "12+"
52
+ },
53
+ "common_pitfalls": "Submitting a domain to the HSTS preload list is effectively permanent; if any staging or internal subdomain lacks HTTPS, it will become inaccessible across major browsers.",
54
+ "snippets": {
55
+ "nginx": "add_header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\" always;",
56
+ "apache": "Header always set Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"",
57
+ "next_js": "{ key: 'Strict-Transport-Security', value: 'max-age=63072000; includeSubDomains; preload' }",
58
+ "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Strict-Transport-Security\", \"value\": \"max-age=63072000; includeSubDomains; preload\" } ] }",
59
+ "netlify": "/*\n Strict-Transport-Security: max-age=63072000; includeSubDomains; preload",
60
+ "caddy": "header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"",
61
+ "helmet": "helmet.hsts({ maxAge: 63072000, includeSubDomains: true, preload: true })"
62
+ }
63
+ },
64
+ {
65
+ "header": "Permissions-Policy",
66
+ "category": "Browser Hardware & Feature Isolation",
67
+ "rfc_w3c_spec": "https://www.w3.org/TR/permissions-policy-1/",
68
+ "baseline_default": "camera=(), microphone=(), geolocation=()",
69
+ "recommended_production": "camera=(), microphone=(), geolocation=(), browsing-topics=(), payment=(), usb=()",
70
+ "risk_level": "Medium",
71
+ "app_targets": ["spa", "ssr", "monolith"],
72
+ "deprecated_alternatives": ["Feature-Policy"],
73
+ "browser_compatibility": {
74
+ "chrome": "88+",
75
+ "edge": "88+",
76
+ "firefox": "not supported (header; supports iframe allow attribute only)",
77
+ "safari": "not supported (header; supports iframe allow attribute only)"
78
+ },
79
+ "common_pitfalls": "Permissions-Policy is enforced via response headers in Chromium browsers only; Firefox and Safari require the HTML 'allow' attribute directly on <iframe> tags.",
80
+ "snippets": {
81
+ "nginx": "add_header Permissions-Policy \"camera=(), microphone=(), geolocation=()\" always;",
82
+ "apache": "Header always set Permissions-Policy \"camera=(), microphone=(), geolocation=()\"",
83
+ "next_js": "{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()' }",
84
+ "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Permissions-Policy\", \"value\": \"camera=(), microphone=(), geolocation=()\" } ] }",
85
+ "netlify": "/*\n Permissions-Policy: camera=(), microphone=(), geolocation=()",
86
+ "caddy": "header Permissions-Policy \"camera=(), microphone=(), geolocation=()\"",
87
+ "helmet": "app.use((req, res, next) => { res.setHeader('Permissions-Policy', 'camera=(), microphone=(), geolocation=()'); next(); })"
88
+ }
89
+ },
90
+ {
91
+ "header": "X-Content-Type-Options",
92
+ "category": "MIME-Type Sniffing Mitigation",
93
+ "rfc_w3c_spec": "https://fetch.spec.whatwg.org/#x-content-type-options-header",
94
+ "baseline_default": "nosniff",
95
+ "recommended_production": "nosniff",
96
+ "risk_level": "Medium",
97
+ "app_targets": ["spa", "ssr", "api-only", "microservice"],
98
+ "deprecated_alternatives": [],
99
+ "browser_compatibility": {
100
+ "chrome": "1+",
101
+ "firefox": "50+",
102
+ "safari": "6+",
103
+ "edge": "12+"
104
+ },
105
+ "common_pitfalls": "If your web server serves stylesheets or JavaScript files with missing or incorrect Content-Type headers (e.g., text/plain), modern browsers will refuse to execute them.",
106
+ "snippets": {
107
+ "nginx": "add_header X-Content-Type-Options \"nosniff\" always;",
108
+ "apache": "Header always set X-Content-Type-Options \"nosniff\"",
109
+ "next_js": "{ key: 'X-Content-Type-Options', value: 'nosniff' }",
110
+ "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"X-Content-Type-Options\", \"value\": \"nosniff\" } ] }",
111
+ "netlify": "/*\n X-Content-Type-Options: nosniff",
112
+ "caddy": "header X-Content-Type-Options \"nosniff\"",
113
+ "helmet": "helmet.noSniff()"
114
+ }
115
+ },
116
+ {
117
+ "header": "X-Frame-Options",
118
+ "category": "Legacy Clickjacking Mitigation",
119
+ "rfc_w3c_spec": "https://datatracker.ietf.org/doc/html/rfc7034",
120
+ "baseline_default": "SAMEORIGIN",
121
+ "recommended_production": "DENY",
122
+ "risk_level": "Medium",
123
+ "app_targets": ["spa", "ssr", "monolith"],
124
+ "deprecated_alternatives": ["Superseded by CSP: frame-ancestors"],
125
+ "browser_compatibility": {
126
+ "chrome": "1+",
127
+ "firefox": "3.6+",
128
+ "safari": "4+",
129
+ "edge": "12+"
130
+ },
131
+ "common_pitfalls": "Setting X-Frame-Options to ALLOW-FROM is obsolete and ignored by modern browsers. Use Content-Security-Policy: frame-ancestors https://trusted.example.com instead.",
132
+ "snippets": {
133
+ "nginx": "add_header X-Frame-Options \"DENY\" always;",
134
+ "apache": "Header always set X-Frame-Options \"DENY\"",
135
+ "next_js": "{ key: 'X-Frame-Options', value: 'DENY' }",
136
+ "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"X-Frame-Options\", \"value\": \"DENY\" } ] }",
137
+ "netlify": "/*\n X-Frame-Options: DENY",
138
+ "caddy": "header X-Frame-Options \"DENY\"",
139
+ "helmet": "helmet.frameguard({ action: 'deny' })"
140
+ }
141
+ },
142
+ {
143
+ "header": "Referrer-Policy",
144
+ "category": "Privacy & Tracking Leakage Prevention",
145
+ "rfc_w3c_spec": "https://www.w3.org/TR/referrer-policy/",
146
+ "baseline_default": "strict-origin-when-cross-origin",
147
+ "recommended_production": "strict-origin-when-cross-origin",
148
+ "risk_level": "Low",
149
+ "app_targets": ["spa", "ssr", "monolith", "api-only"],
150
+ "deprecated_alternatives": [],
151
+ "browser_compatibility": {
152
+ "chrome": "61+",
153
+ "firefox": "52+",
154
+ "safari": "14+",
155
+ "edge": "79+"
156
+ },
157
+ "common_pitfalls": "Avoid using 'no-referrer-when-downgrade' or 'unsafe-url', as these leak complete path parameters and query strings to third-party tracking services.",
158
+ "snippets": {
159
+ "nginx": "add_header Referrer-Policy \"strict-origin-when-cross-origin\" always;",
160
+ "apache": "Header always set Referrer-Policy \"strict-origin-when-cross-origin\"",
161
+ "next_js": "{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' }",
162
+ "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Referrer-Policy\", \"value\": \"strict-origin-when-cross-origin\" } ] }",
163
+ "netlify": "/*\n Referrer-Policy: strict-origin-when-cross-origin",
164
+ "caddy": "header Referrer-Policy \"strict-origin-when-cross-origin\"",
165
+ "helmet": "helmet.referrerPolicy({ policy: 'strict-origin-when-cross-origin' })"
166
+ }
167
+ },
168
+ {
169
+ "header": "Cross-Origin-Opener-Policy",
170
+ "category": "Process Isolation & Spectre Attack Mitigation",
171
+ "rfc_w3c_spec": "https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-opener-policies",
172
+ "baseline_default": "same-origin-allow-popups",
173
+ "recommended_production": "same-origin",
174
+ "risk_level": "High",
175
+ "app_targets": ["spa", "ssr"],
176
+ "deprecated_alternatives": [],
177
+ "browser_compatibility": {
178
+ "chrome": "83+",
179
+ "firefox": "79+",
180
+ "safari": "15.2+",
181
+ "edge": "83+"
182
+ },
183
+ "common_pitfalls": "Enabling 'same-origin' severs window.opener cross-origin references, which will break third-party OAuth popup workflows unless configured with 'same-origin-allow-popups'.",
184
+ "snippets": {
185
+ "nginx": "add_header Cross-Origin-Opener-Policy \"same-origin\" always;",
186
+ "apache": "Header always set Cross-Origin-Opener-Policy \"same-origin\"",
187
+ "next_js": "{ key: 'Cross-Origin-Opener-Policy', value: 'same-origin' }",
188
+ "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Cross-Origin-Opener-Policy\", \"value\": \"same-origin\" } ] }",
189
+ "netlify": "/*\n Cross-Origin-Opener-Policy: same-origin",
190
+ "caddy": "header Cross-Origin-Opener-Policy \"same-origin\"",
191
+ "helmet": "helmet.crossOriginOpenerPolicy({ policy: 'same-origin' })"
192
+ }
193
+ },
194
+ {
195
+ "header": "Cross-Origin-Embedder-Policy",
196
+ "category": "Process Isolation & Spectre Attack Mitigation",
197
+ "rfc_w3c_spec": "https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-embedder-policy",
198
+ "baseline_default": "unsafe-none",
199
+ "recommended_production": "require-corp",
200
+ "risk_level": "High",
201
+ "app_targets": ["spa", "ssr"],
202
+ "deprecated_alternatives": [],
203
+ "browser_compatibility": {
204
+ "chrome": "83+",
205
+ "firefox": "79+",
206
+ "safari": "15.2+",
207
+ "edge": "83+"
208
+ },
209
+ "common_pitfalls": "Setting 'require-corp' blocks all third-party subresources (images, scripts, fonts) that do not explicitly return a Cross-Origin-Resource-Policy (CORP) header. Use 'credentialless' if external assets lack CORP support.",
210
+ "snippets": {
211
+ "nginx": "add_header Cross-Origin-Embedder-Policy \"require-corp\" always;",
212
+ "apache": "Header always set Cross-Origin-Embedder-Policy \"require-corp\"",
213
+ "next_js": "{ key: 'Cross-Origin-Embedder-Policy', value: 'require-corp' }",
214
+ "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Cross-Origin-Embedder-Policy\", \"value\": \"require-corp\" } ] }",
215
+ "netlify": "/*\n Cross-Origin-Embedder-Policy: require-corp",
216
+ "caddy": "header Cross-Origin-Embedder-Policy \"require-corp\"",
217
+ "helmet": "helmet.crossOriginEmbedderPolicy({ policy: 'require-corp' })"
218
+ }
219
+ },
220
+ {
221
+ "header": "Cross-Origin-Resource-Policy",
222
+ "category": "Cross-Origin Asset Leakage Defense",
223
+ "rfc_w3c_spec": "https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header",
224
+ "baseline_default": "same-site",
225
+ "recommended_production": "same-origin",
226
+ "risk_level": "Medium",
227
+ "app_targets": ["spa", "ssr", "api-only"],
228
+ "deprecated_alternatives": [],
229
+ "browser_compatibility": {
230
+ "chrome": "73+",
231
+ "firefox": "74+",
232
+ "safari": "12+",
233
+ "edge": "79+"
234
+ },
235
+ "common_pitfalls": "Applying 'same-origin' to public static CDN assets (like public logos or open icons) will cause cross-origin websites and client frontends to fail fetching them.",
236
+ "snippets": {
237
+ "nginx": "add_header Cross-Origin-Resource-Policy \"same-origin\" always;",
238
+ "apache": "Header always set Cross-Origin-Resource-Policy \"same-origin\"",
239
+ "next_js": "{ key: 'Cross-Origin-Resource-Policy', value: 'same-origin' }",
240
+ "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Cross-Origin-Resource-Policy\", \"value\": \"same-origin\" } ] }",
241
+ "netlify": "/*\n Cross-Origin-Resource-Policy: same-origin",
242
+ "caddy": "header Cross-Origin-Resource-Policy \"same-origin\"",
243
+ "helmet": "helmet.crossOriginResourcePolicy({ policy: 'same-origin' })"
244
+ }
245
+ }
246
+ ]
247
+ }
http-security-headers.schema.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.aptdot.com/data/v1/http-security-headers.schema.json",
4
+ "title": "Aptdot HTTPSecurityHeadersMatrix",
5
+ "type": "object",
6
+ "required": ["metadata", "headers"],
7
+ "properties": {
8
+ "metadata": {
9
+ "type": "object",
10
+ "required": ["name", "version", "generated_at", "license", "total_headers", "description"],
11
+ "properties": {
12
+ "name": { "type": "string" },
13
+ "version": { "type": "string" },
14
+ "generated_at": { "type": "string", "format": "date-time" },
15
+ "license": { "type": "string", "format": "uri" },
16
+ "total_headers": { "type": "integer", "minimum": 1 },
17
+ "description": { "type": "string" }
18
+ }
19
+ },
20
+ "headers": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "required": [
25
+ "header",
26
+ "category",
27
+ "rfc_w3c_spec",
28
+ "baseline_default",
29
+ "recommended_production",
30
+ "risk_level",
31
+ "app_targets",
32
+ "deprecated_alternatives",
33
+ "browser_compatibility",
34
+ "common_pitfalls",
35
+ "snippets"
36
+ ],
37
+ "properties": {
38
+ "header": { "type": "string" },
39
+ "category": { "type": "string" },
40
+ "rfc_w3c_spec": { "type": "string", "format": "uri" },
41
+ "baseline_default": { "type": "string" },
42
+ "recommended_production": { "type": "string" },
43
+ "risk_level": { "type": "string", "enum": ["Critical", "High", "Medium", "Low"] },
44
+ "app_targets": { "type": "array", "items": { "type": "string" } },
45
+ "deprecated_alternatives": { "type": "array", "items": { "type": "string" } },
46
+ "browser_compatibility": { "type": "object" },
47
+ "common_pitfalls": { "type": "string" },
48
+ "snippets": {
49
+ "type": "object",
50
+ "required": ["nginx", "apache", "next_js", "vercel", "netlify", "caddy", "helmet"],
51
+ "properties": {
52
+ "nginx": { "type": "string" },
53
+ "apache": { "type": "string" },
54
+ "next_js": { "type": "string" },
55
+ "vercel": { "type": "string" },
56
+ "netlify": { "type": "string" },
57
+ "caddy": { "type": "string" },
58
+ "helmet": { "type": "string" }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
records-headers.jsonl ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {"header": "Content-Security-Policy", "category": "Cross-Site Scripting & Injection Mitigation", "rfc_w3c_spec": "https://www.w3.org/TR/CSP3/", "baseline_default": "default-src 'self';", "recommended_production": "default-src 'self'; script-src 'self' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none';", "risk_level": "Critical", "app_targets": ["spa", "ssr", "monolith"], "deprecated_alternatives": ["X-XSS-Protection", "X-Frame-Options (superseded by frame-ancestors)"], "browser_compatibility": {"chrome": "25+", "firefox": "23+", "safari": "7+", "edge": "12+"}, "common_pitfalls": "Using 'strict-dynamic' requires supplying a per-request cryptographic nonce or hash to script tags; otherwise, legitimate inline scripts fail with 'Refused to load'. If enabling CSP violation reporting, avoid the deprecated 'report-uri' directive; instead use 'report-to <endpoint-name>;' paired with the modern HTTP response header 'Reporting-Endpoints: <endpoint-name>=\"https://example.com/csp-reports\"'.", "snippets": {"nginx": "add_header Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\" always;", "apache": "Header always set Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\"", "next_js": "{ key: 'Content-Security-Policy', value: \"default-src 'self'; frame-ancestors 'none';\" }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Content-Security-Policy\", \"value\": \"default-src 'self'; frame-ancestors 'none';\" } ] }", "netlify": "/*\n Content-Security-Policy: default-src 'self'; frame-ancestors 'none';", "caddy": "header Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\"", "helmet": "helmet({ contentSecurityPolicy: { directives: { defaultSrc: [\"'self'\"], frameAncestors: [\"'none'\"] } } })"}}
2
+ {"header": "Strict-Transport-Security", "category": "Transport Layer & Protocol Security", "rfc_w3c_spec": "https://datatracker.ietf.org/doc/html/rfc6797", "baseline_default": "max-age=31536000", "recommended_production": "max-age=63072000; includeSubDomains; preload", "risk_level": "High", "app_targets": ["spa", "ssr", "api-only", "microservice"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "4+", "firefox": "4+", "safari": "7+", "edge": "12+"}, "common_pitfalls": "Submitting a domain to the HSTS preload list is effectively permanent; if any staging or internal subdomain lacks HTTPS, it will become inaccessible across major browsers.", "snippets": {"nginx": "add_header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\" always;", "apache": "Header always set Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"", "next_js": "{ key: 'Strict-Transport-Security', value: 'max-age=63072000; includeSubDomains; preload' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Strict-Transport-Security\", \"value\": \"max-age=63072000; includeSubDomains; preload\" } ] }", "netlify": "/*\n Strict-Transport-Security: max-age=63072000; includeSubDomains; preload", "caddy": "header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"", "helmet": "helmet.hsts({ maxAge: 63072000, includeSubDomains: true, preload: true })"}}
3
+ {"header": "Permissions-Policy", "category": "Browser Hardware & Feature Isolation", "rfc_w3c_spec": "https://www.w3.org/TR/permissions-policy-1/", "baseline_default": "camera=(), microphone=(), geolocation=()", "recommended_production": "camera=(), microphone=(), geolocation=(), browsing-topics=(), payment=(), usb=()", "risk_level": "Medium", "app_targets": ["spa", "ssr", "monolith"], "deprecated_alternatives": ["Feature-Policy"], "browser_compatibility": {"chrome": "88+", "edge": "88+", "firefox": "not supported (header; supports iframe allow attribute only)", "safari": "not supported (header; supports iframe allow attribute only)"}, "common_pitfalls": "Permissions-Policy is enforced via response headers in Chromium browsers only; Firefox and Safari require the HTML 'allow' attribute directly on <iframe> tags.", "snippets": {"nginx": "add_header Permissions-Policy \"camera=(), microphone=(), geolocation=()\" always;", "apache": "Header always set Permissions-Policy \"camera=(), microphone=(), geolocation=()\"", "next_js": "{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Permissions-Policy\", \"value\": \"camera=(), microphone=(), geolocation=()\" } ] }", "netlify": "/*\n Permissions-Policy: camera=(), microphone=(), geolocation=()", "caddy": "header Permissions-Policy \"camera=(), microphone=(), geolocation=()\"", "helmet": "app.use((req, res, next) => { res.setHeader('Permissions-Policy', 'camera=(), microphone=(), geolocation=()'); next(); })"}}
4
+ {"header": "X-Content-Type-Options", "category": "MIME-Type Sniffing Mitigation", "rfc_w3c_spec": "https://fetch.spec.whatwg.org/#x-content-type-options-header", "baseline_default": "nosniff", "recommended_production": "nosniff", "risk_level": "Medium", "app_targets": ["spa", "ssr", "api-only", "microservice"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "1+", "firefox": "50+", "safari": "6+", "edge": "12+"}, "common_pitfalls": "If your web server serves stylesheets or JavaScript files with missing or incorrect Content-Type headers (e.g., text/plain), modern browsers will refuse to execute them.", "snippets": {"nginx": "add_header X-Content-Type-Options \"nosniff\" always;", "apache": "Header always set X-Content-Type-Options \"nosniff\"", "next_js": "{ key: 'X-Content-Type-Options', value: 'nosniff' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"X-Content-Type-Options\", \"value\": \"nosniff\" } ] }", "netlify": "/*\n X-Content-Type-Options: nosniff", "caddy": "header X-Content-Type-Options \"nosniff\"", "helmet": "helmet.noSniff()"}}
5
+ {"header": "X-Frame-Options", "category": "Legacy Clickjacking Mitigation", "rfc_w3c_spec": "https://datatracker.ietf.org/doc/html/rfc7034", "baseline_default": "SAMEORIGIN", "recommended_production": "DENY", "risk_level": "Medium", "app_targets": ["spa", "ssr", "monolith"], "deprecated_alternatives": ["Superseded by CSP: frame-ancestors"], "browser_compatibility": {"chrome": "1+", "firefox": "3.6+", "safari": "4+", "edge": "12+"}, "common_pitfalls": "Setting X-Frame-Options to ALLOW-FROM is obsolete and ignored by modern browsers. Use Content-Security-Policy: frame-ancestors https://trusted.example.com instead.", "snippets": {"nginx": "add_header X-Frame-Options \"DENY\" always;", "apache": "Header always set X-Frame-Options \"DENY\"", "next_js": "{ key: 'X-Frame-Options', value: 'DENY' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"X-Frame-Options\", \"value\": \"DENY\" } ] }", "netlify": "/*\n X-Frame-Options: DENY", "caddy": "header X-Frame-Options \"DENY\"", "helmet": "helmet.frameguard({ action: 'deny' })"}}
6
+ {"header": "Referrer-Policy", "category": "Privacy & Tracking Leakage Prevention", "rfc_w3c_spec": "https://www.w3.org/TR/referrer-policy/", "baseline_default": "strict-origin-when-cross-origin", "recommended_production": "strict-origin-when-cross-origin", "risk_level": "Low", "app_targets": ["spa", "ssr", "monolith", "api-only"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "61+", "firefox": "52+", "safari": "14+", "edge": "79+"}, "common_pitfalls": "Avoid using 'no-referrer-when-downgrade' or 'unsafe-url', as these leak complete path parameters and query strings to third-party tracking services.", "snippets": {"nginx": "add_header Referrer-Policy \"strict-origin-when-cross-origin\" always;", "apache": "Header always set Referrer-Policy \"strict-origin-when-cross-origin\"", "next_js": "{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Referrer-Policy\", \"value\": \"strict-origin-when-cross-origin\" } ] }", "netlify": "/*\n Referrer-Policy: strict-origin-when-cross-origin", "caddy": "header Referrer-Policy \"strict-origin-when-cross-origin\"", "helmet": "helmet.referrerPolicy({ policy: 'strict-origin-when-cross-origin' })"}}
7
+ {"header": "Cross-Origin-Opener-Policy", "category": "Process Isolation & Spectre Attack Mitigation", "rfc_w3c_spec": "https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-opener-policies", "baseline_default": "same-origin-allow-popups", "recommended_production": "same-origin", "risk_level": "High", "app_targets": ["spa", "ssr"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "83+", "firefox": "79+", "safari": "15.2+", "edge": "83+"}, "common_pitfalls": "Enabling 'same-origin' severs window.opener cross-origin references, which will break third-party OAuth popup workflows unless configured with 'same-origin-allow-popups'.", "snippets": {"nginx": "add_header Cross-Origin-Opener-Policy \"same-origin\" always;", "apache": "Header always set Cross-Origin-Opener-Policy \"same-origin\"", "next_js": "{ key: 'Cross-Origin-Opener-Policy', value: 'same-origin' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Cross-Origin-Opener-Policy\", \"value\": \"same-origin\" } ] }", "netlify": "/*\n Cross-Origin-Opener-Policy: same-origin", "caddy": "header Cross-Origin-Opener-Policy \"same-origin\"", "helmet": "helmet.crossOriginOpenerPolicy({ policy: 'same-origin' })"}}
8
+ {"header": "Cross-Origin-Embedder-Policy", "category": "Process Isolation & Spectre Attack Mitigation", "rfc_w3c_spec": "https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-embedder-policy", "baseline_default": "unsafe-none", "recommended_production": "require-corp", "risk_level": "High", "app_targets": ["spa", "ssr"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "83+", "firefox": "79+", "safari": "15.2+", "edge": "83+"}, "common_pitfalls": "Setting 'require-corp' blocks all third-party subresources (images, scripts, fonts) that do not explicitly return a Cross-Origin-Resource-Policy (CORP) header. Use 'credentialless' if external assets lack CORP support.", "snippets": {"nginx": "add_header Cross-Origin-Embedder-Policy \"require-corp\" always;", "apache": "Header always set Cross-Origin-Embedder-Policy \"require-corp\"", "next_js": "{ key: 'Cross-Origin-Embedder-Policy', value: 'require-corp' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Cross-Origin-Embedder-Policy\", \"value\": \"require-corp\" } ] }", "netlify": "/*\n Cross-Origin-Embedder-Policy: require-corp", "caddy": "header Cross-Origin-Embedder-Policy \"require-corp\"", "helmet": "helmet.crossOriginEmbedderPolicy({ policy: 'require-corp' })"}}
9
+ {"header": "Cross-Origin-Resource-Policy", "category": "Cross-Origin Asset Leakage Defense", "rfc_w3c_spec": "https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header", "baseline_default": "same-site", "recommended_production": "same-origin", "risk_level": "Medium", "app_targets": ["spa", "ssr", "api-only"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "73+", "firefox": "74+", "safari": "12+", "edge": "79+"}, "common_pitfalls": "Applying 'same-origin' to public static CDN assets (like public logos or open icons) will cause cross-origin websites and client frontends to fail fetching them.", "snippets": {"nginx": "add_header Cross-Origin-Resource-Policy \"same-origin\" always;", "apache": "Header always set Cross-Origin-Resource-Policy \"same-origin\"", "next_js": "{ key: 'Cross-Origin-Resource-Policy', value: 'same-origin' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Cross-Origin-Resource-Policy\", \"value\": \"same-origin\" } ] }", "netlify": "/*\n Cross-Origin-Resource-Policy: same-origin", "caddy": "header Cross-Origin-Resource-Policy \"same-origin\"", "helmet": "helmet.crossOriginResourcePolicy({ policy: 'same-origin' })"}}