contrib.nodejsscan.good_helmet_checks.helmet_header_frame_guard

profile photo of returntocorpreturntocorp
Author
99
Download Count*
License

X-Frame-Options header is present. More information: https://helmetjs.github.io/docs/frameguard/

Run Locally

Run in CI

Defintion

rules:
  - id: helmet_header_frame_guard
    message: "X-Frame-Options header is present. More information:
      https://helmetjs.github.io/docs/frameguard/"
    languages:
      - javascript
    severity: WARNING
    patterns:
      - pattern-not: |
          $HELMET(..., {frameguard: false}, ...)
      - pattern-either:
          - pattern: |
              $APP.use(hemlet())
          - pattern: |
              helmet.frameguard(...)
          - pattern: |
              frameguard(...)
          - pattern: |
              helmet({frameguard: ...})
    metadata:
      category: security
      technology:
        - node.js
        - express
      license: Commons Clause License Condition v1.0[LGPL-2.1-only]