Conversation
Automatic input tracking dropped files outside the workspace when a task used their absolute path, but kept them when it reached them through `..`, recording paths such as `../outside.txt`. Those paths are now dropped too, which also stops such writes from failing the cache update. Validation now rejects an entry with an inferred input that has a `..` component before reading any input, so a remote cache entry can't make `vp run` read files outside the workspace. The cache schema version is bumped so local entries recorded with such inputs aren't rejected as errors. Closes #768 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
wan9chi
force-pushed
the
fix-cache-input-paths
branch
from
September 27, 2026 16:40
36d565e to
a480b20
Compare
fspy benchmarklinuxmacoswindows |
This branch has not been deployed
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.
Motivation
A cache entry lists the files its task read, and
vp runreads those files again to check the entry. Paths in a remote cache entry could climb out of the workspace with... A corrupted or malicious entry could then makevp runread any file the user can read, or hang on a file like/dev/zero.Changes
..(for examplecat ../fileon macOS and Linux), it recorded them as../file. Those paths are now ignored too. Normally created entries never have inputs with... A task that writes a file through..is now cached instead of failing withpaths in archives must not have .....component. For a remote entry, this is a read failure and a miss. The reason isremote cache entry couldn't be validated, with the causeinput '../file' can point outside the workspace. Every..is rejected, not just a leading one, because a..after a symlink can leave the workspace even when the path looks like it stays inside...inputs are left behind instead of failing lookups.vt_pathaddsRelativePath::has_parent_dir_component.Globbed inputs are only compared with the current glob results and are never read, so they aren't checked.
Closes #768