Skip to content

Commit c5ddeec

Browse files
Hyperkid123claude
andcommitted
fix(triage): use exact host match to satisfy CodeQL
Replace .endswith() with exact set membership check for gitlab hostnames. CodeQL flagged substring matching as incomplete URL sanitization, even though urlparse().hostname was already used. RHCLOUD-47252 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a5dd356 commit c5ddeec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.claude/skills/triage/triage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def upstream_repo(repo_name):
133133
host = parsed.hostname or ""
134134
if host == "github.com":
135135
return _parse_repo_path(up), "github"
136-
if host.endswith("gitlab.com") or host.endswith("gitlab.cee.redhat.com"):
136+
if host in ("gitlab.com", "gitlab.cee.redhat.com"):
137137
return _parse_repo_path(up), "gitlab"
138138
except Exception:
139139
pass

0 commit comments

Comments
 (0)