Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="weblate/vcs/mercurial.py">
<violation number="1" location="weblate/vcs/mercurial.py:100">
P1: `validate_remote_url` still lets `local:` and `weblate://...` reach Mercurial because the base validator treats those schemes as internal sentinels. Reject these values before calling `super()` so `clone_from` cannot pass them to `hg clone` for path or scheme interpretation.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
| # Mercurial treats URL fragments as revisions and evaluates revsets. | ||
| if "#" in url: | ||
| raise RepositoryValidationError(0, "repository_url_invalid") | ||
| return super().validate_remote_url(url) |
There was a problem hiding this comment.
P1: validate_remote_url still lets local: and weblate://... reach Mercurial because the base validator treats those schemes as internal sentinels. Reject these values before calling super() so clone_from cannot pass them to hg clone for path or scheme interpretation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At weblate/vcs/mercurial.py, line 100:
<comment>`validate_remote_url` still lets `local:` and `weblate://...` reach Mercurial because the base validator treats those schemes as internal sentinels. Reject these values before calling `super()` so `clone_from` cannot pass them to `hg clone` for path or scheme interpretation.</comment>
<file context>
@@ -84,11 +85,20 @@ class HgRepository(Repository):
+ # Mercurial treats URL fragments as revisions and evaluates revsets.
+ if "#" in url:
+ raise RepositoryValidationError(0, "repository_url_invalid")
+ return super().validate_remote_url(url)
+
def is_valid(self) -> bool:
</file context>
| return super().validate_remote_url(url) | |
| if url.startswith(("local:", "weblate://")): | |
| raise RepositoryValidationError(0, "repository_url_invalid") | |
| return super().validate_remote_url(url) |
Treat branch names as literals and reject remote URL fragments that Mercurial would evaluate as revisions. Strip response bodies from redirected repository errors. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-GE21V5V5.
Keep the merged local-path scheme guard while rejecting revset fragments in the same runtime validator. Move the changelog entry below the shared insertion point. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-GE21V5V5.
a04b91a to
b84406e
Compare
Treat branch names as literals and reject remote URL fragments that Mercurial would evaluate as revisions. Strip response bodies from redirected repository errors.
Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-GE21V5V5.