Skip to content

Commit bfe7557

Browse files
committed
fix: filter boolean values from trusted-committers allowlist
Python's bool is a subclass of int, so YAML true/false would pass the isinstance(entry, (str, int, float)) check and become "true"/"false" strings in the allowlist. Added explicit bool exclusion. Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: rnetser <rnetser@redhat.com>
1 parent f488f9f commit bfe7557

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

webhook_server/libs/github_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ def _repo_data_from_config(self, repository_config: dict[str, Any]) -> None:
10021002
self.security_trusted_committers: list[str] = [
10031003
str(entry).strip().lower()
10041004
for entry in _trusted_committers
1005-
if isinstance(entry, (str, int, float)) and str(entry).strip()
1005+
if isinstance(entry, (str, int, float)) and not isinstance(entry, bool) and str(entry).strip()
10061006
]
10071007

10081008
_auto_merge_prs = self.config.get_value(

0 commit comments

Comments
 (0)