ajinabraham.njsscan.good.good_helmet_checks.helmet_header_nosniff

profile photo of ajinabrahamajinabraham
Author
unknown
Download Count*
License

Content-Type-Options header is present. More information: https://helmetjs.github.io/docs/dont-sniff-mimetype/

Run Locally

Run in CI

Defintion

rules:
  - id: helmet_header_nosniff
    message: "Content-Type-Options header is present. More information:
      https://helmetjs.github.io/docs/dont-sniff-mimetype/"
    languages:
      - javascript
    severity: INFO
    patterns:
      - pattern-not: |
          $HELMET(..., {noSniff: false}, ...)
      - pattern-either:
          - pattern: |
              $APP.use(helmet())
          - pattern: |
              helmet.noSniff()
          - pattern: |
              noSniff()
          - pattern: |
              helmet({noSniff: ...})
    metadata:
      license: LGPL-3.0-or-later