बीटा Shoulder बीटा में है — परिणाम कभी-कभी गलत हो सकते हैं। आपकी प्रतिक्रिया तय करती है कि हम आगे क्या ठीक करें। प्रतिक्रिया साझा करें
🔒

Inadequate Encryption Strength

🛡️ 2 नियम इसे पहचानते हैं

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.

व्यापकता
मध्यम
1 भाषाएँ कवर की गईं
प्रभाव
उच्च
2 उच्च गंभीरता वाले नियम
रोकथाम
प्रलेखित
2 फिक्स उदाहरण
2 रोकथाम
2 रोकथाम

इस भेद्यता को कैसे ठीक करें

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 पहचान
3 पहचान

अपने कोड में भेद्यताएँ खोजें

Inadequate Encryption Strength पैटर्न के लिए अपने कोडबेस को स्कैन करने के लिए Shoulder का उपयोग करें। 2 नियम.

टर्मिनल
# Scan with Shoulder CLI
npx @shoulderdev/cli trust --cwe=326

# Or scan entire project
npx @shoulderdev/cli trust .
4 चेतावनी संकेत
4 चेतावनी संकेत

कोड समीक्षा में किन बातों पर ध्यान दें

ये पैटर्न संभावित Inadequate Encryption Strength भेद्यताओं का संकेत देते हैं। कोड समीक्षा और सुरक्षा ऑडिट के दौरान इन्हें देखें।

🟠
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
🔍

अपने कोडबेस को इसके लिए स्कैन करें: Inadequate Encryption Strength

Shoulder CLI आपके पूरे कोडबेस में भेद्य पैटर्न खोजता है।