Skip to content

fix: nightly hardening - symlink-safe skill config handling - #14

Open
mouse-value-add wants to merge 1 commit into
mainfrom
chore/nightly-hardening-20260424-config-symlink-guard
Open

fix: nightly hardening - symlink-safe skill config handling#14
mouse-value-add wants to merge 1 commit into
mainfrom
chore/nightly-hardening-20260424-config-symlink-guard

Conversation

@mouse-value-add

Copy link
Copy Markdown
Collaborator

problem

you-md skill install and related config operations accepted symlinked config paths. If a tool config path is replaced with a symlink, reads/backups/writes may follow that link and touch unintended files.

approach

  • Added a path safety guard for skill config file operations.
  • readJsonConfig and writeJsonConfig now reject symlink targets and non-regular files via lstat.
  • Added regression tests for both read and write flows to ensure symlinked paths are rejected.

verification

  • npm test -- test/cli/skill.test.ts
  • npm test

risks

  • Users who intentionally symlink tool config files to shared locations will now get an error instead of silent writes.

rollback plan

Revert commit fb91f03 to restore prior behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant