id: jenkins-crumb-token

info:
  name: Jenkins Token or Crumb
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/jenkins.yml
    - https://www.jenkins.io/blog/2018/07/02/new-api-token-system/
    - https://www.jenkins.io/doc/book/security/csrf-protection/
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    verified: true
    max-request: 1
  tags: jenkins,crumb,token,exposure,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - '(?i)jenkins.{0,10}(?:crumb)?.{0,10}\b([0-9a-f]{32,36})\b'
# digest: 490a00463044022031b2fe7b585260286954eda3ac3a447f9d95580c720c51c7e39b3a7d9b5b9c020220035f732e809ce333fa54fadc757ed8690ec322c9959a2b5b964b4bd8eb1a84fc:922c64590222798bb761d5b6d8e72950