-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathInsecureBasicAuth.ql
More file actions
24 lines (22 loc) · 896 Bytes
/
InsecureBasicAuth.ql
File metadata and controls
24 lines (22 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
* @name Insecure basic authentication
* @description Basic authentication only obfuscates username/password in
* Base64 encoding, which can be easily recognized and reversed.
* Transmitting sensitive information without using HTTPS makes
* the data vulnerable to packet sniffing.
* @kind path-problem
* @problem.severity warning
* @security-severity 8.8
* @precision medium
* @id java/insecure-basic-auth
* @tags security
* external/cwe/cwe-522
* external/cwe/cwe-319
*/
import java
import semmle.code.java.security.InsecureBasicAuthQuery
import InsecureBasicAuthFlow::PathGraph
from InsecureBasicAuthFlow::PathNode source, InsecureBasicAuthFlow::PathNode sink
where InsecureBasicAuthFlow::flowPath(source, sink)
select sink.getNode(), source, sink, "Insecure basic authentication from a $@.", source.getNode(),
"HTTP URL"