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

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

There is a newer version: 0.97.3
Show newest version
rules:
  - id: harden-xstream
    patterns:
      - pattern: $X = new XStream(...);
      - pattern-not-inside: |
          $RETURNTYPE $METHOD(...) {
            ...
            $X.registerConverter(...);
            ...
          }
      - pattern-not-inside: |
          $RETURNTYPE $METHOD(...) {
            ...
            $X.allowTypes(...);
            ...
          }
      - pattern-not-inside: |
          $RETURNTYPE $METHOD(...) {
            ...
            $X.denyTypes(...);
            ...
          }
      - pattern-not-inside: |
          $RETURNTYPE $METHOD(...) {
            ...
            $X.denyTypesByWildcard(...);
            ...
          }
      - focus-metavariable: $X
    message: Semgrep found a match
    languages:
      - java
    severity: WARNING




© 2015 - 2024 Weber Informatics LLC | Privacy Policy