rules:
  - id: php-weak-dh-dsa
    pattern-either:
      - pattern: openssl_pkey_new([..., "private_key_type" => OPENSSL_KEYTYPE_DH, ...])
      - pattern: openssl_pkey_new([..., 'private_key_type' => OPENSSL_KEYTYPE_DH, ...])
      - pattern: openssl_pkey_new([..., "private_key_type" => OPENSSL_KEYTYPE_DSA, ...])
      - pattern: openssl_pkey_new([..., 'private_key_type' => OPENSSL_KEYTYPE_DSA, ...])
    message: DH/DSA key generation detected - quantum vulnerable
    severity: WARNING
    languages:
      - php
    metadata:
      category: security
      quantum_vulnerable: true
      quantum_risk_score: 80
