Details

    • Type: Language-Specification
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Impact:
      Unknown 'null' severity
    • Likelihood:
      Unknown 'null' severity
    • Default Quality Profiles:
      Sonar way, Sonar way recommended

      Description

      Questionable Code Example

      // === Client side ===
      crypto.subtle.encrypt(algo, key, plainData); // Questionable
      crypto.subtle.decrypt(algo, key, encData); // Questionable
      
      // === Server side ===
      const crypto = require("crypto");
      const cipher = crypto.createCipher(algo, key); // Questionable
      const cipheriv = crypto.createCipheriv(algo, key, iv); // Questionable
      const decipher = crypto.createDecipher(algo, key); // Questionable
      const decipheriv = crypto.createDecipheriv(algo, key, iv); // Questionable
      const pubEnc = crypto.publicEncrypt(key, buf); // Questionable
      const privDec = crypto.privateDecrypt({ key: key, passphrase: secret }, pubEnc); // Questionable
      const privEnc = crypto.privateEncrypt({ key: key, passphrase: secret }, buf); // Questionable
      const pubDec = crypto.publicDecrypt(key, privEnc); // Questionable
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lars.svensson Lars Svensson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: