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

io.codemodder.codemods.harden-java-deserialization.yaml Maven / Gradle / Ivy

There is a newer version: 0.97.3
Show newest version
rules:
  - id: harden-java-deserialization
    patterns:
      - pattern-either:
          - pattern: var $OIS = new ObjectInputStream(...);
          - pattern: ObjectInputStream $OIS = new ObjectInputStream(...);
      - pattern-not-inside: |
          $RETURNTYPE $METHOD(...) {
            ...
            $OIS.setObjectInputFilter(...);
            ...
          }
      - pattern-not-inside: >
          $RETURNTYPE $METHOD(...) {
            ...
            ObjectInputFilters.enableObjectFilterIfUnprotected($OIS);
            ...
          }
      - focus-metavariable: $OIS
    message: Semgrep found a match
    languages:
      - java
    severity: WARNING




© 2015 - 2024 Weber Informatics LLC | Privacy Policy