vibesafu 0.1.7 → 0.1.8

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -731,11 +731,23 @@ var CHECKPOINT_PATTERNS = [
731
731
  { pattern: /pip\s+install/i, type: "package_install", description: "pip install" },
732
732
  { pattern: /apt(-get)?\s+install/i, type: "package_install", description: "apt install" },
733
733
  { pattern: /brew\s+install/i, type: "package_install", description: "brew install" },
734
- // Git operations (only dangerous ones - safe git commands handled by instant-allow)
734
+ // Git operations - commands that can trigger hooks or affect remote/state
735
+ // SECURITY: git hooks (.git/hooks/) can execute arbitrary code
736
+ // Read-only commands (status, log, diff, show, blame) are handled by instant-allow
735
737
  { pattern: /git\s+push/i, type: "git_operation", description: "git push" },
738
+ { pattern: /git\s+commit/i, type: "git_operation", description: "git commit (triggers pre-commit, commit-msg hooks)" },
739
+ { pattern: /git\s+checkout/i, type: "git_operation", description: "git checkout (triggers post-checkout hook)" },
740
+ { pattern: /git\s+switch/i, type: "git_operation", description: "git switch (triggers post-checkout hook)" },
741
+ { pattern: /git\s+merge/i, type: "git_operation", description: "git merge (triggers pre-merge-commit, post-merge hooks)" },
742
+ { pattern: /git\s+rebase/i, type: "git_operation", description: "git rebase (triggers pre-rebase hook)" },
743
+ { pattern: /git\s+pull/i, type: "git_operation", description: "git pull (triggers post-merge hook)" },
744
+ { pattern: /git\s+fetch/i, type: "git_operation", description: "git fetch" },
736
745
  { pattern: /git\s+reset\s+--hard/i, type: "git_operation", description: "git reset --hard" },
737
746
  { pattern: /git\s+.*--force/i, type: "git_operation", description: "git force operation" },
738
747
  { pattern: /git\s+clean\s+-[a-z]*f/i, type: "git_operation", description: "git clean with force" },
748
+ { pattern: /git\s+stash/i, type: "git_operation", description: "git stash" },
749
+ { pattern: /git\s+cherry-pick/i, type: "git_operation", description: "git cherry-pick" },
750
+ { pattern: /git\s+add/i, type: "git_operation", description: "git add" },
739
751
  // Environment files
740
752
  { pattern: /\.env(?:\.local|\.production|\.development)?(?:\s|$|["'])/i, type: "env_modification", description: ".env file access" },
741
753
  // Sensitive files
@@ -770,20 +782,8 @@ var SAFE_GIT_COMMANDS = [
770
782
  "status",
771
783
  "log",
772
784
  "diff",
773
- "add",
774
- "commit",
775
- "branch",
776
- "checkout",
777
- "stash",
778
- "fetch",
779
- "pull",
780
- "merge",
781
- "rebase",
782
785
  "show",
783
786
  "blame",
784
- "remote",
785
- "tag",
786
- "cherry-pick",
787
787
  "reflog",
788
788
  "shortlog",
789
789
  "describe",
@@ -1833,6 +1833,7 @@ Only proceed if you know what you're doing.`
1833
1833
  checkpoint
1834
1834
  };
1835
1835
  }
1836
+ process.stderr.write("\x1B[90m[VibeSafu] Assessing security risks...\x1B[0m\n");
1836
1837
  const triage = await triageWithHaiku(anthropicClient, checkpoint);
1837
1838
  if (triage.classification === "BLOCK") {
1838
1839
  return {
@@ -1848,6 +1849,7 @@ Only proceed if you know what you're doing.`
1848
1849
  source: "haiku"
1849
1850
  };
1850
1851
  }
1852
+ process.stderr.write("\x1B[90m[VibeSafu] Escalating to deep analysis...\x1B[0m\n");
1851
1853
  const review = await reviewWithSonnet(anthropicClient, checkpoint, triage);
1852
1854
  if (review.verdict === "BLOCK") {
1853
1855
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibesafu",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Claude Code Security Guard - Permission request interceptor with LLM-powered security analysis",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",