Skip to content

Commit 7f911f0

Browse files
committed
Rename to insecure basic auth
1 parent 248628b commit 7f911f0

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

java/ql/src/experimental/Security/CWE/CWE-522/UnsecureBasicAuth.java renamed to java/ql/src/experimental/Security/CWE/CWE-522/InsecureBasicAuth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
public class UnsecureBasicAuth {
1+
public class InsecureBasicAuth {
22
/**
33
* Test basic authentication with Apache HTTP request.
44
*/

java/ql/src/experimental/Security/CWE/CWE-522/UnsecureBasicAuth.qhelp renamed to java/ql/src/experimental/Security/CWE/CWE-522/InsecureBasicAuth.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<example>
1313
<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>
14-
<sample src="UnsecureBasicAuth.java" />
14+
<sample src="InsecureBasicAuth.java" />
1515
</example>
1616

1717
<references>

java/ql/src/experimental/Security/CWE/CWE-522/UnsecureBasicAuth.ql renamed to java/ql/src/experimental/Security/CWE/CWE-522/InsecureBasicAuth.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* @name Unsecure basic authentication
2+
* @name Insecure basic authentication
33
* @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.
44
* @kind problem
5-
* @id java/unsecure-basic-auth
5+
* @id java/insecure-basic-auth
66
* @tags security
77
* external/cwe-522
88
* external/cwe-319
@@ -181,7 +181,7 @@ class OpenHttpURLTaintStep extends TaintTracking::AdditionalTaintStep {
181181

182182
class HttpStringToHttpURLOpenMethodFlowConfig extends TaintTracking::Configuration {
183183
HttpStringToHttpURLOpenMethodFlowConfig() {
184-
this = "UnsecureBasicAuth::HttpStringToHttpURLOpenMethodFlowConfig"
184+
this = "InsecureBasicAuth::HttpStringToHttpURLOpenMethodFlowConfig"
185185
}
186186

187187
override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof HttpString }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
edges
2+
| InsecureBasicAuth.java:94:19:94:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuth.java:99:3:99:6 | conn |
3+
| InsecureBasicAuth.java:94:19:94:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuth.java:100:3:100:6 | conn |
4+
| InsecureBasicAuth.java:94:19:94:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuth.java:101:3:101:6 | conn |
5+
nodes
6+
| InsecureBasicAuth.java:94:19:94:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | semmle.label | "http://www.example.com/rest/getuser.do?uid=abcdx" : String |
7+
| InsecureBasicAuth.java:99:3:99:6 | conn | semmle.label | conn |
8+
| InsecureBasicAuth.java:100:3:100:6 | conn | semmle.label | conn |
9+
| InsecureBasicAuth.java:101:3:101:6 | conn | semmle.label | conn |
10+
#select
11+
| InsecureBasicAuth.java:28:3:28:59 | addHeader(...) | Insecure basic authentication |
12+
| InsecureBasicAuth.java:38:3:38:108 | setHeader(...) | Insecure basic authentication |
13+
| InsecureBasicAuth.java:54:3:54:59 | addHeader(...) | Insecure basic authentication |
14+
| InsecureBasicAuth.java:70:3:70:59 | addHeader(...) | Insecure basic authentication |
15+
| InsecureBasicAuth.java:87:3:87:59 | addHeader(...) | Insecure basic authentication |
16+
| InsecureBasicAuth.java:101:3:101:63 | setRequestProperty(...) | Insecure basic authentication |

java/ql/test/experimental/query-tests/security/CWE-522/UnsecureBasicAuth.java renamed to java/ql/test/experimental/query-tests/security/CWE-522/InsecureBasicAuth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import java.net.URLConnection;
1212
import java.util.Base64;
1313

14-
public class UnsecureBasicAuth {
14+
public class InsecureBasicAuth {
1515
/**
1616
* Test basic authentication with Apache HTTP POST request using string constructor.
1717
*/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
experimental/Security/CWE/CWE-522/InsecureBasicAuth.ql

java/ql/test/experimental/query-tests/security/CWE-522/UnsecureBasicAuth.expected

Lines changed: 0 additions & 16 deletions
This file was deleted.

java/ql/test/experimental/query-tests/security/CWE-522/UnsecureBasicAuth.qlref

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)