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/UnsecureBasicAuth.qhelp
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,20 @@
10
10
</recommendation>
11
11
12
12
<example>
13
-
<p>The following example shows two ways of using basic authentication. In the 'BAD' case,
14
-
the credentials are transmitted over HTTP. In the 'GOOD' case, the credentials are transmitted over HTTPS.</p>
13
+
<p>The following example shows two ways of using basic authentication. In the 'BAD' case, the credentials are transmitted over HTTP. In the 'GOOD' case, the credentials are transmitted over HTTPS.</p>
Copy file name to clipboardExpand all lines: java/ql/src/experimental/Security/CWE/CWE-522/UnsecureBasicAuth.ql
+43-22Lines changed: 43 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
/**
2
2
* @name Unsecure basic authentication
3
-
* @description Basic authentication only obfuscates username/password in Base64 encoding, which can be easily recognized and reversed. Transmission of sensitive information not in HTTPS is vulnerable to packet sniffing.
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//Check the method invocation with the pattern post.addHeader("Authorization", "Basic " + authStringEnc)
124
+
this.getQualifier()=requestand// Constructor call like HttpPost post = new HttpPost("http://www.example.com/rest/endpoint.do"); and BasicHttpRequest post = new BasicHttpRequest("POST", uriStr);
0 commit comments