Repository navigation
fix(minimax): apply request policy to media generation requests - #102072
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 12, 2026, 6:11 AM ET / 10:11 UTC. Summary PR surface: Source +204, Tests +284. Total +488 across 7 files. Reproducibility: yes. at source level: current main ignores configured MiniMax request policy on these media paths and leaves generated-media follow-ups outside the guarded path; the canonical issue and after-fix live output independently corroborate the behavior. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land the shared guarded implementation after the provider HTTP owner confirms that the existing provider request policy intentionally authorizes every MiniMax media leg, while retaining default SSRF denial and never forwarding provider credentials to arbitrary result URLs. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main ignores configured MiniMax request policy on these media paths and leaves generated-media follow-ups outside the guarded path; the canonical issue and after-fix live output independently corroborate the behavior. Is this the best way to solve the issue? Yes technically: the patch reuses the canonical sanitizer, resolver, guarded fetch, retry engine, and release contract, while keeping credentials off arbitrary provider-returned URLs; only the intended authorization scope needs human confirmation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7bb59c451122. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +204, Tests +284. Total +488 across 7 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (8 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Clean maintainer review. This fixes a real MiniMax request-policy and generated-media SSRF gap at the narrowest plugin-owned boundary across image, music, and video generation. No breaking API, config, or storage changes; the only compatibility impact is the intended security tightening that private/internal result URLs now require the existing |
…claw#102072) * fix(minimax): apply request policy to media generation requests * fix(minimax): include image request policy * fix(minimax): apply request policy to follow-up media fetches * fix(minimax): preserve retries for guarded media fetches
…ownloads The byteplus and runway video-generation providers fetched the generated video from a URL taken out of the provider's own completion response using an unguarded download call, never re-applying the SSRF guard (DNS pinning, private/loopback/link-local blocking) they already apply to submit and poll. A compromised, MITM'd, or malicious-base-URL provider could point that result URL at an internal address and OpenClaw would fetch it and save the bytes as the generated video (CWE-918), with default configuration. Add a canonical fetchGuardedProviderDownloadResponse helper that mirrors fetchProviderDownloadResponse but always routes the download through the SSRF guard, blocking private targets by default while honoring the resolved allowPrivateNetwork and dispatcherPolicy operator opt-in. Thread the resolved policy into both providers' download step. This matches the always-on guard already used by fal and openrouter and closes the default-configuration gap. minimax (openclaw#102072) and xai (openclaw#104836) are already guarded; vydra is covered by open PR openclaw#105884. Closes openclaw#103083
Summary
models.providers.<providerId>.requestinto provider HTTP resolution instead of silently ignoring configured request overrides.allowPrivateNetwork: falseso configured request policy can control private-network access while the default remains deny-by-default when no request override is configured.minimax request policy,minimax allowPrivateNetwork, andminimax video proxy; no same-file or same-problem open PR was found for these MiniMax media generation paths.Verification
TMPDIR=/media/vdc/0668001470/tmp/openclaw-task-tmp node scripts/run-vitest.mjs extensions/minimax/video-generation-provider.test.ts extensions/minimax/music-generation-provider.test.ts extensions/minimax/image-generation-provider.test.ts- passed;Test Files 3 passed (3),Tests 31 passed (31).TMPDIR=/media/vdc/0668001470/tmp/openclaw-task-tmp OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/minimax/video-generation-provider.ts extensions/minimax/video-generation-provider.test.ts extensions/minimax/music-generation-provider.ts extensions/minimax/music-generation-provider.test.ts extensions/minimax/image-generation-provider.ts extensions/minimax/image-generation-provider.test.ts extensions/minimax/provider-http.test-helpers.ts- passed; exit 0.node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-test.tsbuildinfo- passed; exit 0.git diff --check HEAD~1..HEAD- passed; exit 0.request:parameter madeextensions/minimax/image-generation-provider.test.tsfail becauseresolveProviderHttpRequestConfigno longer received the configured request object; restoring the patch returned the test to green.request:parameters made the focused Vitest fail withexpected undefined to deeply equal { allowPrivateNetwork: true, headers: ... }in both portal media tests; restoring the patch returned the test to green.Real behavior proof
Behavior addressed: MiniMax video/music/image generation now honor configured provider request overrides such as custom headers and
allowPrivateNetworkfor the active provider id. The actual network-path proof below exercises video and music against a local MiniMax-compatiblenode:httpendpoint; image is covered by a focused regression because MiniMax image generation intentionally uses a dedicated fixed regional endpoint rather than the text/mediabaseUrl.Real environment tested: local Linux Node source checkout; actual exported MiniMax portal video and music provider builders; local
node:httpserver; no third-party MiniMax network traffic; proxy env vars unset for the proof process.Exact command run after this patch:
The temporary proof script was not committed. It configured
models.providers.minimax-portal.requestwithallowPrivateNetwork: trueandheaders: { "X-MiniMax-Proof": "policy-applied" }, then called the real MiniMax portal video and music providers against the local endpoint.Observed output after fix:
Evidence after fix: the local endpoint received configured request headers on the actual video submit request, video poll request, and music generation request, and both providers returned generated media. Additional focused regression coverage verifies that the follow-up legs ClawSweeper called out now receive guarded request options, including video status polling, file metadata retrieval, generated video download, and music URL download. Additional retry regression coverage verifies that guarded video polling and music URL downloads still use provider poll/download retry semantics. The image regression separately verifies the image provider passes the same sanitized request object to provider HTTP resolution and that the final image POST receives
allowPrivateNetwork: trueplus the configured header.