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-522/InsecureBasicAuth.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
4
4
<overview>
5
-
<p>Basic authentication only obfuscates username/password in Base64 encoding, which can be easily recognized and reversed, thus it cannot be transmitted over the cleartext HTTP channel. Transmission of sensitive information not in HTTPS is vulnerable to packet sniffing.</p>
5
+
<p>Basic authentication only obfuscates username/password in Base64 encoding, which can be easily recognized and reversed, thus it must not be transmitted over the cleartext HTTP channel. Transmission of sensitive information not in HTTPS is vulnerable to packet sniffing.</p>
Copy file name to clipboardExpand all lines: java/ql/src/experimental/Security/CWE/CWE-522/InsecureBasicAuth.ql
+40-92Lines changed: 40 additions & 92 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
/**
2
2
* @name Insecure basic authentication
3
3
* @description Basic authentication only obfuscates username/password in Base64 encoding, which can be easily recognized and reversed. Transmission of sensitive information not over HTTPS is vulnerable to packet sniffing.
this.getQualifier()=requestand// Constructor call like HttpPost post = new HttpPost("http://www.example.com/rest/endpoint.do"); and BasicHttpRequest post = new BasicHttpRequest("POST", uriStr);
132
-
va.getDestVar()=request.getVariable()and
133
-
va.getSource()=ccand
134
-
cc.getAnArgument()=arg0and
135
-
builtFromHttpStringConcat(arg0)
136
-
)
137
-
}
138
-
}
139
-
140
125
/** The `openConnection` method of Java URL. Not to include `openStream` since it won't be used in this query. */
141
126
classHttpURLOpenMethodextendsMethod{
142
127
HttpURLOpenMethod(){
@@ -145,84 +130,47 @@ class HttpURLOpenMethod extends Method {
145
130
}
146
131
}
147
132
148
-
/**
149
-
* Tracks the flow of data from parameter of URL constructor to the url instance.
0 commit comments