베타 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 탐지

코드에서 취약점 찾기

Shoulder를 사용하여 코드에서 Inadequate Encryption Strength 패턴을 스캔하세요. 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는 전체 코드베이스에서 취약한 패턴을 찾아냅니다.