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

io.codemodder.codemods.harden-xmlinputfactory.yaml Maven / Gradle / Ivy

The newest version!
rules:
  - id: harden-xmlinputfactory
    patterns:
      - pattern-either:
          - pattern: $XMLF = XMLInputFactory.newInstance(...)
          - pattern: $XMLF = XMLInputFactory.newFactory(...)
      - pattern-not-inside: |
          $RT $METHOD ($ARGS) {
            ...
            XMLInputFactorySecurity.hardenFactory($XMLF);
            ...
          }
      - pattern-not-inside: |
          $RT $METHOD ($ARGS) {
            ...
            io.github.pixee.security.XMLInputFactorySecurity.hardenFactory(...);
            ...
          }
      - focus-metavariable: $XMLF
    message: Semgrep found a match
    languages:
      - java
    severity: WARNING




© 2015 - 2024 Weber Informatics LLC | Privacy Policy