id: wordpress-imagify

info:
  name: Imagify Image Optimization – Optimize Images | Compress Images | Convert WebP | Convert AVIF Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/imagify/
  metadata:
    plugin_namespace: imagify
    wpscan: https://wpscan.com/plugin/imagify
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/imagify/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/imagify.txt

    extractors:
      - type: regex
        part: body
        internal: true
        name: internal_detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

      - type: regex
        part: body
        name: detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

    matchers-condition: or
    matchers:
      - type: dsl
        name: "outdated_version"
        dsl:
          - compare_versions(internal_detected_version, concat("< ", last_version))

      - type: regex
        part: body
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'
# digest: 4a0a004730450220220aa92fba8527c15c72ec6cea0e144e4d2af29cb6fc4cfa496296e06a0e26be022100d9bc1306c2f98fe42030877e9f621e70c26e93d2850cd9a0000a6de97903821e:922c64590222798bb761d5b6d8e72950