id: travisci-access-token

info:
  name: TravisCI Access Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/travisci-access-token.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/travisci-access-token.yaml
  metadata:
    verified: true
    max-request: 1
  tags: travisci,exposure,tokens,vuln

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

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