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

io.codemodder.codemods.sanitize-spring-multipart-filename.yaml Maven / Gradle / Ivy

There is a newer version: 0.97.3
Show newest version
rules:
  - id: sanitize-spring-multipart-filename
    mode: taint
    metadata:
      options:
        symbolic_propagation: true
    pattern-sources:
      - pattern: (org.springframework.web.multipart.MultipartFile $X).getOriginalFilename()
      - pattern: (MultipartFile $X).getOriginalFilename()
    pattern-sanitizers:
      - pattern-either:
          - pattern: Filenames.toSimpleFileName(...)
    pattern-sinks:
      - patterns:
          - pattern-either:
              - pattern: |
                  new $F(...,<... $SINK ...>)
              - pattern: |
                  $F(<... $SINK ...>)
              - pattern: |
                  return $SINK;
    message: Semgrep found a match
    languages:
      - java
    severity: WARNING




© 2015 - 2024 Weber Informatics LLC | Privacy Policy