id: openstack-user-secrets

info:
  name: OpenStack User Secrets Exposure
  author: geeknik
  severity: high
  description: Internal user_secrets.yml file is exposed in OpenStack.
  reference:
    - https://docs.openstack.org/project-deploy-guide/openstack-ansible/stein/configure.html
  metadata:
    verified: true
    max-request: 2
    github-query: filename:user_secrets.yml
  tags: openstack,config,exposure,files,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/user_secrets.yml"
      - "{{BaseURL}}/user_secrets.yml.old"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "_password:"
          - "OpenStack environment"
        condition: and

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