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:336">
P2: An empty file name becomes `.`, so `commit(files=[""])` can stage and commit the entire working tree; reject empty paths before joining.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
| @staticmethod | ||
| def get_file_argument(path: str) -> str: | ||
| """Anchor a path so Mercurial parses it as a literal file name.""" | ||
| return os.path.join(os.curdir, path) |
There was a problem hiding this comment.
P2: An empty file name becomes ., so commit(files=[""]) can stage and commit the entire working tree; reject empty paths before joining.
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 336:
<comment>An empty file name becomes `.`, so `commit(files=[""])` can stage and commit the entire working tree; reject empty paths before joining.</comment>
<file context>
@@ -330,13 +330,18 @@ def merge(
+ @staticmethod
+ def get_file_argument(path: str) -> str:
+ """Anchor a path so Mercurial parses it as a literal file name."""
+ return os.path.join(os.curdir, path)
+
def needs_commit(self, filenames: list[str] | None = None) -> bool:
</file context>
| return os.path.join(os.curdir, path) | |
| if not path: | |
| raise ValueError("File path must not be empty") | |
| return os.path.join(os.curdir, path) |
Pass relative repository paths to Mercurial as literal file names in cat, status, commit, and remove operations. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-8N4VZL36.
Avoid converting an empty filename into the current directory before add or commit, and place the security changelog entry below the shared insertion point. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-8N4VZL36.
407b8cc to
7411ca9
Compare
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Pass relative repository paths to Mercurial as literal file names in cat, status, commit, and remove operations.
Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-8N4VZL36.