Skip to content

Commit 5ed78d1

Browse files
committed
Shared: Fix and simplify the exclusion for 'encrypted' values.
1 parent 6e2fb6f commit 5ed78d1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

rust/ql/test/library-tests/sensitivedata/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ fn test_passwords(
4242
sink(password_str); // $ sensitive=password
4343
sink(password_confirmation); // $ sensitive=password
4444
sink(profile_password); // $ sensitive=password
45-
sink(unencrypted_password); // $ MISSING: sensitive=password
46-
sink(unencoded_password); // $ MISSING: sensitive=password
45+
sink(unencrypted_password); // $ sensitive=password
46+
sink(unencoded_password); // $ sensitive=password
4747
sink(pass_phrase); // $ sensitive=password
4848
sink(passphrase); // $ sensitive=password
4949
sink(passPhrase); // $ sensitive=password

shared/concepts/codeql/concepts/internal/SensitiveDataHeuristics.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ module HeuristicNames {
150150
*/
151151
string notSensitiveRegexp() {
152152
result =
153-
"(?is).*([^\\w$.-]|redact|censor|obfuscate|hash|md5|sha|random|((?<!un)(en))?(crypt|(?<!pass)code)|"
153+
"(?is).*([^\\w$.-]|redact|censor|obfuscate|hash|md5|sha|random|(?<!un)en(crypt|code)|"
154154
+ "certain|concert|secretar|wildcard|coauthor|account(ant|ab|ing|ed)|(?<!pro)file|path|([_-]|\\b)url).*"
155155
}
156156

0 commit comments

Comments
 (0)