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

Weak Password Requirements

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

Weak Password Requirements

The product does not require that users should have strong passwords, which makes it easier for attackers to compromise user accounts.

Without strong password requirements, users often choose weak, easily guessable passwords. This makes brute-force and dictionary attacks more likely to succeed.

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

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

2 Shoulder डिटेक्शन नियमों पर आधारित Weak Password Requirements के लिए रोकथाम रणनीतियाँ।

Weak Password Policy MEDIUM

Enforce minimum 12-character passwords with complexity requirements

+14 -2 go
  func validatePassword(password string) error {
-     if len(password) < 6 {
-         return errors.New("too short")
+     if len(password) < 12 {
+         return errors.New("password must be at least 12 characters")
+     }
+     var hasUpper, hasLower, hasDigit, hasSpecial bool
+     for _, c := range password {
+         switch {
+         case unicode.IsUpper(c):  hasUpper = true
+         case unicode.IsLower(c):  hasLower = true
+         case unicode.IsDigit(c):  hasDigit = true
+         case unicode.IsPunct(c) || unicode.IsSymbol(c): hasSpecial = true
+         }
+     }
+     if !hasUpper || !hasLower || !hasDigit || !hasSpecial {
+         return errors.New("password must include upper, lower, digit, and special char")
      }
      return nil
  }
  
Weak Password Policy HIGH

Require minimum 12 characters with complexity checks or use a password strength library

+4 -2 javascript
- if (password.length < 6) {
-   throw new Error('Password too short');
+ const zxcvbn = require('zxcvbn');
+ 
+ if (password.length < 12 || zxcvbn(password).score < 3) {
+   throw new Error('Password too weak');
  }
  
3 पहचान
3 पहचान

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

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

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

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

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

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

🟠
Password validation at ... lacks proper complexity requirements javascript-weak-password-policy
🟠
password validation that lacks proper complexity requirements, making accounts vulnerable to brute f javascript-weak-password-policy
🔍

अपने कोडबेस को इसके लिए स्कैन करें: Weak Password Requirements

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