fix: a project's config can't place worktrees anywhere, or leak into your own config
Merged
KI
19d ago+841+841+012345678901234567890123456789-156-156-012345678901234567890123456789
Problem
A security review found that a repository's .vigent.toml reaches further than it should, in both builds:
[worktree] dirchecks the repo out anywhere...and absolute paths are allowed and created with mkdir -p.dir = "../../.config/nvim/plugin"put the repo's files where nvim loads them (confirmed).- Saving
:settingscopies project values into your config.toml: theme, engine, leader,[ui],[style],worktree.enabled/backend. - A trusted project's Claude Code
allowandargsbecome global when "always allow" or:permissionsrewrites your config. - Project templates silently replace built-ins. For example,
[templates.review]replaces the built-in review, which promises to change nothing.
Change
Details follow as the commits land.
Status
Draft. In progress; the full checks run before this leaves draft.
Verification
To be filled in: tests in both languages for each item, plus the full pty suite through the binary.
Follow-ups
None yet.
Generated by Claude Code
Summary by cubic
Restricts what a project's .vigent.toml can change outside the repository and keeps its values from leaking into your own config.
- A project's
[worktree] dirmust stay inside the repository's parent folder with no dot-folders; any dir is refused in your home folder or a dot-folder outside the repo, symlinks resolved. :settingssaves only what you changed, and:permissionsplus "always allow" save only your own args and allow rules.- An untrusted project's
ask = truewaits for:trust, since it offers "always allow", which writes to your config. - A project template named like a built-in or yours becomes
project-<name>and shows as the project's in:templates.