Skip to content

Commit cb84e63

Browse files
committed
Shared: Fix for 'wildcard'.
1 parent 07d4df1 commit cb84e63

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ fn test_private_info(
368368
sink(info.financials.accounting);
369369
sink(info.financials.unaccounted);
370370
sink(info.financials.multiband);
371-
sink(info.financials.wildcard_not_matched); // $ SPURIOUS: sensitive=private
371+
sink(info.financials.wildcard_not_matched);
372372

373373
sink(ContactDetails::FavouriteColor("blue".to_string()));
374374
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ module HeuristicNames {
145145
* suggesting nouns within the string do not represent the meaning of the whole string (e.g. a URL or a SQL query).
146146
*
147147
* We also filter out common words like `certain` and `concert`, since otherwise these could
148-
* be matched by the certificate regular expressions. Same for `accountable` (account), or
149-
* `secretarial` (secret).
148+
* be matched by the certificate regular expressions. Same for `accountable` (account),
149+
* `secretarial` (secret), `wildcard` (card).
150150
*/
151151
string notSensitiveRegexp() {
152152
result =
153153
"(?is).*([^\\w$.-]|redact|censor|obfuscate|hash|md5|sha|random|((?<!un)(en))?(crypt|(?<!pass)code)|"
154-
+ "certain|concert|secretar|account(ant|ab|ing|ed)|file|path|([_-]|\\b)url).*"
154+
+ "certain|concert|secretar|wildcard|account(ant|ab|ing|ed)|file|path|([_-]|\\b)url).*"
155155
}
156156

157157
/**

0 commit comments

Comments
 (0)