mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
Python: add taint step for __traceback__
This commit is contained in:
@@ -7,6 +7,7 @@ import python
|
||||
import semmle.python.dataflow.new.DataFlow
|
||||
import semmle.python.dataflow.new.TaintTracking
|
||||
import semmle.python.Concepts
|
||||
import semmle.python.dataflow.new.internal.Attributes
|
||||
private import ExceptionInfo
|
||||
|
||||
/**
|
||||
@@ -20,4 +21,11 @@ class StackTraceExposureConfiguration extends TaintTracking::Configuration {
|
||||
override predicate isSink(DataFlow::Node sink) {
|
||||
sink = any(HTTP::Server::HttpResponse response).getBody()
|
||||
}
|
||||
|
||||
override predicate isAdditionalTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
|
||||
exists(AttrRead attr | attr.getAttributeName() = "__traceback__" |
|
||||
nodeFrom = attr.getObject() and
|
||||
nodeTo = attr
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user