Skip to content

fix(permission): follow dangling symlinks when judging sensitive paths - #1262

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-9632-secret-guard-follows-dangling-symlinks-to-sensitive-targets
Oct 2, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-9632-secret-guard-follows-dangling-symlinks-to-sensitive-targets

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Follows dangling symlink targets when the secret guard judges a path, so a write through link -> .env is denied like any other route to a secret file. write_file, edit_file and apply_patch share the check.
  • A dangling link to an ordinary file is not denied by the guard. The permission gate still treats it as restricted and asks the operator to approve or deny, and /yolo keeps auto-approving.

Verification

  • bun run check passes.
  • Unit tests deny a write through a dangling link to .env and leave a dangling link to an ordinary file to the gate.

Fixes CL-9632

@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

CL-9632

@TheGreatAxios
TheGreatAxios force-pushed the cl-9632-secret-guard-follows-dangling-symlinks-to-sensitive-targets branch from bdd9476 to 3db37e0 Compare September 30, 2026 18:05
@TheGreatAxios
TheGreatAxios removed this pull request from stack #1263 September 30, 2026 18:12
@TheGreatAxios
TheGreatAxios removed this pull request from stack #1266 September 30, 2026 20:26
@TheGreatAxios
TheGreatAxios removed this pull request from stack #1273 September 30, 2026 20:41
@TheGreatAxios
TheGreatAxios removed this pull request from stack #1277 September 30, 2026 20:56
@TheGreatAxios
TheGreatAxios removed this pull request from stack #1279 September 30, 2026 23:49
@TheGreatAxios
TheGreatAxios force-pushed the cl-9632-secret-guard-follows-dangling-symlinks-to-sensitive-targets branch from 3db37e0 to 0822e0e Compare September 30, 2026 23:49
@TheGreatAxios
TheGreatAxios force-pushed the cl-9632-secret-guard-follows-dangling-symlinks-to-sensitive-targets branch from 0822e0e to 5925533 Compare October 2, 2026 00:26
Base automatically changed from cl-9624-remove-the-unused-background-shell-collect-and-waiter-api to main October 2, 2026 16:33
A write through a dangling link to a secret file, such as link -> .env,
passed the secret guard because the resolver reported the path as
unresolvable. The guard now follows link targets by hand, so the path a
write would land on is judged like any other route to that file.
@TheGreatAxios
TheGreatAxios force-pushed the cl-9632-secret-guard-follows-dangling-symlinks-to-sensitive-targets branch from 5925533 to ff77f9d Compare October 2, 2026 16:43
@TheGreatAxios
TheGreatAxios merged commit 3f38a3f into main Oct 2, 2026
13 checks passed
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