Skip to content

Reject unsafe package symlinks and lock paths - #29645

Closed
mohammadfawaz wants to merge 3 commits into
masterfrom
codex/fix-veria-38-package-symlinks
Closed

mohammadfawaz wants to merge 3 commits into
masterfrom
codex/fix-veria-38-package-symlinks

Conversation

@mohammadfawaz

@mohammadfawaz mohammadfawaz commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Superseded by #29639. The implementation and regression coverage are included in that combined PR. Review the changes there.

Package loading could follow committed symlinks while reading source files or updating leo.lock. A malformed locked commit could also select a path outside the Git checkout cache.

Reject unsafe source entries, source and test directories, manifest files, lock files, and Git checkout links before using them. Check locked commit strings before constructing paths. Replace lock files through a new temporary file and rename, while retaining the existing file permissions. Source discovery and compiler/LSP directory walks use the same link policy.

Explicit local package paths and in-memory sources remain supported. These checks address committed filesystem entries; they do not provide race-free reads against a process that can change the filesystem concurrently.

Addresses VERIA-38.

Original finding: https://veria.dev/dashboard/findings/n5AWPUXjfpayqyKgkdW7Y

@mohammadfawaz mohammadfawaz added 🐛 bug Something isn't working 🧱 Core Compiler Anything related to the core compiler including parsing, analysis, transforms, codegen, etc. 🖥️ CLI Anything related to the Leo CLI. labels Sep 28, 2026
@mohammadfawaz mohammadfawaz self-assigned this Sep 28, 2026
@mohammadfawaz mohammadfawaz added the 🔌 LSP Anything related to Leo LSP label Sep 28, 2026
@mohammadfawaz
mohammadfawaz force-pushed the codex/fix-veria-38-package-symlinks branch from 4dabea9 to 97bd304 Compare September 28, 2026 15:21
@mohammadfawaz
mohammadfawaz changed the base branch from codex/pin-network-bytecode to master September 28, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working 🖥️ CLI Anything related to the Leo CLI. 🧱 Core Compiler Anything related to the core compiler including parsing, analysis, transforms, codegen, etc. 🔌 LSP Anything related to Leo LSP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant