Skip to content

FOX-121: Keep static app roots out of hidden folders after publication - #86

Open
jamarks wants to merge 2 commits into
mainfrom
agent/fox-121-keep-static-app-roots-out-of-hidden-fold
Open

jamarks wants to merge 2 commits into
mainfrom
agent/fox-121-keep-static-app-roots-out-of-hidden-fold

Conversation

@jamarks

@jamarks jamarks commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Why: apps.mjs:80-91 validates the directory only when registered; apps.mjs:104-135 then treats the current realpath of that stored pathname as its trusted root. An app directory replaced after registration with a symlink to a hidden directory can serve that directory's .json and other supported files to anyone allowed through the app's Cloudflare Access policy, despite direct registration of hidden directories being forbidden. Confirmed with a temp home: registered site, observed direct registration of .secret rejected, renamed site and symlinked it to .secret, then staticFile(site, '/token.json')

Hardened static app roots against post-publication retargeting and added regression tests.

Try it: Serve files through a named static app; a root moved to a hidden folder now returns 404.

Verified: node --test tests/apps.test.mjs passed (10/10, exit 0); npm test passed (254/254, exit 0); git diff --check passed (exit 0).

Change: 2 files, 69 lines. Tests pass (npm test), run by the job.

Linear: https://linear.app/fox-cli/issue/FOX-121/keep-static-app-roots-out-of-hidden-folders-after-publication

Merging publishes it to release on the job's next run.

Made by a fox job (20261105-080009-11590f).

@jamarks

jamarks commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

🔧 fox review (gpt-6-sol): The PR keeps static app roots out of hidden and out-of-home folders; I closed a test coverage gap.

  • Fixed: added tests for a published root moved under a hidden parent and replaced by a symlink outside home.

Fixes pushed to this branch in 964f826; tests pass (npm test), run by the job.

fox-review: 964f826

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