Skip to content

[SSR Agent] Issue Fix (295): Trust Nix store paths in system path checks - #298

Open
joneba-google wants to merge 1 commit into
mainfrom
ssr-agent-295
Open

joneba-google wants to merge 1 commit into
mainfrom
ssr-agent-295

Conversation

@joneba-google

Copy link
Copy Markdown
Collaborator

fixes #295
Original Issue: #295

Context & Problem

In Nix and devenv environments, standard tools like Ripgrep are typically located inside the /nix/store directory. When executing Gemini CLI in such environments, the file path check implementation isTrustedSystemPath() rejected the path to the Ripgrep executable as untrusted, leading to a fallback to a basic grep utility that hangs indefinitely on large codebases.

Detailed Changes

  • packages/core/src/utils/paths.ts: Added /nix/store to the POSIX trustedPrefixes array so that system executables residing under the Nix store are correctly recognized and allowed.
  • packages/core/src/utils/paths.test.ts: Included a comprehensive unit test verifying that helper function isTrustedSystemPath() correctly resolves Nix store subdirectories (e.g., /nix/store/abc123def456-ripgrep-14.1.0/bin/rg) to true.

Verification

  • Executed Vitest unit tests in packages/core/src/utils/paths.test.ts to confirm the newly added test case passes successfully.

@github-actions github-actions Bot added the size/XS XS: <10 lines changed label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

📊 PR Size: size/XS

  • Lines changed: 7
  • Additions: +7
  • Deletions: -0
  • Files changed: 2

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

Labels

size/XS XS: <10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Gemini CLI hangs and stops responding during execution

1 participant