Skip to content

Commit 9f8a9b9

Browse files
committed
JS: Add taint source/sink summary queries
1 parent 1ab75eb commit 9f8a9b9

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @name Taint sinks
3+
* @description Expressions that are vulnerable if containing untrusted data.
4+
* @kind problem
5+
* @problem.severity informational
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"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* @name Taint sources
3+
* @description Sources of untrusted input.
4+
* @kind problem
5+
* @problem.severity informational
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()

0 commit comments

Comments
 (0)