spiderlint 0.0.0 → 0.143.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/LICENSE +235 -0
  2. package/README.md +244 -0
  3. package/bin/spiderlint.js +11 -0
  4. package/dist/agent.js +46 -0
  5. package/dist/cache/extractors.js +37 -0
  6. package/dist/cache/http.js +99 -0
  7. package/dist/cache/index.js +101 -0
  8. package/dist/cache/purge.js +63 -0
  9. package/dist/cache/status.js +52 -0
  10. package/dist/cli.js +602 -0
  11. package/dist/color.js +10 -0
  12. package/dist/config/environment.js +88 -0
  13. package/dist/config/index.js +104 -0
  14. package/dist/config/policy.js +170 -0
  15. package/dist/config/schema.js +127 -0
  16. package/dist/crawl/body.js +92 -0
  17. package/dist/crawl/browser.js +498 -0
  18. package/dist/crawl/crawl.js +58 -0
  19. package/dist/crawl/diversity.js +153 -0
  20. package/dist/crawl/dns.js +194 -0
  21. package/dist/crawl/fetch.js +48 -0
  22. package/dist/crawl/frontier.js +370 -0
  23. package/dist/crawl/guard.js +69 -0
  24. package/dist/crawl/http.js +171 -0
  25. package/dist/crawl/links.js +89 -0
  26. package/dist/crawl/log.js +27 -0
  27. package/dist/crawl/network.js +88 -0
  28. package/dist/crawl/probe.js +107 -0
  29. package/dist/crawl/profile.js +33 -0
  30. package/dist/crawl/rdap.js +86 -0
  31. package/dist/crawl/resolve.js +132 -0
  32. package/dist/crawl/resources.js +233 -0
  33. package/dist/crawl/robots.js +100 -0
  34. package/dist/crawl/route.js +92 -0
  35. package/dist/crawl/scope.js +32 -0
  36. package/dist/crawl/scratch.js +15 -0
  37. package/dist/crawl/sitemap.js +187 -0
  38. package/dist/crawl/svcb.js +59 -0
  39. package/dist/crawl/tls-hello.js +297 -0
  40. package/dist/crawl/tls-probe.js +71 -0
  41. package/dist/facts/browser.js +138 -0
  42. package/dist/facts/byline.js +17 -0
  43. package/dist/facts/co2.js +27 -0
  44. package/dist/facts/csp.js +71 -0
  45. package/dist/facts/export.js +79 -0
  46. package/dist/facts/flatten.js +33 -0
  47. package/dist/facts/graph.js +73 -0
  48. package/dist/facts/headers.js +330 -0
  49. package/dist/facts/html.js +230 -0
  50. package/dist/facts/labels.js +89 -0
  51. package/dist/facts/language.js +32 -0
  52. package/dist/facts/parity.js +38 -0
  53. package/dist/facts/read-note.js +11 -0
  54. package/dist/facts/resources.js +46 -0
  55. package/dist/facts/robots.js +13 -0
  56. package/dist/facts/sites.js +140 -0
  57. package/dist/facts/transport.js +200 -0
  58. package/dist/facts/types.js +4 -0
  59. package/dist/facts/vendors.js +76 -0
  60. package/dist/fold/index.js +94 -0
  61. package/dist/groups/assign.js +45 -0
  62. package/dist/groups/sample.js +60 -0
  63. package/dist/i18n.js +92 -0
  64. package/dist/index.js +607 -0
  65. package/dist/interrupt.js +37 -0
  66. package/dist/logger.js +95 -0
  67. package/dist/plugins/axe.js +104 -0
  68. package/dist/plugins/carbon-txt.js +96 -0
  69. package/dist/plugins/cookies-registry.js +25 -0
  70. package/dist/plugins/cookies.js +168 -0
  71. package/dist/plugins/css.js +328 -0
  72. package/dist/plugins/dns.js +864 -0
  73. package/dist/plugins/feed-content.js +132 -0
  74. package/dist/plugins/feed-model.js +282 -0
  75. package/dist/plugins/feeds.js +836 -0
  76. package/dist/plugins/html-validate.js +191 -0
  77. package/dist/plugins/htmlhint.js +95 -0
  78. package/dist/plugins/icons.js +302 -0
  79. package/dist/plugins/images.js +269 -0
  80. package/dist/plugins/index.js +286 -0
  81. package/dist/plugins/keyboard.js +194 -0
  82. package/dist/plugins/lighthouse.js +110 -0
  83. package/dist/plugins/link-text.js +73 -0
  84. package/dist/plugins/list.js +22 -0
  85. package/dist/plugins/live.js +254 -0
  86. package/dist/plugins/mail.js +985 -0
  87. package/dist/plugins/manifest.js +97 -0
  88. package/dist/plugins/markup.js +98 -0
  89. package/dist/plugins/messages.js +25 -0
  90. package/dist/plugins/network.js +192 -0
  91. package/dist/plugins/origin.js +488 -0
  92. package/dist/plugins/profile-links.js +102 -0
  93. package/dist/plugins/schema-registry.js +101 -0
  94. package/dist/plugins/sshfp.js +159 -0
  95. package/dist/plugins/stack.js +161 -0
  96. package/dist/plugins/structured-data.js +358 -0
  97. package/dist/plugins/tls-probe.js +298 -0
  98. package/dist/plugins/tls-registry.js +418 -0
  99. package/dist/plugins/tls-scan.js +280 -0
  100. package/dist/plugins/trackers-registry.js +27 -0
  101. package/dist/plugins/trackers.js +56 -0
  102. package/dist/plugins/types.js +7 -0
  103. package/dist/plugins/visit.js +50 -0
  104. package/dist/plugins/well-known-registry.js +111 -0
  105. package/dist/plugins/well-known.js +732 -0
  106. package/dist/progress.js +162 -0
  107. package/dist/report/agent.js +122 -0
  108. package/dist/report/checkstyle.js +22 -0
  109. package/dist/report/csv.js +18 -0
  110. package/dist/report/html.js +266 -0
  111. package/dist/report/human.js +220 -0
  112. package/dist/report/index.js +16 -0
  113. package/dist/report/json.js +8 -0
  114. package/dist/report/printable.js +29 -0
  115. package/dist/report/rating.js +26 -0
  116. package/dist/report/sarif.js +100 -0
  117. package/dist/report/stats.js +46 -0
  118. package/dist/rules/builtin.js +465 -0
  119. package/dist/rules/caching.js +103 -0
  120. package/dist/rules/catalog.js +139 -0
  121. package/dist/rules/clock.js +48 -0
  122. package/dist/rules/declarative.js +234 -0
  123. package/dist/rules/deprecated.js +45 -0
  124. package/dist/rules/disclosure.js +99 -0
  125. package/dist/rules/fix.js +21 -0
  126. package/dist/rules/i18n.js +131 -0
  127. package/dist/rules/insights.js +100 -0
  128. package/dist/rules/length.js +52 -0
  129. package/dist/rules/message.js +48 -0
  130. package/dist/rules/relations.js +88 -0
  131. package/dist/rules/robots.js +75 -0
  132. package/dist/rules/rulesets.js +134 -0
  133. package/dist/rules/run.js +75 -0
  134. package/dist/rules/score.js +61 -0
  135. package/dist/rules/types.js +7 -0
  136. package/dist/rules/url.js +90 -0
  137. package/dist/server/analytics.js +49 -0
  138. package/dist/server/api.js +134 -0
  139. package/dist/server/clients.js +54 -0
  140. package/dist/server/clock.js +33 -0
  141. package/dist/server/compress.js +58 -0
  142. package/dist/server/health.js +14 -0
  143. package/dist/server/jobs.js +82 -0
  144. package/dist/server/main.js +83 -0
  145. package/dist/server/page.js +161 -0
  146. package/dist/server/policy.js +145 -0
  147. package/dist/server/providers.js +60 -0
  148. package/dist/server/queue.js +50 -0
  149. package/dist/server/scan.js +39 -0
  150. package/dist/server/settings.js +197 -0
  151. package/dist/server/web.js +353 -0
  152. package/dist/server/worker.js +129 -0
  153. package/dist/store/disk.js +215 -0
  154. package/dist/store/memory.js +18 -0
  155. package/dist/telemetry-environment.js +9 -0
  156. package/dist/telemetry.js +104 -0
  157. package/locales/es/LC_MESSAGES/messages.po +1864 -0
  158. package/locales/uk/LC_MESSAGES/messages.po +1864 -0
  159. package/package.json +134 -2
  160. package/presets/browser.yaml +26 -0
  161. package/presets/graph.yaml +35 -0
  162. package/presets/i18n.yaml +18 -0
  163. package/presets/insights.yaml +12 -0
  164. package/presets/links.yaml +22 -0
  165. package/presets/parity.yaml +59 -0
  166. package/presets/performance.yaml +271 -0
  167. package/presets/recommended.yaml +50 -0
  168. package/presets/redirects.yaml +23 -0
  169. package/presets/resources.yaml +29 -0
  170. package/presets/robots.yaml +13 -0
  171. package/presets/security-headers.yaml +257 -0
  172. package/presets/seo.yaml +380 -0
  173. package/presets/sitemap.yaml +34 -0
  174. package/presets/suggestions.yaml +97 -0
  175. package/presets/sustainability.yaml +16 -0
  176. package/presets/tls.yaml +72 -0
  177. package/presets/vendor.yaml +14 -0
  178. package/presets/web-comprehensive.yaml +17 -0
  179. package/presets/web-quick.yaml +15 -0
  180. package/src/server/apple-touch-icon.png +0 -0
  181. package/src/server/logo-36.png +0 -0
  182. package/src/server/logo-72.png +0 -0
  183. package/src/server/logo.png +0 -0
  184. package/vendors/dns.yaml +21 -0
  185. package/vendors/paths.yaml +55 -0
  186. package/vendors/stack.yaml +57 -0
@@ -0,0 +1,29 @@
1
+ # SPDX-FileCopyrightText: 2026 Damián Búho <damian.buho@proton.me>
2
+ #
3
+ # SPDX-License-Identifier: AGPL-3.0-only
4
+ ---
5
+ description: Scripts, styles, images and fonts — status, mixed content, integrity, caching, compression, overlays
6
+ rules:
7
+ resources/status:
8
+ severity: error
9
+ score: [[0, 9.0], [404, 7.6], [500, 9.0]]
10
+ resources/mixed-content:
11
+ severity: error
12
+ score: 9.4
13
+ resources/sri:
14
+ severity: warning
15
+ score: 6.5
16
+ resources/cache-control:
17
+ severity: warning
18
+ score: 4.8
19
+ resources/compression:
20
+ severity: warning
21
+ score: 4.4
22
+ resources/a11y-overlay:
23
+ fact: resources
24
+ expect: {not: {contains: {properties: {url: {pattern: "^https?://([^/]+\\.)?(acsbapp\\.com|acsbap\\.com|accessibe\\.com|userway\\.org|audioeye\\.com|equalweb\\.com|nagich\\.co\\.il|maxaccess\\.io|allyable\\.com|accessiblyapp\\.com|user1st\\.info|purplelens\\.eu)(:|/|$)"}}}}}
25
+ severity: warning
26
+ score: 5.2
27
+ message: "loads an accessibility overlay, which does not fix the page and gets in the way of assistive tools ({got})"
28
+ fix: "Remove the accessibility overlay script and fix accessibility issues directly."
29
+ docs: https://overlayfactsheet.com/
@@ -0,0 +1,13 @@
1
+ # SPDX-FileCopyrightText: 2026 Damián Búho <damian.buho@proton.me>
2
+ #
3
+ # SPDX-License-Identifier: AGPL-3.0-only
4
+ ---
5
+ description: robots.txt shutting every crawler out, the AI crawlers it names, and its Content Signals
6
+ rules:
7
+ robots/disallow-all: {severity: warning, score: 6.3, when: {site.role: production}}
8
+ robots/ai-crawlers:
9
+ severity: info
10
+ score: 1.6
11
+ robots/content-signal:
12
+ severity: warning
13
+ score: 3.6
@@ -0,0 +1,257 @@
1
+ # SPDX-FileCopyrightText: 2026 Damián Búho <damian.buho@proton.me>
2
+ #
3
+ # SPDX-License-Identifier: AGPL-3.0-only
4
+ ---
5
+ description: HSTS, CSP, nosniff, Referrer-Policy, framing and cross-origin isolation
6
+ rules:
7
+ http/hsts:
8
+ fact: http.parsed.strict-transport-security.value.max-age
9
+ expect: {type: integer, minimum: 1000000}
10
+ when: {url.protocol: "https:", http.parsed.strict-transport-security.errors: {maxItems: 0}}
11
+ severity: warning
12
+ score: 5.8
13
+ message: "Strict-Transport-Security should carry max-age of 1000000 or more, found {got}"
14
+ fix: "Send Strict-Transport-Security: max-age=63072000; includeSubDomains."
15
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Strict-Transport-Security
16
+ http/csp:
17
+ fact: http.csp.directives
18
+ expect: {type: object}
19
+ when: {http.document: true}
20
+ severity: warning
21
+ score: 6.4
22
+ message: "no enforced Content-Security-Policy, in a header or a <meta>"
23
+ fix: "Send a Content-Security-Policy header that allows only the origins and directives the page needs."
24
+ docs: https://developer.mozilla.org/docs/Web/HTTP/CSP
25
+ http/content-type-options:
26
+ fact: http.headers.x-content-type-options
27
+ expect: {type: string, pattern: "^nosniff$"}
28
+ severity: warning
29
+ score: 5.7
30
+ message: "X-Content-Type-Options should be nosniff, found {got}"
31
+ fix: "Send X-Content-Type-Options: nosniff."
32
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Content-Type-Options
33
+ http/referrer-policy:
34
+ fact: http.parsed.referrer-policy.value
35
+ expect: {type: string, not: {enum: [unsafe-url, no-referrer-when-downgrade]}}
36
+ when: {http.parsed.referrer-policy.errors: {maxItems: 0}}
37
+ severity: warning
38
+ score: 5.1
39
+ message: "Referrer-Policy should not leak full URLs, found {got}"
40
+ fix: "Send Referrer-Policy: strict-origin-when-cross-origin, or no-referrer."
41
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Referrer-Policy
42
+ http/frame-options:
43
+ when: {http.document: true}
44
+ severity: info
45
+ score: 3.0
46
+ http/server-disclosure: warning
47
+ http/hsts-subdomains:
48
+ fact: http.parsed.strict-transport-security.value
49
+ expect: {required: [includesubdomains]}
50
+ when: {url.protocol: "https:", http.parsed.strict-transport-security.value: {type: object}}
51
+ severity: info
52
+ score: 2.5
53
+ message: "Strict-Transport-Security should carry includeSubDomains, found {got}"
54
+ fix: "Add includeSubDomains to the Strict-Transport-Security header."
55
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Strict-Transport-Security#includesubdomains
56
+ http/permissions-policy:
57
+ fact: http.parsed.permissions-policy.value
58
+ expect: {type: object, minProperties: 1}
59
+ when: {http.document: true, http.parsed.permissions-policy.errors: {maxItems: 0}}
60
+ severity: info
61
+ score: 1.8
62
+ message: "no Permissions-Policy header naming a feature, found {got}"
63
+ fix: "Send a Permissions-Policy header listing the features the page uses."
64
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Permissions-Policy
65
+ http/coop:
66
+ fact: http.parsed.cross-origin-opener-policy.value
67
+ expect: {enum: [same-origin, same-origin-allow-popups]}
68
+ when: {http.document: true, http.parsed.cross-origin-opener-policy.errors: {maxItems: 0}}
69
+ severity: info
70
+ score: 2.2
71
+ message: "Cross-Origin-Opener-Policy should be same-origin or same-origin-allow-popups, found {got}"
72
+ fix: "Send Cross-Origin-Opener-Policy: same-origin."
73
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy
74
+ http/corp:
75
+ fact: http.headers.cross-origin-resource-policy
76
+ expect: {enum: [same-origin, same-site, cross-origin]}
77
+ severity: info
78
+ score: 2.1
79
+ message: "Cross-Origin-Resource-Policy should be same-origin, same-site or cross-origin, found {got}"
80
+ fix: "Send Cross-Origin-Resource-Policy: same-origin, or same-site if the resource is shared."
81
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Cross-Origin-Resource-Policy
82
+ http/csp-upgrade-insecure:
83
+ fact: http.csp.directives
84
+ expect: {required: [upgrade-insecure-requests]}
85
+ when: {http.document: true, url.protocol: "https:", http.csp.directives: {type: object}}
86
+ severity: warning
87
+ score: 5.3
88
+ message: "Content-Security-Policy lacks upgrade-insecure-requests"
89
+ fix: "Add upgrade-insecure-requests to the Content-Security-Policy."
90
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/upgrade-insecure-requests
91
+ http/csp-trusted-types:
92
+ fact: http.csp.directives
93
+ expect: {required: [require-trusted-types-for], properties: {require-trusted-types-for: {contains: {pattern: "^(?i:'script')$"}}}}
94
+ when: {http.document: true, http.csp.directives: {type: object}}
95
+ severity: info
96
+ score: 2.4
97
+ message: "Content-Security-Policy lacks require-trusted-types-for 'script'"
98
+ fix: "Add require-trusted-types-for 'script' to the Content-Security-Policy."
99
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/require-trusted-types-for
100
+ http/csp-script-src:
101
+ fact: http.csp.directives
102
+ expect: {anyOf: [{required: [script-src]}, {required: [default-src]}]}
103
+ when: {http.document: true, http.csp.directives: {type: object}}
104
+ severity: warning
105
+ score: 6.3
106
+ message: "Content-Security-Policy sets neither script-src nor default-src, so any script loads"
107
+ fix: "Set script-src to the origins that may run scripts, or default-src if every directive needs the same."
108
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/script-src
109
+ http/csp-unsafe-inline:
110
+ fact: http.csp.directives
111
+ expect:
112
+ if: {required: [script-src]}
113
+ then: {properties: {script-src: {not: {contains: {pattern: "^(?i:'unsafe-inline')$"}}}}}
114
+ else: {properties: {default-src: {not: {contains: {pattern: "^(?i:'unsafe-inline')$"}}}}}
115
+ when: {http.document: true, http.csp.directives: {type: object}}
116
+ severity: warning
117
+ score: 6.2
118
+ message: "Content-Security-Policy allows inline scripts with 'unsafe-inline' and no nonce or hash: {got}"
119
+ fix: "Replace 'unsafe-inline' with nonces or hashes."
120
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_inline_script
121
+ http/csp-unsafe-eval:
122
+ fact: http.csp.directives
123
+ expect:
124
+ if: {required: [script-src]}
125
+ then: {properties: {script-src: {not: {contains: {pattern: "^(?i:'unsafe-eval')$"}}}}}
126
+ else: {properties: {default-src: {not: {contains: {pattern: "^(?i:'unsafe-eval')$"}}}}}
127
+ when: {http.document: true, http.csp.directives: {type: object}}
128
+ severity: warning
129
+ score: 6.0
130
+ message: "Content-Security-Policy allows eval() with 'unsafe-eval': {got}"
131
+ fix: "Remove 'unsafe-eval' from script-src."
132
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_eval_expressions
133
+ http/csp-script-wildcard:
134
+ fact: http.csp.directives
135
+ expect:
136
+ if: {required: [script-src]}
137
+ then: {properties: {script-src: {not: {contains: {pattern: "^(?i:\\*|[a-z][a-z0-9+.-]*:)$"}}}}}
138
+ else: {properties: {default-src: {not: {contains: {pattern: "^(?i:\\*|[a-z][a-z0-9+.-]*:)$"}}}}}
139
+ when: {http.document: true, http.csp.directives: {type: object}}
140
+ severity: warning
141
+ score: 6.1
142
+ message: "Content-Security-Policy loads scripts from any host through a * or scheme-only source: {got}"
143
+ fix: "Replace * and scheme-only sources with specific origins."
144
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/Sources
145
+ http/csp-object-src:
146
+ fact: http.csp.directives
147
+ expect:
148
+ if: {required: [object-src]}
149
+ then: {properties: {object-src: {maxItems: 1, items: {pattern: "^(?i:'none')$"}}}}
150
+ else: {required: [default-src], properties: {default-src: {maxItems: 1, items: {pattern: "^(?i:'none')$"}}}}
151
+ when: {http.document: true, http.csp.directives: {type: object}}
152
+ severity: warning
153
+ score: 5.5
154
+ message: "Content-Security-Policy should set object-src 'none', found {got}"
155
+ fix: "Set object-src 'none' in the Content-Security-Policy."
156
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/object-src
157
+ http/csp-base-uri:
158
+ fact: http.csp.directives
159
+ expect: {required: [base-uri]}
160
+ when: {http.document: true, http.csp.directives: {type: object}}
161
+ severity: info
162
+ score: 2.6
163
+ message: "Content-Security-Policy lacks base-uri, so an injected <base> can redirect relative scripts"
164
+ fix: "Add base-uri to the Content-Security-Policy, e.g. the site origin."
165
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/base-uri
166
+ http/csp-frame-ancestors:
167
+ fact: http.csp.directives
168
+ expect: {required: [frame-ancestors]}
169
+ when: {http.document: true, http.csp.directives: {type: object}}
170
+ severity: info
171
+ score: 2.9
172
+ message: "Content-Security-Policy lacks frame-ancestors, which only a header can carry"
173
+ fix: "Add frame-ancestors to the Content-Security-Policy."
174
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors
175
+ http/reporting-endpoints:
176
+ fact: http.parsed.reporting-endpoints.value
177
+ expect: {type: object, minProperties: 1}
178
+ when: {http.parsed.reporting-endpoints.errors: {maxItems: 0}}
179
+ severity: info
180
+ score: 1.5
181
+ message: "no Reporting-Endpoints header naming an endpoint, found {got}"
182
+ fix: "Send a Reporting-Endpoints header naming your reporting endpoints."
183
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/Reporting-Endpoints
184
+ http/no-x-xss-protection:
185
+ fact: http.headers
186
+ expect: {properties: {x-xss-protection: {pattern: "^\\s*0\\s*$"}}}
187
+ severity: warning
188
+ score: 4.5
189
+ message: "X-XSS-Protection should be absent or 0, found {got}"
190
+ fix: "Remove X-XSS-Protection."
191
+ docs: https://developer.mozilla.org/docs/Web/HTTP/Headers/X-XSS-Protection
192
+ http/deprecated-header:
193
+ severity: info
194
+ score: 1.2
195
+ http/hsts-syntax:
196
+ fact: http.parsed.strict-transport-security.errors
197
+ expect: {maxItems: 0}
198
+ when: {http.parsed.strict-transport-security: {type: object}}
199
+ severity: warning
200
+ score: 5.6
201
+ message: "Strict-Transport-Security breaks RFC 6797 §6.1, so browsers ignore it: {got}"
202
+ fix: "Send Strict-Transport-Security once, as max-age=63072000; includeSubDomains."
203
+ docs: https://www.rfc-editor.org/rfc/rfc6797#section-6.1
204
+ http/csp-syntax:
205
+ fact: http.parsed.content-security-policy.errors
206
+ expect: {maxItems: 0}
207
+ when: {http.document: true, http.parsed.content-security-policy: {type: object}}
208
+ severity: warning
209
+ score: 5.9
210
+ message: "Content-Security-Policy breaks CSP 3, and browsers drop what they cannot read: {got}"
211
+ fix: "Spell every directive as CSP 3 names it and quote keywords, as in script-src 'self'."
212
+ docs: https://www.w3.org/TR/CSP3/#framework-directives
213
+ http/permissions-policy-syntax:
214
+ fact: http.parsed.permissions-policy.errors
215
+ expect: {maxItems: 0}
216
+ when: {http.document: true, http.parsed.permissions-policy: {type: object}}
217
+ severity: warning
218
+ score: 3.7
219
+ message: "Permissions-Policy breaks its structured-field grammar, so browsers ignore it: {got}"
220
+ fix: "Write Permissions-Policy as a dictionary, as in camera=(), geolocation=(self)."
221
+ docs: https://www.w3.org/TR/permissions-policy/#permissions-policy-http-header-field
222
+ http/referrer-policy-syntax:
223
+ fact: http.parsed.referrer-policy.errors
224
+ expect: {maxItems: 0}
225
+ when: {http.parsed.referrer-policy: {type: object}}
226
+ severity: warning
227
+ score: 4.0
228
+ message: "Referrer-Policy breaks the Referrer Policy tokens: {got}"
229
+ fix: "Send Referrer-Policy: strict-origin-when-cross-origin."
230
+ docs: https://www.w3.org/TR/referrer-policy/#referrer-policy-header
231
+ http/coop-syntax:
232
+ fact: http.parsed.cross-origin-opener-policy.errors
233
+ expect: {maxItems: 0}
234
+ when: {http.document: true, http.parsed.cross-origin-opener-policy: {type: object}}
235
+ severity: warning
236
+ score: 3.9
237
+ message: "Cross-Origin-Opener-Policy breaks its structured-field grammar, so browsers ignore it: {got}"
238
+ fix: "Send Cross-Origin-Opener-Policy: same-origin."
239
+ docs: https://html.spec.whatwg.org/multipage/browsers.html#the-coop-headers
240
+ http/coep-syntax:
241
+ fact: http.parsed.cross-origin-embedder-policy.errors
242
+ expect: {maxItems: 0}
243
+ when: {http.parsed.cross-origin-embedder-policy: {type: object}}
244
+ severity: warning
245
+ score: 3.8
246
+ message: "Cross-Origin-Embedder-Policy breaks its structured-field grammar, so browsers ignore it: {got}"
247
+ fix: "Send Cross-Origin-Embedder-Policy: credentialless."
248
+ docs: https://html.spec.whatwg.org/multipage/browsers.html#the-coep-headers
249
+ http/reporting-endpoints-syntax:
250
+ fact: http.parsed.reporting-endpoints.errors
251
+ expect: {maxItems: 0}
252
+ when: {http.parsed.reporting-endpoints: {type: object}}
253
+ severity: warning
254
+ score: 3.4
255
+ message: "Reporting-Endpoints breaks its structured-field grammar, so browsers ignore it: {got}"
256
+ fix: "Send Reporting-Endpoints: default=\"/reports\"."
257
+ docs: https://www.w3.org/TR/reporting-1/#header