id: webview-universal-access-java

info:
  name: Android WebView Universal Access - Detect in Java sources
  author: 7h3b4dger
  severity: info
  description: Android WebView Universal Access enabling was detected - Java source version.
  tags: android,file,webview

file:
  - extensions:
      - java

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "setAllowUniversalAccessFromFileURLs(true)"

      - type: regex
        part: body
        regex:
          - package\s+(?:.*)

    extractors:
      - type: regex
        part: body
        name: package
        group: 1
        regex:
          - (?m)^\s*package\s+([A-Za-z_][A-Za-z0-9_\.]*)\s*;
# digest: 4a0a00473045022100b4ab25d9af5156ca830d2354c2ae9495d6e3b2e012187e4f9b48716025f3466102202a72c3a24c91d16dc9e8cb1673ed0ae719718a2ef199d50bc9cec8a35d85cf90:922c64590222798bb761d5b6d8e72950