@qazuor/claude-code-config 0.6.2 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +44 -38
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +44 -38
- package/dist/bin.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -5500,12 +5500,13 @@ var DEFAULT_DENY_RULES = [
|
|
|
5500
5500
|
"Write(/sbin/**)",
|
|
5501
5501
|
"Write(/var/**)",
|
|
5502
5502
|
"Write(/tmp/**)",
|
|
5503
|
-
// Dangerous commands
|
|
5503
|
+
// Dangerous commands - use exact matches or :* prefix
|
|
5504
5504
|
"Bash(rm -rf /)",
|
|
5505
|
-
"Bash(sudo
|
|
5506
|
-
"Bash(chmod 777
|
|
5507
|
-
"
|
|
5508
|
-
"Bash(
|
|
5505
|
+
"Bash(sudo:*)",
|
|
5506
|
+
"Bash(chmod 777:*)",
|
|
5507
|
+
// Note: Can't deny "curl * | bash" pattern - use specific denies instead
|
|
5508
|
+
"Bash(curl:*)",
|
|
5509
|
+
"Bash(wget:*)",
|
|
5509
5510
|
// Sensitive files
|
|
5510
5511
|
"Write(.env)",
|
|
5511
5512
|
"Write(.env.*)",
|
|
@@ -5571,64 +5572,69 @@ function generateAllowRules(config) {
|
|
|
5571
5572
|
}
|
|
5572
5573
|
if (config.git.readOnly) {
|
|
5573
5574
|
rules.push(
|
|
5574
|
-
"Bash(git status
|
|
5575
|
-
"Bash(git diff
|
|
5576
|
-
"Bash(git log
|
|
5577
|
-
"Bash(git show
|
|
5578
|
-
"Bash(git branch
|
|
5575
|
+
"Bash(git status:*)",
|
|
5576
|
+
"Bash(git diff:*)",
|
|
5577
|
+
"Bash(git log:*)",
|
|
5578
|
+
"Bash(git show:*)",
|
|
5579
|
+
"Bash(git branch:*)"
|
|
5579
5580
|
);
|
|
5580
5581
|
}
|
|
5581
5582
|
if (config.git.staging) {
|
|
5582
|
-
rules.push("Bash(git add
|
|
5583
|
+
rules.push("Bash(git add:*)");
|
|
5583
5584
|
}
|
|
5584
5585
|
if (config.git.commit) {
|
|
5585
|
-
rules.push("Bash(git commit
|
|
5586
|
+
rules.push("Bash(git commit:*)");
|
|
5586
5587
|
}
|
|
5587
5588
|
if (config.git.push) {
|
|
5588
|
-
rules.push("Bash(git push
|
|
5589
|
+
rules.push("Bash(git push:*)");
|
|
5589
5590
|
}
|
|
5590
5591
|
if (config.git.branching) {
|
|
5591
|
-
rules.push(
|
|
5592
|
+
rules.push(
|
|
5593
|
+
"Bash(git checkout:*)",
|
|
5594
|
+
"Bash(git branch:*)",
|
|
5595
|
+
"Bash(git merge:*)",
|
|
5596
|
+
"Bash(git rebase:*)"
|
|
5597
|
+
);
|
|
5592
5598
|
}
|
|
5593
5599
|
if (config.bash.packageManager) {
|
|
5594
5600
|
rules.push(
|
|
5595
|
-
"Bash(pnpm
|
|
5596
|
-
"Bash(npm
|
|
5597
|
-
"Bash(yarn
|
|
5598
|
-
"Bash(bun
|
|
5599
|
-
"Bash(npx
|
|
5600
|
-
"Bash(bunx
|
|
5601
|
+
"Bash(pnpm:*)",
|
|
5602
|
+
"Bash(npm:*)",
|
|
5603
|
+
"Bash(yarn:*)",
|
|
5604
|
+
"Bash(bun:*)",
|
|
5605
|
+
"Bash(npx:*)",
|
|
5606
|
+
"Bash(bunx:*)"
|
|
5601
5607
|
);
|
|
5602
5608
|
}
|
|
5603
5609
|
if (config.bash.testing) {
|
|
5604
5610
|
rules.push(
|
|
5605
|
-
"Bash(vitest
|
|
5606
|
-
"Bash(jest
|
|
5607
|
-
"Bash(playwright
|
|
5608
|
-
"Bash(cypress
|
|
5609
|
-
"Bash(pnpm test
|
|
5610
|
-
"Bash(npm test
|
|
5611
|
-
"Bash(pnpm run test
|
|
5612
|
-
"Bash(npm run test
|
|
5611
|
+
"Bash(vitest:*)",
|
|
5612
|
+
"Bash(jest:*)",
|
|
5613
|
+
"Bash(playwright:*)",
|
|
5614
|
+
"Bash(cypress:*)",
|
|
5615
|
+
"Bash(pnpm test:*)",
|
|
5616
|
+
"Bash(npm test:*)",
|
|
5617
|
+
"Bash(pnpm run test:*)",
|
|
5618
|
+
"Bash(npm run test:*)"
|
|
5613
5619
|
);
|
|
5614
5620
|
}
|
|
5615
5621
|
if (config.bash.building) {
|
|
5616
5622
|
rules.push(
|
|
5617
|
-
"Bash(pnpm build
|
|
5618
|
-
"Bash(npm run build
|
|
5619
|
-
"Bash(pnpm run build
|
|
5620
|
-
"Bash(tsc
|
|
5621
|
-
"Bash(tsup
|
|
5622
|
-
"Bash(vite build
|
|
5623
|
-
"Bash(next build
|
|
5624
|
-
"Bash(astro build
|
|
5623
|
+
"Bash(pnpm build:*)",
|
|
5624
|
+
"Bash(npm run build:*)",
|
|
5625
|
+
"Bash(pnpm run build:*)",
|
|
5626
|
+
"Bash(tsc:*)",
|
|
5627
|
+
"Bash(tsup:*)",
|
|
5628
|
+
"Bash(vite build:*)",
|
|
5629
|
+
"Bash(next build:*)",
|
|
5630
|
+
"Bash(astro build:*)"
|
|
5625
5631
|
);
|
|
5626
5632
|
}
|
|
5627
5633
|
if (config.bash.docker) {
|
|
5628
|
-
rules.push("Bash(docker
|
|
5634
|
+
rules.push("Bash(docker:*)", "Bash(docker-compose:*)");
|
|
5629
5635
|
}
|
|
5630
5636
|
if (config.bash.arbitrary) {
|
|
5631
|
-
rules.push("Bash
|
|
5637
|
+
rules.push("Bash");
|
|
5632
5638
|
}
|
|
5633
5639
|
if (config.web.fetch) {
|
|
5634
5640
|
rules.push("WebFetch");
|