JS: Add taint source/sink summary queries

This commit is contained in:
Asger Feldthaus
2021-04-20 17:10:09 +01:00
parent 1ab75eb6f4
commit 9f8a9b9cad
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
/**
* @name Taint sinks
* @description Expressions that are vulnerable if containing untrusted data.
* @kind problem
* @problem.severity informational
* @id js/summary/taint-sinks
* @tags summary
* @precision medium
*/
import javascript
import meta.internal.TaintMetrics
from string kind
select relevantTaintSink(kind), kind + " sink"

View File

@@ -0,0 +1,16 @@
/**
* @name Taint sources
* @description Sources of untrusted input.
* @kind problem
* @problem.severity informational
* @id js/summary/taint-sources
* @tags summary
* @precision medium
*/
import javascript
import meta.internal.TaintMetrics
from RemoteFlowSource node
where node = relevantTaintSource()
select node, node.getSourceType()