This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
fix(init): align local file read policy - #1447
Merged
Merged
Conversation
Allow direct reads of repository metadata while sharing one safe-open policy with workflow prereads. Reject sensitive symlink targets so server-side format-aware redaction cannot be bypassed.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
The agent API now gives every role the same direct filesystem tools, including package-manager metadata such as
.npmrcand.yarnrc.yml. This aligns the local reader with that contract while keeping the sandbox and redaction boundary safe.Direct reads of sensitive metadata are allowed, but aliases to sensitive targets are rejected. The normal
read-filesoperation and startup prereads now share one safe-open primitive for containment, realpath, inode, regular-file, stability, and descriptor handling, so prereads cannot bypass the policy.This is the paired CLI change for getsentry/cli-init-api#244. The API should deploy first; the existing CLI remains compatible until this reaches users.
Test plan
origin/main(Europe/Madrid date assertions and Bash 3.2 completion simulation)sentry init: completed, installed and verified@sentry/nextjs, andbun run buildpassedSecurity coverage includes direct V1/V2 reads, same- and cross-format sensitive symlink aliases, parent-directory symlinks, prereads, FIFOs, oversized files, containment, inode stability, and repeated TOCTOU stress.