mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Python: Make exception info concept local
This commit is contained in:
20
python/ql/test/query-tests/Security/CWE-209/ExceptionInfo.ql
Normal file
20
python/ql/test/query-tests/Security/CWE-209/ExceptionInfo.ql
Normal file
@@ -0,0 +1,20 @@
|
||||
import python
|
||||
import semmle.python.dataflow.new.DataFlow
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
import semmle.python.security.dataflow.ExceptionInfo
|
||||
|
||||
class ExceptionInfoTest extends InlineExpectationsTest {
|
||||
ExceptionInfoTest() { this = "ExceptionInfoTest" }
|
||||
|
||||
override string getARelevantTag() { result = "exceptionInfo" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(location.getFile().getRelativePath()) and
|
||||
exists(ExceptionInfo e |
|
||||
location = e.getLocation() and
|
||||
element = e.toString() and
|
||||
value = "" and
|
||||
tag = "exceptionInfo"
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user