Inadequate Encryption Strength
The product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.
Using encryption with insufficient key lengths or deprecated algorithms provides a false sense of security. Attackers with sufficient resources can break weak encryption.
Jak naprawić tę podatność
Use strong secrets from environment variables for JWT signing, never hardcode
import jwt - - def create_token(user_id): - return jwt.encode({'user_id': user_id}, 'secret', algorithm='HS256') + import os + + SECRET_KEY = os.environ['JWT_SECRET_KEY'] + + def create_token(user_id): + return jwt.encode({'user_id': user_id}, SECRET_KEY, algorithm='HS256')
Use RSA 2048+ bits or AES-256 with cryptographically secure key generation
from Crypto.PublicKey import RSA - key = RSA.generate(1024) + key = RSA.generate(2048)
Znajdz podatnosci w swoim kodzie
Uzyj Shoulder do skanowania kodu w poszukiwaniu wzorcow Inadequate Encryption Strength. 2 reguly.
# Scan with Shoulder CLI npx @shoulderdev/cli trust --cwe=326 # Or scan entire project npx @shoulderdev/cli trust .
Reguly Wykrywania (2)
Na co zwracac uwage podczas przegladu kodu
Te wzorce wskazuja na potencjalne podatnosci Inadequate Encryption Strength. Szukaj ich podczas przegladow kodu i audytow bezpieczenstwa.
Przeskanuj swój kod w poszukiwaniu Inadequate Encryption Strength
Shoulder CLI znajduje podatne wzorce w całym Twoim kodzie.