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,vuln

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: 4b0a0048304602210091cddffbc443de1246dcce692d21814fc13743dc54a5bb56a370864883500a68022100df843e3b2418f27656fc0b49b78add2dc9cdeb8c5b984f08a441fbc727095387:922c64590222798bb761d5b6d8e72950