Repository navigation
fix(security): no absolute server paths in job errors or create_workspace; watchdog false stall - #581
Merged
Merged
Conversation
… server paths in job errors or create_workspace GHSA-fwg5-jfjg-fxpf: a task failing on an 'asset:' input reported the path the reference had resolved to, so a job error read over MCP or the HTTP API carried the server's home directory and workspace layout. The worker's failure reply now runs its message and traceback through dw/path_redaction.py's redact_paths: a file under the job's asset search path becomes 'asset:<name>', one under its output directory 'output:<name>', and a bare root the library's name. The log keeps the paths. The asset not-found messages (dw/assets.py, the gallery metadata 404 in dw/server/outputs.py) name the libraries searched by origin (workspace, common, examples) instead of by directory. GHSA-crqf-hw9p-r739: create_workspace's MCP result is name/default/ current/next only; list_workspaces(detail=True) stays the opt-in for folder paths. The HTTP POST /api/workspaces response is unchanged. Still open: a traceback's frame lines name the server's source and site-packages paths; get_job returns the traceback. Raises the `modules` baseline 168 -> 171: dw/path_redaction.py (this change), plus dw/tasks/h3_latent_upscale.py and dw/tasks/h3_latent_upscaler_model.py, which the #499 reland (924a973) added without raising it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent false stall reports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the two draft advisories GHSA-fwg5-jfjg-fxpf and GHSA-crqf-hw9p-r739. It applies the rule from #521/#527: no response an MCP client sees carries an absolute server path.
Security (d983feb)
dw/path_redaction.py, called fromdw/worker.py). A file under the asset search path becomesasset:<name>, a file under the job's output directory becomesoutput:<name>, and a bare root becomes "the asset library" or "the output folder". The references are built throughdw.references, the only module allowed to spell a prefix.resolve_asset_referenceand the asset 404 indw/server/outputs.py.create_workspacenow returns onlynameanddefault.list_workspaces(detail=True)is still how a client opts in to seeing folder paths. The HTTP API is unchanged.path_redactionmodule, plus the two modules #471 stage 1: upscale_h3_latents + decode_h3_latents tasks, no refine (the measurement) #499 relanded.Test fixes (7a0fdd5)
dw/events.py:note_phasenow restarts the stall watchdog's clock. Before this, a quiet stretch before a phase made the watchdog report a stall 0.0 s into it, which is what madetest_watchdog_fires_after_threshold_with_no_eventsflaky. A new regression test fails without the fix.tests/conftest.py: VRAM estimate checks no longer read the capacity of the accelerator the suite runs on. On a 24 GB Mac this had caused 36 failures that only happened there.tests/test_step_cache.py: regenerated four pipeline-key hashes that went stale when M-F025: FLUX prompt-weighting and step-caching OOM on idle 24 GB card despite offload: model #580 changed four templates' offload setting.Not covered: traceback lines still show paths to the source code and to site-packages.
Test plan
python scripts/arch_metrics.py --check docs/stabilization/baseline.json🤖 Generated with Claude Code