contrib.nodejsscan.good_helmet_checks.helmet_header_dns_prefetch

Author
99
Download Count*
License
X-DNS-Prefetch-Control header is present and DNS Prefetch Control is enabled. More information: https://helmetjs.github.io/docs/dns-prefetch-control/
Run Locally
Run in CI
Defintion
rules:
- id: helmet_header_dns_prefetch
message: "X-DNS-Prefetch-Control header is present and DNS Prefetch Control is
enabled. More information:
https://helmetjs.github.io/docs/dns-prefetch-control/"
languages:
- javascript
severity: WARNING
patterns:
- pattern-not: |
$HELMET(..., {dnsPrefetchControl: false}, ...)
- pattern-either:
- pattern: |
$APP.use(helmet())
- pattern: |
helmet.dnsPrefetchControl()
- pattern: |
dnsPrefetchControl()
- pattern: |
helmet.dnsPrefetchControl({ allow: false })
- pattern: |
helmet({dnsPrefetchControl: {allow: false}})
- pattern: |
dnsPrefetchControl({ allow: false })
metadata:
category: security
technology:
- node.js
- express
license: Commons Clause License Condition v1.0[LGPL-2.1-only]
Short Link: https://sg.run/DoLq