rules:
  - id: javascript-weak-dh-dsa
    pattern-either:
      - pattern: crypto.createDiffieHellman(...)
      - pattern: crypto.getDiffieHellman(...)
      - pattern: crypto.createDiffieHellmanGroup(...)
      - pattern: new crypto.DiffieHellman(...)
      - pattern: crypto.generateKeyPair('dh', ...)
      - pattern: crypto.generateKeyPairSync('dh', ...)
    message: Diffie-Hellman key exchange detected - quantum vulnerable
    severity: WARNING
    languages:
      - javascript
    metadata:
      category: security
      quantum_vulnerable: true
      quantum_risk_score: 80
