All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.codemodder.codemods.strip-http-header-newlines.yaml Maven / Gradle / Ivy

There is a newer version: 0.97.3
Show newest version
rules:
  - id: strip-http-header-newlines
    patterns:
      - pattern: (HttpServletResponse $RESPONSE).setHeader($NAME, $VALUE)
      - pattern-not: (HttpServletResponse $RESPONSE).setHeader($NAME, "...")
      - pattern-not: (HttpServletResponse $RESPONSE).setHeader($NAME, Newlines.stripAll($X))
      - pattern-not: (HttpServletResponse $RESPONSE).setHeader($NAME, stripAll($X))
      - pattern-not-inside: |
          class $CLASS {
            ...
            final String $VALUE = ...;
            ...
          }
    message: Semgrep found a match
    languages:
      - java
    severity: WARNING




© 2015 - 2024 Weber Informatics LLC | Privacy Policy