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 5 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/addons/tests.py">
<violation number="1" location="weblate/addons/tests.py:12002">
P3: This test only exercises `validate_output_filename` directly. Add a publish-level case that patches `get_output_filename` to return an unsafe name such as `de/../../victim/title.txt`, and assert that `copy_cdn_file` is not called, as `test_manifest_filename_is_reserved` does. Also add a valid name to show the boundary is not over-broad.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
| self.assertTrue(response.context["form"].errors) | ||
|
|
||
|
|
||
| class CDNFilePathValidationTest(SimpleTestCase): |
There was a problem hiding this comment.
P3: This test only exercises validate_output_filename directly. Add a publish-level case that patches get_output_filename to return an unsafe name such as de/../../victim/title.txt, and assert that copy_cdn_file is not called, as test_manifest_filename_is_reserved does. Also add a valid name to show the boundary is not over-broad.
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/addons/tests.py, line 12002:
<comment>This test only exercises `validate_output_filename` directly. Add a publish-level case that patches `get_output_filename` to return an unsafe name such as `de/../../victim/title.txt`, and assert that `copy_cdn_file` is not called, as `test_manifest_filename_is_reserved` does. Also add a valid name to show the boundary is not over-broad.</comment>
<file context>
@@ -11999,6 +11999,17 @@ def test_instructions_with_invalid_settings(self) -> None:
self.assertTrue(response.context["form"].errors)
+class CDNFilePathValidationTest(SimpleTestCase):
+ def test_rejects_unsafe_output_names(self) -> None:
+ for filename in (
</file context>
Treat app-store template directories literally when globbing and reject unsafe CDN output names before publication. Keep the existing staged atomic copy and test both path boundaries. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-CAB1W1MA.
Exercise the publication path with a crafted output name and verify a normal publish still succeeds. Place the changelog entry deeper among security fixes. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-CAB1W1MA.
d568212 to
915e769
Compare
Treat app-store template directories literally when globbing and reject unsafe CDN output names before publication. Keep the existing staged atomic copy and test both path boundaries.
Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-CAB1W1MA.