Skip to content

Commit 17dcca3

Browse files
Merge pull request #132 from NHSDigital/ab-mesh-2025-add-check-secret-patterns
mesh-2025: added additional secret patterns
2 parents 6da4c2c + a891e06 commit 17dcca3

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

.gitallowed

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,18 @@ password: str = field\(default=""\)
44
"password": "password"
55
password=_PASSWORD
66
password="BAD"
7-
Mailbox\(mailbox_id=mailbox_id, mailbox_name="Unknown", password="password"\)
7+
Mailbox\(mailbox_id=mailbox_id, mailbox_name="Unknown", password="password"\)
8+
9+
.github/actions/coverage-and-sonar/action.yml:.*(GITHUB|SONAR)_TOKEN: \$\{\{ inputs.(github|sonar)-token \}\}
10+
.*(GITHUB|SONAR)_TOKEN: \$\{\{ secrets.(GITHUB|SONAR)_TOKEN \}\}
11+
poetry.lock:.*asttokens = ">=2.1.0"
12+
13+
.*[Pp][Aa][Ss][Ss][Ww][Oo][Rr][Dd]("|'?)\s*(:|=|!=|==)\s*("|'?)(password|helloworld|str = "password")("|'?)
14+
.*[Pp][Aa][Ss][Ss][Ww][Oo][Rr][Dd]("|'?)\s*(:|=|!=|==)\s*(""|'')
15+
.*("|'?)[Tt][Oo][Kk][Ee][Nn]("|'?)\s*(:|=|!=|==)\s*("|'?)(Final = "Invalid Authentication Token"|Final = "Error Duplicated Authentication Token"|auth_token.strip\(\))("|'?)
16+
.*("|'?)[Tt][Oo][Kk][Ee][Nn]("|'?)\s*(:|=|!=|==)\s*(:|=|!=|==)\s*(""|'')
17+
18+
.*secret_key: str, mailbox_id: str, mailbox_password: str, timestamp: str, nonce: str, nonce_count: str
19+
20+
src/mesh_sandbox/common/messaging.py:.*def try_parse_authorisation_token\(auth_token: str\) -> Optional\[AuthoriseHeaderParts\]:
21+
src/mesh_sandbox/common/messaging.py:.*auth_token = auth_token.*

.gitdisallowed

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ AIza[0-9A-Za-z\\-_]{35}
1515
-----BEGIN[[:blank:]]CERTIFICATE-----
1616
[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}
1717
(CLIENT|client|Client)(_|\s)(SECRET|secret|Secret)\s*(:|=>|=)\s*("|')?(\{)?[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\})?("|')?
18-
("|'?)[Pp][Aa][Ss][Ss][Ww][Oo][Rr][Dd]("|'?)\s*(=|:)\s*.+
19-
("|'?)[Tt][Oo][Kk][Ee][Nn]("|'?)\s*(=|:)\s*.+
18+
.*("|'?)[Pp][Aa][Ss][Ss][Ww][Oo][Rr][Dd](S|s?)("|'?)\s*(=|:)\s*.+
19+
.*("|'?)[Tt][Oo][Kk][Ee][Nn]("|'?)(S|s?)\s*(=|:)\s*.+
20+
.*("|'?)[Ss][Ee][Cc][Rr][Ee][Tt](S|s?)("|'?)\s*(=|:)\s*.+
2021

2122
###_NOTE_REMOVED_PREVIOUS_IP_RULE_:[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}###

0 commit comments

Comments
 (0)