mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
Python: Handle _ in sensitive-data-sources
This commit is contained in:
@@ -50,7 +50,7 @@ module HeuristicNames {
|
||||
* Gets a regular expression that identifies strings that may indicate the presence of secret
|
||||
* or trusted data.
|
||||
*/
|
||||
string maybeSecret() { result = "(?is).*((?<!is)secret|(?<!un|is)trusted).*" }
|
||||
string maybeSecret() { result = "(?is).*((?<!is|is_)secret|(?<!un|un_|is|is_)trusted).*" }
|
||||
|
||||
/**
|
||||
* Gets a regular expression that identifies strings that may indicate the presence of
|
||||
|
||||
@@ -39,7 +39,7 @@ print(x) # $ SensitiveUse=password
|
||||
|
||||
# some prefixes makes us ignore it as a source
|
||||
not_found.isSecret
|
||||
not_found.is_secret # $ SPURIOUS: SensitiveDataSource=secret
|
||||
not_found.is_secret
|
||||
|
||||
def my_func(non_sensitive_name):
|
||||
x = non_sensitive_name()
|
||||
|
||||
Reference in New Issue
Block a user