Skip to content

Contain lockfile paths during verification - #80

Open
andrew wants to merge 1 commit into
mainfrom
fix/verify-path-containment
Open

andrew wants to merge 1 commit into
mainfrom
fix/verify-path-containment

Conversation

@andrew

@andrew andrew commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

An attacker-supplied lockfile could make pin verify hash files outside the output directory and print their digests. A traversing pin:out_dir could also expose filenames through the extra-file scan.

Validate lockfile paths before reading assets, then use os.Root to constrain the output directory to the project and asset reads and directory scans to that output directory. This also rejects symlink escapes while preserving internal symlinks and missing-file reporting.

Add CLI regression coverage for traversal, symlink escapes, empty asset lists, and valid relative output directories.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 13:34

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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.

2 participants