-
-
Notifications
You must be signed in to change notification settings - Fork 794
fix: security hook cwd extraction and PATH issues (#555, #556) #587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e2ea3f0
e15c2c1
2ce1107
cde1d3c
aff04fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -64,15 +64,18 @@ const COMMON_BIN_PATHS: Record<string, string[]> = { | |||||||||||||||||||||||||||||||||||||
| darwin: [ | ||||||||||||||||||||||||||||||||||||||
| '/opt/homebrew/bin', // Apple Silicon Homebrew | ||||||||||||||||||||||||||||||||||||||
| '/usr/local/bin', // Intel Homebrew / system | ||||||||||||||||||||||||||||||||||||||
| '/usr/local/share/dotnet', // .NET SDK | ||||||||||||||||||||||||||||||||||||||
| '/opt/homebrew/sbin', // Apple Silicon Homebrew sbin | ||||||||||||||||||||||||||||||||||||||
| '/usr/local/sbin', // Intel Homebrew sbin | ||||||||||||||||||||||||||||||||||||||
| '~/.local/bin', // User-local binaries (Claude CLI) | ||||||||||||||||||||||||||||||||||||||
| '~/.dotnet/tools', // .NET global tools | ||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
64
to
72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current order of paths gives system-wide directories (like It's standard practice to prepend user-specific binary paths to the
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| linux: [ | ||||||||||||||||||||||||||||||||||||||
| '/usr/local/bin', | ||||||||||||||||||||||||||||||||||||||
| '/usr/bin', // System binaries (Python, etc.) | ||||||||||||||||||||||||||||||||||||||
| '/snap/bin', // Snap packages | ||||||||||||||||||||||||||||||||||||||
| '~/.local/bin', // User-local binaries | ||||||||||||||||||||||||||||||||||||||
| '~/.dotnet/tools', // .NET global tools | ||||||||||||||||||||||||||||||||||||||
| '/usr/sbin', // System admin binaries | ||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||
| win32: [ | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Consider adding .NET paths for Linux.
The .NET SDK and global tools paths are correctly added for macOS. However, .NET is also commonly used on Linux, where it's typically installed at:
/usr/share/dotnet(SDK)~/.dotnet/tools(global tools)🔎 Proposed change to add Linux .NET support
linux: [ '/usr/local/bin', '/usr/bin', // System binaries (Python, etc.) + '/usr/share/dotnet', // .NET SDK '/snap/bin', // Snap packages '~/.local/bin', // User-local binaries + '~/.dotnet/tools', // .NET global tools '/usr/sbin', // System admin binaries ],Also applies to: 71-71
🤖 Prompt for AI Agents