id: pre-commit-config

info:
  name: Pre-commit Configuration File - Detect
  author: DhiyaneshDk
  severity: info
  description: Pre-commit configuration file was detected.
  reference:
    - https://pre-commit.com/
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    verified: true
    max-request: 2
  tags: exposure,devops,config,cicd,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/.pre-commit-config.yaml"
      - "{{BaseURL}}/pre-commit-config.yaml"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "repos:"
          - "hooks:"
          - "rev:"
        condition: and

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