Skip to content

fix(validate): reject directory traversal in packages[].path - #263

Merged
BryanFRD merged 1 commit into
mainfrom
fix/257-validate-path-traversal
Oct 25, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
fix/257-validate-path-traversal

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Validate now applies the traversal check to packages[].path, as it already does for commit files, versioned files, hooks and config filename. . and nested relative paths stay valid.

Closes #257

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This closes the gap correctly. packages[].path now goes through the same has_traversal check as the other path fields, so both .. segments and absolute paths are rejected. The new tests cover traversal, absolute paths and valid nested paths. Nothing blocking.

@BryanFRD
BryanFRD merged commit c91b1bf into main Oct 25, 2026
13 checks passed
@BryanFRD
BryanFRD deleted the fix/257-validate-path-traversal branch October 25, 2026 08:35
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.

fix(validate): reject directory traversal in packages[].path

1 participant