Skip to content

Commit 85a04c6

Browse files
AI Assistantclaude
andcommitted
feat: Add PATH shadowing detection and automatic PATH configuration
- Detect when system binaries shadow managed installations (e.g. cmdtest/yarn) - Add comprehensive PATH validation for all package managers (rbenv, nvm, pyenv, cargo, uv, go) - Implement automatic PATH fixing via 'make fix-path' - Integrate PATH checks into audit workflow with clear warnings - Add shadowing fields to tool payload for observability - Create scripts/lib/path_check.sh library for PATH management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 588aeed commit 85a04c6

File tree

16 files changed

+1861
-90
lines changed

16 files changed

+1861
-90
lines changed

Makefile.d/user.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,9 @@ auto-update-project: scripts-perms ## Update project dependencies (with confirma
126126

127127
auto-update-all: scripts-perms ## Update system + user scopes (skip project)
128128
SCOPE=all ./scripts/auto_update.sh update
129+
130+
check-path: scripts-perms ## Check PATH configuration for package managers
131+
@bash -c "source scripts/lib/path_check.sh && check_all_paths"
132+
133+
fix-path: scripts-perms ## Fix PATH configuration issues automatically
134+
@bash -c "source scripts/lib/path_check.sh && fix_all_paths"

catalog/bat.json

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bat",
3-
"install_method": "github_release_binary",
3+
"install_method": "auto",
44
"description": "A cat clone with syntax highlighting and Git integration",
55
"homepage": "https://github.com/sharkdp/bat",
66
"github_repo": "sharkdp/bat",
@@ -10,6 +10,31 @@
1010
"x86_64": "x86_64",
1111
"aarch64": "aarch64",
1212
"armv7l": "armv7"
13-
}
14-
,"tags": ["core"]
13+
},
14+
"available_methods": [
15+
{
16+
"method": "github_release_binary",
17+
"priority": 1,
18+
"config": {
19+
"repo": "sharkdp/bat",
20+
"asset_pattern": "bat-.*-x86_64-unknown-linux-musl.tar.gz"
21+
}
22+
},
23+
{
24+
"method": "cargo",
25+
"priority": 2,
26+
"config": {
27+
"crate": "bat"
28+
}
29+
},
30+
{
31+
"method": "apt",
32+
"priority": 3,
33+
"config": {
34+
"package": "bat"
35+
}
36+
}
37+
],
38+
"requires": [],
39+
"tags": ["core"]
1540
}

catalog/fd.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fd",
3-
"install_method": "github_release_binary",
3+
"install_method": "auto",
44
"description": "A simple, fast and user-friendly alternative to find",
55
"homepage": "https://github.com/sharkdp/fd",
66
"github_repo": "sharkdp/fd",
@@ -11,5 +11,30 @@
1111
"aarch64": "aarch64",
1212
"armv7l": "armv7"
1313
},
14+
"available_methods": [
15+
{
16+
"method": "github_release_binary",
17+
"priority": 1,
18+
"config": {
19+
"repo": "sharkdp/fd",
20+
"asset_pattern": "fd-.*-x86_64-unknown-linux-musl.tar.gz"
21+
}
22+
},
23+
{
24+
"method": "cargo",
25+
"priority": 2,
26+
"config": {
27+
"crate": "fd-find"
28+
}
29+
},
30+
{
31+
"method": "apt",
32+
"priority": 3,
33+
"config": {
34+
"package": "fd-find"
35+
}
36+
}
37+
],
38+
"requires": [],
1439
"tags": ["core", "search", "file-utils"]
1540
}

catalog/ripgrep.json

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ripgrep",
3-
"install_method": "github_release_binary",
3+
"install_method": "auto",
44
"description": "A line-oriented search tool that recursively searches directories for a regex pattern",
55
"homepage": "https://github.com/BurntSushi/ripgrep",
66
"github_repo": "BurntSushi/ripgrep",
@@ -10,6 +10,31 @@
1010
"x86_64": "x86_64",
1111
"aarch64": "aarch64",
1212
"armv7l": "arm-unknown-linux-gnueabihf"
13-
}
14-
,"tags": ["core"]
13+
},
14+
"available_methods": [
15+
{
16+
"method": "github_release_binary",
17+
"priority": 1,
18+
"config": {
19+
"repo": "BurntSushi/ripgrep",
20+
"asset_pattern": "ripgrep-.*-x86_64-unknown-linux-musl.tar.gz"
21+
}
22+
},
23+
{
24+
"method": "cargo",
25+
"priority": 2,
26+
"config": {
27+
"crate": "ripgrep"
28+
}
29+
},
30+
{
31+
"method": "apt",
32+
"priority": 3,
33+
"config": {
34+
"package": "ripgrep"
35+
}
36+
}
37+
],
38+
"requires": [],
39+
"tags": ["core"]
1540
}

0 commit comments

Comments
 (0)