-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathUI5LogInjection.ql
More file actions
31 lines (26 loc) · 1.13 KB
/
UI5LogInjection.ql
File metadata and controls
31 lines (26 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* @name UI5 client-side Log injection
* @description Building log entries from user-controlled sources is vulnerable to
* insertion of forged log entries by a malicious user.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 3.5
* @precision medium
* @id js/ui5-log-injection
* @tags security
* external/cwe/cwe-117
*/
import javascript
import advanced_security.javascript.frameworks.ui5.UI5LogInjectionQuery
import advanced_security.javascript.frameworks.ui5.dataflow.DataFlow
module UI5LogInjectionFlow = TaintTracking::Global<UI5LogInjection>;
module UI5LogInjectionUI5PathGraph =
UI5PathGraph<UI5LogInjectionFlow::PathNode, UI5LogInjectionFlow::PathGraph>;
import UI5LogInjectionUI5PathGraph
from
UI5LogInjectionUI5PathGraph::UI5PathNode source, UI5LogInjectionUI5PathGraph::UI5PathNode sink,
UI5LogInjectionUI5PathGraph::UI5PathNode primarySource
where
UI5LogInjectionFlow::flowPath(source.getPathNode(), sink.getPathNode()) and
primarySource = source.getAPrimarySource()
select sink, primarySource, sink, "Log entry depends on a $@.", primarySource, "user-provided value"