Python: Model sensitive data based on variable names

This commit is contained in:
Rasmus Wriedt Larsen
2021-06-04 11:10:50 +02:00
parent f5fd0f8d1c
commit 350f79e1e1
3 changed files with 49 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import python
import semmle.python.dataflow.new.DataFlow
import semmle.python.dataflow.new.TaintTracking
import TestUtilities.InlineExpectationsTest
import semmle.python.dataflow.new.SensitiveDataSources
private import semmle.python.ApiGraphs
@@ -21,7 +22,7 @@ class SensitiveDataSourcesTest extends InlineExpectationsTest {
or
exists(DataFlow::Node use |
use = API::builtin("print").getACall().getArg(_) and
DataFlow::localFlow(source, use) and
TaintTracking::localTaint(source, use) and
location = use.getLocation() and
element = use.toString() and
value = source.getClassification() and