id: sidekiq-secret

info:
  name: Sidekiq Secret Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/sidekiq-secret.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/sidekiq-secret.yaml
  metadata:
    max-request: 1
  tags: exposure,token,sidekiq

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 4a0a00473045022100902afb4d04433756eb28776d4939bab845fd79df166cb79913c0e84763b2e552022030793d132f89e85063e3af20fcb2744f7baddbea982753e952ebefbdf639393e:922c64590222798bb761d5b6d8e72950