mirror of
https://github.com/github/codeql.git
synced 2026-07-21 11:18:20 +02:00
24 lines
756 B
Plaintext
24 lines
756 B
Plaintext
/**
|
|
* @name Reflected server-side cross-site scripting
|
|
* @description Writing user input directly to a web page
|
|
* allows for a cross-site scripting vulnerability.
|
|
* @kind path-problem
|
|
* @problem.severity error
|
|
* @security-severity 6.1
|
|
* @sub-severity high
|
|
* @precision high
|
|
* @id py/reflective-xss
|
|
* @tags security
|
|
* external/cwe/cwe-079
|
|
* external/cwe/cwe-116
|
|
*/
|
|
|
|
import python
|
|
import semmle.python.security.dataflow.ReflectedXSS
|
|
import DataFlow::PathGraph
|
|
|
|
from ReflectedXssConfiguration config, DataFlow::PathNode source, DataFlow::PathNode sink
|
|
where config.hasFlowPath(source, sink)
|
|
select sink.getNode(), source, sink, "Cross-site scripting vulnerability due to $@.",
|
|
source.getNode(), "a user-provided value"
|