rules:
- id: aws-ebs-unencrypted
  patterns:
  - pattern: |
      resource "aws_ebs_encryption_by_default" $ANYTHING {
        ...
        enabled = false
        ...
      }
  message: The AWS EBS is unencrypted. The AWS EBS encryption protects data in the EBS.
  languages: [hcl]
  severity: WARNING
  metadata:
    owasp:
    - A03:2017 - Sensitive Data Exposure
    cwe:
    - 'CWE-320: CWE CATEGORY: Key Management Errors'
    technology:
    - aws
    - terraform
    category: security
    references:
    - https://owasp.org/Top10/A02_2021-Cryptographic_Failures
    subcategory:
    - vuln
    likelihood: MEDIUM
    impact: MEDIUM
    confidence: MEDIUM
