Repository navigation
Conversation
Hardened static app roots against post-publication retargeting and added regression tests. Linear: https://linear.app/fox-cli/issue/FOX-121/keep-static-app-roots-out-of-hidden-folders-after-publication
…olders; I closed a test coverage gap.
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.
Fixes pushed to this branch in 964f826; tests pass ( fox-review: 964f826 |
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.
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
releaseon the job's next run.Made by a fox job (20261105-080009-11590f).