ajinabraham.njsscan.good.good_helmet_checks.helmet_header_feature_policy

profile photo of ajinabrahamajinabraham
Author
unknown
Download Count*
License

Feature-Policy header is present. More information: https://helmetjs.github.io/docs/feature-policy/

Run Locally

Run in CI

Defintion

rules:
  - id: helmet_header_feature_policy
    message: "Feature-Policy header is present. More information:
      https://helmetjs.github.io/docs/feature-policy/"
    languages:
      - javascript
    severity: INFO
    patterns:
      - pattern-not: |
          $HELMET(..., {featurePolicy: false}, ...)
      - pattern-either:
          - pattern: |
              featurePolicy(..., {features: ...}, ...)
          - pattern: |
              helmet.featurePolicy(..., {features: ...}, ...)
          - pattern: |
              helmet({featurePolicy: {features: ...}})
    metadata:
      license: LGPL-3.0-or-later