id: exported-providers

info:
  name: Android Exported Providers - Detect
  author: 7h3b4dger
  severity: info
  description: Detects exported content providers declared in the app’s AndroidManifest.xml, excluding those added by dependency libraries.
  tags: android,file,exportedcomponents

file:
  - extensions:
      - xml

    matchers:
      - type: xpath
        part: body
        xpath:
          - "//provider[@android:exported='true']"

    extractors:
      - type: xpath
        part: body
        attribute: android:name
        xpath:
          - "//provider[@android:exported='true' and not(contains(@android:name, 'androidx')) and not(contains(@android:name, 'google'))]"
# digest: 4b0a00483046022100ae19fefa832a8fe0477ab132a4199f1736357246d1481d4ee01922e00b7efba7022100dd90c806e248816f43a478d6bbdf9e16a08975a3bb154c1f88e9a882e8fbfaa7:922c64590222798bb761d5b6d8e72950