id: circleci-config

info:
  name: CircleCI Configuration File - Detect
  author: geeknik
  severity: medium
  description: CircleCI config.yml file was detected.
  reference:
    - https://circleci.com/docs/2.0/sample-config/
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cwe-id: CWE-200
  metadata:
    max-request: 1
  tags: config,exposure,circleci,vuln

http:
  - method: GET
    host-redirects: true
    max-redirects: 3
    path:
      - "{{BaseURL}}/.circleci/config.yml"

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'regex("^version: ", body) && contains(body, "jobs:")'

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100bd7a680f4a30e2e45a7a5d2edddf29a6a78e8df72a82679c21d566a6b33227c70221009f1983b01b64e1dbfa43e83b9125702fd94b87e74a2ef4efde689178c2861c80:922c64590222798bb761d5b6d8e72950