Skip to content

[fix] bind static mounts and file responses to the host root - #24

Merged
vt128 merged 5 commits into
masterfrom
codex/fix-star-92
Sep 23, 2026
Merged

vt128 merged 5 commits into
masterfrom
codex/fix-star-92

Conversation

@vt128

@vt128 vt128 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Static roots could be selected outside the application directory, while file responses re-read the process cwd on every request. Capture the server's physical working directory once and use it for both mount authorization and file responses (STAR-92).

Static mounts now require an existing directory beneath that root, unless the host explicitly enables allow_unsafe_file_paths. Mounts bind to a resolved directory copy, so changing cwd or retargeting the original alias cannot select a different root. Cover relative/absolute/parent/sibling paths, symlink lifecycle, every file-response entrypoint and custom error responses.

Behavior changes: create directories before mounting; outside static roots require the existing host-only opt-out; relative file responses stay anchored to the server's original directory. Go 1.19 and the pinned Starlark version are unchanged. The separate networking dependency candidate remains in #23.

Validation: failing reproductions retained locally, build, race tests twice, vet, formatting, document coverage, and Go 1.19 Linux amd64 tests with networking disabled. This branch includes the CI preparation from #22; merge #22 first. No release is requested by this PR.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 8 complexity · 0 duplication

Metric Results
Complexity 8
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@vt128
vt128 merged commit 2c2627c into master Sep 23, 2026
17 checks passed
@vt128
vt128 deleted the codex/fix-star-92 branch September 23, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant