Skip to content

Fix filesystem whitelist validation to prevent prefix bypasses#78

Open
zsio wants to merge 1 commit intowbopan:mainfrom
zsio:fix/fs-allowed-path-validation
Open

Fix filesystem whitelist validation to prevent prefix bypasses#78
zsio wants to merge 1 commit intowbopan:mainfrom
zsio:fix/fs-allowed-path-validation

Conversation

@zsio
Copy link

@zsio zsio commented Sep 21, 2025

  • normalize allowed base paths and ensure target directories stay within them using path.relative
  • reject look-alike sibling directories that only share a string prefix with the whitelist
  • add unit coverage proving the stricter guard while keeping existing behaviour intact

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