Skip to content

Commit 213ab90

Browse files
committed
Shared: Fix for 'api_tok'.
1 parent b60ce3c commit 213ab90

2 files changed

Lines changed: 2 additions & 2 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
@@ -58,7 +58,7 @@ fn test_passwords(
5858
sink(oauth); // $ sensitive=password
5959
sink(one_time_code); // $ MISSING: sensitive=password
6060
sink(api_token); // $ sensitive=password
61-
sink(api_tok); // $ MISSING: sensitive=password
61+
sink(api_tok); // $ sensitive=password
6262

6363
sink(ms); // $ MISSING: sensitive=password
6464
sink(ms.password.as_str()); // $ sensitive=password

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module HeuristicNames {
7676
string maybePassword() {
7777
result =
7878
"(?is).*(pass(wd|word|code|.?phrase)(?!.*question)|(auth(entication|ori[sz]ation)?).?key|oauth|"
79-
+ "api.?(key|token)|([_-]|\\b)mfa([_-]|\\b)).*"
79+
+ "api.?(key|tok)|([_-]|\\b)mfa([_-]|\\b)).*"
8080
}
8181

8282
/**

0 commit comments

Comments
 (0)