id: azure-connection

info:
  name: Azure Connection String
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/rules/azure.yml
    - https://azure.microsoft.com/en-us/blog/windows-azure-web-sites-how-application-strings-and-connection-strings-work/
    - https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string
  metadata:
    verified: true
    max-request: 1
  tags: azure,exposure,token

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?:AccountName|SharedAccessKeyName|SharedSecretIssuer)\s*=\s*([^;]{1,80})\s*;\s*.{0,10}\s*(?:AccountKey|SharedAccessKey|SharedSecretValue)\s*=\s*([^;]{1,100})(?:;|$)
# digest: 4b0a00483046022100a9c68a8941b8b535832fe18daedd13e6e1219fa9071a080dff8787da47989790022100edd25beea0cdecd85e4c8538455b4ee709450d4fdbae236868daa201b8712e66:922c64590222798bb761d5b6d8e72950