Reject symbolic-link draft input files - #132
Merged
Merged
Conversation
Owner
Author
|
Supplemental Codex/Luna review at ffdbb26 found no high-confidence actionable defect. Reviewed lstat/open/fstat identity checks, nonblocking FIFO handling, symlink rejection, and regular-file happy path; local operator/full-suite and lint checks passed. Existing eight CI jobs passed. This remains supplemental same-family review; independent Claude/OpenCode review is pending. |
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.
Closes the regular-file contract gap in the shared bounded input reader.
Draft create and draft plan/apply now reject a symbolic-link input before opening it. The reader also compares the opened file’s device and inode with the entry inspected first, so a replacement during the check/open window cannot redirect the command to a different file.
The new CLI negative control verifies a linked Markdown file returns
invalid_input_filebefore credential resolution or any network request. This does not change draft-only or immediate-Note semantics.Validation:
git diff --checknpm run lintnpm test— 1,003 tests passednpm run buildnpm run check:releasenpm run test:release— 52 controls passed