Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6593477

Browse files
committed
Python: Limit what functions we treat as returning sensitive data
Before this change, any function that has a parameter that was called password/credentials would be treated as returning sensitive data of that kind. `py/clear-text-logging-sensitive-data` would alert if one of these are logged, which has a LOT of false-positives.
1 parent ea23c2d commit 6593477

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

python/ql/src/semmle/python/security/SensitiveData.qll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ module SensitiveData {
112112

113113
private SensitiveData fromFunction(Value func) {
114114
result = HeuristicNames::getSensitiveDataForName(func.getName())
115-
or
116-
// This is particularly to pick up methods with an argument like "password", which
117-
// may indicate a lookup.
118-
exists(string name | name = func.(PythonFunctionValue).getScope().getAnArg().asName().getId() |
119-
result = HeuristicNames::getSensitiveDataForName(name)
120-
)
121115
}
122116

123117
abstract class Source extends TaintSource {

0 commit comments

Comments
 (0)