You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java/ql/src/experimental/Security/CWE/CWE-555/PasswordInConfigurationFile.qhelp
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
<qhelp>
3
3
<overview>
4
4
<p>
5
-
Storing a plaintext password in a configuration file allows anyone who can read the file to access the password-protected resources. Therefore it is a common attack vector.
5
+
Storing a plaintext password in a configuration file allows anyone who can read the file to access the password-protected resources.
a.getValue().charAt(a.getValue().length()-1)="="// A basic check of encrypted passwords ending with padding characters, which could be improved to be more accurate.
19
+
a.getValue().matches("%=")// A basic check of encrypted passwords ending with padding characters, which could be improved to be more accurate.
20
20
}
21
21
22
-
fromXMLAttributea
22
+
fromXMLAttributenameAttr
23
23
where
24
-
a.getName().toLowerCase()in["password","pwd"]andnotisNotPassword(a)// Attribute name "password" or "pwd"
24
+
nameAttr.getName().toLowerCase()in["password","pwd"]andnotisNotPassword(nameAttr)// Attribute name "password" or "pwd"
25
25
or
26
26
exists(
27
-
XMLAttributeb// name/value pair like <property name="password" value="mysecret"/>
27
+
XMLAttributevalueAttr// name/value pair like <property name="password" value="mysecret"/>
0 commit comments