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/
  metadata:
    verified: true
    max-request: 1
  tags: jenkins,crumb,token,exposure

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: 490a00463044022062a4abce547bbdc04063d887011717a13e50a5c5542e58c1babc194d0b75ab5f02204c15b394762ffa0d970ea03b641e2eb055f989f8f2cc1fa138c4417252cb1fcc:922c64590222798bb761d5b6d8e72950