mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
JS: Add taint source/sink summary queries
This commit is contained in:
15
javascript/ql/src/Summary/TaintSinks.ql
Normal file
15
javascript/ql/src/Summary/TaintSinks.ql
Normal 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"
|
||||
16
javascript/ql/src/Summary/TaintSources.ql
Normal file
16
javascript/ql/src/Summary/TaintSources.ql
Normal 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()
|
||||
Reference in New Issue
Block a user