File tree Expand file tree Collapse file tree 3 files changed +33
-9
lines changed Expand file tree Collapse file tree 3 files changed +33
-9
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @name Taint sinks
3
+ * @description Expressions that are vulnerable if containing untrusted data.
4
+ * @kind problem
5
+ * @problem.severity info
6
+ * @id js/summary/taint-sinks
7
+ * @tags summary
8
+ * @precision medium
9
+ */
10
+
11
+ import javascript
12
+ import meta.internal.TaintMetrics
13
+
14
+ from string kind
15
+ select relevantTaintSink ( kind ) , kind + " sink"
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @name Taint sources
3
+ * @description Sources of untrusted input.
4
+ * @kind problem
5
+ * @problem.severity info
6
+ * @id js/summary/taint-sources
7
+ * @tags summary
8
+ * @precision medium
9
+ */
10
+
11
+ import javascript
12
+ import meta.internal.TaintMetrics
13
+
14
+ from RemoteFlowSource node
15
+ where node = relevantTaintSource ( )
16
+ select node , node .getSourceType ( )
Original file line number Diff line number Diff line change @@ -75,16 +75,9 @@ DataFlow::Node relevantTaintSink(string kind) {
75
75
DataFlow:: Node relevantTaintSink ( ) { result = relevantTaintSink ( _) }
76
76
77
77
/**
78
- * Gets a remote flow source or `document.location` source.
78
+ * Gets a relevant remote flow source.
79
79
*/
80
- DataFlow:: Node relevantTaintSource ( ) {
81
- not result .getFile ( ) instanceof IgnoredFile and
82
- (
83
- result instanceof RemoteFlowSource
84
- or
85
- result = DOM:: locationSource ( )
86
- )
87
- }
80
+ RemoteFlowSource relevantTaintSource ( ) { not result .getFile ( ) instanceof IgnoredFile }
88
81
89
82
/**
90
83
* Gets the output of a call that shows intent to sanitize a value
You can’t perform that action at this time.
0 commit comments