Repository navigation
Conversation
wan9chi
force-pushed
the
fspy-linux/5-nested-fspy-detection
branch
from
November 28, 2026 04:49
297ebcc to
ecbc3ce
Compare
fspy benchmarklinuxmacoswindows |
wan9chi
force-pushed
the
fspy-linux/5-nested-fspy-detection
branch
3 times, most recently
from
November 28, 2026 04:59
2d67721 to
8c84032
Compare
…-device sentinel probe Co-authored-by: Gemini 4 Neon <noreply@google.com>
wan9chi
force-pushed
the
fspy-linux/5-nested-fspy-detection
branch
from
November 28, 2026 05:07
8c84032 to
e970d5c
Compare
…5-nested-fspy-detection
…5-nested-fspy-detection
Read the nested probe path with user_path and match the new loss tests against UntrackedReason::Incomplete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…5-nested-fspy-detection
…5-nested-fspy-detection # Conflicts: # crates/fspy_preload_linux/src/main.rs
…5-nested-fspy-detection # Conflicts: # crates/fspy/tests/macos_preload.rs # crates/fspy/tests/untracked_fallback.rs # crates/fspy_preload_linux/src/main.rs
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
When a cached
vp runtask invokes a nestedvp runsubprocess (for example, through a wrapper script or package script), attempting to install a second automatic file-access tracker inside an already-tracked process either fails (on Linux, where#1029removes the Linux-onlymincore/process_vm_readvprobe and rejects nestedfspy_preload_linuxmappings withEEXIST) or duplicates interception and breaks outer tracking (on macOS and Windows).Summary
fspy_shared::probe): Define hardcoded random-GUID sentinel paths beneath the OS null device (/dev/null/fspy_probe_92e41940-369e-42f1-876f-a8e2a614fbf2on Linux and macOS,\??\NUL\fspy_probe_92e41940-369e-42f1-876f-a8e2a614fbf2on Windows).fspy_elf_loader+fspy_preload_linux): AddSyscallAction::Return(isize)and short-circuitSysno::faccessatmatching the sentinel path toOk(SyscallAction::Return(0))without recording aPathAccess.fspy_preload_macos): Short-circuitfaccessatmatching the sentinel path to return0without recording aPathAccess.fspy_preload_windows): Short-circuitNtQueryAttributesFilematching the sentinel path to zero-fillFILE_BASIC_INFORMATIONand returnSTATUS_SUCCESSwithout recording aPathAccess.fspy):faccessat/NtQueryAttributesFile, cached process-wide inOnceLock<bool>.UntrackedReason::Nestedinstead ofUntrackedReason::Incomplete.vt):CacheNotUpdatedReason::NestedTracking/SavedCacheNotUpdatedReason::NestedTrackingexplaining that automatic file tracking is already active in a parent task and that configuringinputandoutputmanually still enables caching on the nested task.vpbinary (without the sentinel probe interceptor) spawns a newer innervp, the sentinel probe will not be intercepted and will fall back to the existing behavior.Stacked on #1029.
Note
Medium Risk
Changes cross-platform syscall interception, seccomp SIGSYS handling, and cache eligibility for nested runs; mistakes could break automatic tracking or incorrectly cache nested tasks.
Overview
When a cached outer task spawns another
vp run, the inner runner now detects an active outer file tracker and stops installing a second tracker, so nested work stays attributed to the parent and the outer task can still cache correctly.Detection uses a shared null-device sentinel path (
fspy_shared::probe). The outer preload short-circuits that probe on Linux (SyscallAction::Return), macOS (faccessat), and Windows (NtQueryAttributesFile) without logging it as a file access. Innerfspycaches the probe result, runs children untracked when nested, and surfacesUntrackedReason::Nestedinstead of treating the case as incomplete tracking.vtmaps that toNestedTracking, with a summary that tracking is already active in a parent and that manualinput/outputcan still cache the nested task.TrackingIncompleteis folded intoUntrackedReason::Incompletefor the remaining partial-trace cases.Reviewed by Cursor Bugbot for commit 807ae2d. Bugbot is set up for automated code reviews on this repo. Configure here.