Skip to content

fix(cli): scope project config file references - #11883

Closed
markijbema wants to merge 2 commits into
mainfrom
mark/scope-config-file-refs
Closed

fix(cli): scope project config file references#11883
markijbema wants to merge 2 commits into
mainfrom
mark/scope-config-file-refs

Conversation

@markijbema

Copy link
Copy Markdown
Contributor

What

  • Scope project config {file:...} substitutions to the project/worktree root.
  • Keep trusted global, managed, remote, KILO_CONFIG, and KILO_CONFIG_CONTENT file references working as before.
  • Add regressions for absolute path reads, parent-directory escapes, symlink escapes, and global config allowance.

Why

Repository-controlled config should not be able to read arbitrary local files such as /etc/passwd or credential files by embedding {file:...} into provider options.

markijbema pushed a commit that referenced this pull request Jul 2, 2026
…env:} block

Adopt the file-scoping approach from #11883: untrusted project config may still read {file:...} as long as the target stays inside the project root (absolute paths, ../ traversal, and symlink escapes are rejected via realpath). Keep {env:} fully blocked in project config (no safe scoped form). Make the /proc/self/fd guard cross-platform. Thread fileScope through config.ts, agent.ts, tui.ts, and overlay.ts. Update docs and changeset.
@markijbema markijbema closed this Jul 2, 2026
NJ-2020 pushed a commit to NJ-2020/kilocode that referenced this pull request Jul 4, 2026
kirillk pushed a commit that referenced this pull request Jul 7, 2026
…env:} block

Adopt the file-scoping approach from #11883: untrusted project config may still read {file:...} as long as the target stays inside the project root (absolute paths, ../ traversal, and symlink escapes are rejected via realpath). Keep {env:} fully blocked in project config (no safe scoped form). Make the /proc/self/fd guard cross-platform. Thread fileScope through config.ts, agent.ts, tui.ts, and overlay.ts. Update docs and changeset.
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…env:} block

Adopt the file-scoping approach from Kilo-Org#11883: untrusted project config may still read {file:...} as long as the target stays inside the project root (absolute paths, ../ traversal, and symlink escapes are rejected via realpath). Keep {env:} fully blocked in project config (no safe scoped form). Make the /proc/self/fd guard cross-platform. Thread fileScope through config.ts, agent.ts, tui.ts, and overlay.ts. Update docs and changeset.
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