id: wordpress-gdpr-cookie-compliance

info:
  name: GDPR Cookie Compliance – Cookie Banner, Cookie Consent, Cookie Notice – CCPA, DSGVO, RGPD Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/gdpr-cookie-compliance/
  metadata:
    plugin_namespace: gdpr-cookie-compliance
    wpscan: https://wpscan.com/plugin/gdpr-cookie-compliance
  tags: tech,wordpress,wp-plugin,top-200,discovery

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

    payloads:
      last_version: helpers/wordpress/plugins/gdpr-cookie-compliance.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: 4a0a00473045022021a1d89eda7b8ac4bb82920ed84b4349090a5dfd3f27344c0f3b7f71ed352e15022100a6df163d7e7632e4a5af805895cde16cf54f631464a09b62d77003254a34f54f:922c64590222798bb761d5b6d8e72950