BÊTA Shoulder est en bêta — Les résultats peuvent parfois être incorrects. Vos retours façonnent ce que nous corrigeons ensuite. Donner mon avis
🔒

Inadequate Encryption Strength

🛡️ 2 règles détectent ceci

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.

Prévalence
Moyenne
1 langages couverts
Impact
Élevé
2 règles de sévérité élevée
Prévention
Documentée
2 exemples de correctifs
2 Prévention
2 Prévention

Comment corriger cette vulnérabilité

JWT Signed with Weak Secret HIGH

Use strong secrets from environment variables for JWT signing, never hardcode

+6 -3 python
  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')
  
Weak Cryptographic Key Generation HIGH

Use RSA 2048+ bits or AES-256 with cryptographically secure key generation

+1 -1 python
  from Crypto.PublicKey import RSA
  
- key = RSA.generate(1024)
+ key = RSA.generate(2048)
  
3 Détection
3 Détection

Trouvez les vulnérabilités dans votre code

Utilisez Shoulder pour scanner votre code à la recherche de patterns Inadequate Encryption Strength. 2 règles.

terminal
# Scan with Shoulder CLI
npx @shoulderdev/cli trust --cwe=326

# Or scan entire project
npx @shoulderdev/cli trust .
4 Signes d'Alerte
4 Signes d'Alerte

Ce qu'il faut surveiller lors des revues de code

Ces patterns indiquent des vulnérabilités potentielles Inadequate Encryption Strength. Recherchez-les lors des revues de code et des audits de sécurité.

🟠
JWT tokens signed with weak, hardcoded, or default secret keys that can be brute-forced python-jwt-weak-secret
🟠
weak cryptographic key generation: insufficient key sizes, predictable keys, or using weak algorithm python-weak-key-generation
🔍

Scannez votre base de code pour Inadequate Encryption Strength

Shoulder CLI trouve les motifs vulnérables dans toute votre base de code.