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.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb5dcc3f9c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2de09d8d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
45c2ab4 to
b154acc
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b154accd55
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Symlinks below the VCS directory can only come from repository | ||
| # content and would alias the storage of another object. | ||
| msg = f"Object path contains a symbolic link: {path}" | ||
| raise RepositoryPathError(msg) |
There was a problem hiding this comment.
Translate unsafe paths before entering API checkout cleanup
When an API request creates a remote component whose destination is a stale symlink within VCS storage, this exception still produces HTTP 500 instead of a slug validation error. Unlike the previously reported form-validation paths, ComponentSerializer.validate() enters cleanup_remote_checkout_on_error(instance) before calling model validation; that context manager accesses component.repository, whose construction evaluates full_path before reaching its yield or exception handler. Consequently, neither of the new model-validation catches runs. Translate RepositoryPathError at this earlier API boundary, or validate the destination before constructing the repository.
Useful? React with 👍 / 👎.
b154acc to
46a29d8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46a29d864f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Symlinks below the VCS directory can only come from repository | ||
| # content and would alias the storage of another object. | ||
| msg = f"Object path contains a symbolic link: {path}" | ||
| raise RepositoryPathError(msg) |
There was a problem hiding this comment.
Translate rejected checkout paths in upload creation flows
When a document or ZIP upload uses a component slug pointing to a stale symlink within VCS storage, this exception still produces HTTP 500 instead of a slug validation error. Both create_component_from_doc() and create_component_from_zip() evaluate fake.full_path before model validation. The API explicitly skips cleanup_remote_checkout_on_error() for uploads, and neither create_uploaded_repository() nor the UI's CreateFromDoc.form_valid() and CreateFromZip.form_valid() translates RepositoryPathError. Validate the destination or translate the exception at the shared upload boundary so these creation flows reject the path cleanly too.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
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/api/serializers.py">
<violation number="1" location="weblate/api/serializers.py:2648">
P3: This validation message is a plain string, while the same message is wrapped in `gettext()` in `component.py` and the other shared messages in this file use `gettext_lazy`. Wrap it so API responses reuse the translated UI message.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
| repository = component.repository | ||
| except RepositoryPathError as error: | ||
| raise serializers.ValidationError( | ||
| {"slug": "Repository path for this component is not valid."} |
There was a problem hiding this comment.
P3: This validation message is a plain string, while the same message is wrapped in gettext() in component.py and the other shared messages in this file use gettext_lazy. Wrap it so API responses reuse the translated UI message.
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/api/serializers.py, line 2648:
<comment>This validation message is a plain string, while the same message is wrapped in `gettext()` in `component.py` and the other shared messages in this file use `gettext_lazy`. Wrap it so API responses reuse the translated UI message.</comment>
<file context>
@@ -2638,9 +2639,15 @@ class ComponentSerializer(RemovableSerializer[Component]):
+ repository = component.repository
+ except RepositoryPathError as error:
+ raise serializers.ValidationError(
+ {"slug": "Repository path for this component is not valid."}
+ ) from error
+ with repository.lock.hold_before_recovery():
</file context>
| {"slug": "Repository path for this component is not valid."} | |
| { | |
| "slug": gettext_lazy( | |
| "Repository path for this component is not valid." | |
| ) | |
| } |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71477b7365
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Symlinks below the VCS directory can only come from repository | ||
| # content and would alias the storage of another object. | ||
| msg = f"Object path contains a symbolic link: {path}" | ||
| raise RepositoryPathError(msg) |
There was a problem hiding this comment.
Validate checkout paths when duplicating components through the API
When an API creation request uses from_component without repo and its destination slug points to a stale symlink within VCS storage, this exception still produces HTTP 500. That flow skips both checkout cleanup contexts and uses validate_local_from_component_instance(), which calls only clean_model_settings() and validates language settings against the source component; neither validates the destination path. Validation therefore succeeds, but Component._save_component() subsequently calls refresh_linked_component() and raises the uncaught RepositoryPathError. Validate and translate the destination path error during this creation flow too, so the API returns a slug validation error.
Useful? React with 👍 / 👎.
Keep component storage bound to its lexical VCS path and prevent repository content from aliasing another checkout or managed metadata. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-Y9NU65SP.
Convert symlinked category storage paths into a field validation error so category forms reject them cleanly.
Component creation and rename can encounter a symlinked repository path. Convert the path boundary error into a field validation error so requests fail cleanly.
Convert repository path boundary failures during category rename validation into a slug field error. Add coverage for an existing category moved onto a symlink.
Convert repository path failures from model settings validation to a slug error, matching the existing repository-settings path and CI regression. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-Y9NU65SP.
Translate repository path failures raised while entering remote-checkout cleanup into a slug validation error, with API coverage for a stale symlink destination. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-Y9NU65SP.
Report stale symlink destinations as slug validation errors in API and web upload creation before repository cleanup is tracked. Cover document and ZIP uploads in both flows. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-Y9NU65SP.
Validate destination checkout paths before copying a component through the API, where local-source validation skips the model path check. Report a slug error and cover stale symlink destinations. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-Y9NU65SP.
71477b7 to
5045827
Compare
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Keep component storage bound to its lexical VCS path and prevent repository content from aliasing another checkout or managed metadata.
Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-Y9NU65SP.