claude-warden 1.3.1 → 1.4.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-warden",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Smart command safety filter for Claude Code — parses shell pipelines and evaluates per-command safety rules to auto-approve safe commands and block dangerous ones",
5
5
  "author": {
6
6
  "name": "banyudu"
package/dist/index.cjs CHANGED
@@ -19092,6 +19092,7 @@ var DEFAULT_CONFIG = {
19092
19092
  "ifconfig",
19093
19093
  "ip",
19094
19094
  "nmap",
19095
+ "arp",
19095
19096
  // Pagers and formatters
19096
19097
  "bat",
19097
19098
  "pygmentize",
@@ -19106,6 +19107,74 @@ var DEFAULT_CONFIG = {
19106
19107
  "tput",
19107
19108
  "reset",
19108
19109
  "clear",
19110
+ // System/hardware info
19111
+ "lscpu",
19112
+ "lsblk",
19113
+ "lsusb",
19114
+ "lspci",
19115
+ "lsmod",
19116
+ "dmesg",
19117
+ "sysctl",
19118
+ "sw_vers",
19119
+ "system_profiler",
19120
+ "hostinfo",
19121
+ "lsb_release",
19122
+ "hostnamectl",
19123
+ "arch",
19124
+ "getconf",
19125
+ // User/group info
19126
+ "groups",
19127
+ "getent",
19128
+ "w",
19129
+ "last",
19130
+ "lastlog",
19131
+ "finger",
19132
+ "users",
19133
+ // Process info
19134
+ "pgrep",
19135
+ "pidof",
19136
+ "jobs",
19137
+ // Compression/archive
19138
+ "tar",
19139
+ "gzip",
19140
+ "gunzip",
19141
+ "bzip2",
19142
+ "bunzip2",
19143
+ "xz",
19144
+ "unxz",
19145
+ "zip",
19146
+ "unzip",
19147
+ "7z",
19148
+ "zcat",
19149
+ "bzcat",
19150
+ "xzcat",
19151
+ "zless",
19152
+ "zmore",
19153
+ "zgrep",
19154
+ // Clipboard
19155
+ "pbcopy",
19156
+ "pbpaste",
19157
+ "xclip",
19158
+ "xsel",
19159
+ "wl-copy",
19160
+ "wl-paste",
19161
+ // Binary analysis
19162
+ "strings",
19163
+ "nm",
19164
+ "objdump",
19165
+ "readelf",
19166
+ "ldd",
19167
+ "otool",
19168
+ "size",
19169
+ // macOS utilities (read-only)
19170
+ "mdfind",
19171
+ "mdls",
19172
+ "mdutil",
19173
+ "plutil",
19174
+ "sips",
19175
+ "xcode-select",
19176
+ "xcrun",
19177
+ "xcodebuild",
19109
19178
  // Misc safe
19110
19179
  "cd",
19111
19180
  "pushd",
@@ -19123,7 +19192,18 @@ var DEFAULT_CONFIG = {
19123
19192
  "shasum",
19124
19193
  "cksum",
19125
19194
  "base64",
19126
- "openssl"
19195
+ "openssl",
19196
+ "watch",
19197
+ "timeout",
19198
+ "nohup",
19199
+ "nice",
19200
+ "iconv",
19201
+ "locale",
19202
+ "localedef",
19203
+ "numfmt",
19204
+ "factor",
19205
+ "bc",
19206
+ "dc"
19127
19207
  ],
19128
19208
  alwaysDeny: [
19129
19209
  "sudo",
@@ -19147,7 +19227,9 @@ var DEFAULT_CONFIG = {
19147
19227
  "crontab",
19148
19228
  "systemctl",
19149
19229
  "service",
19150
- "launchctl"
19230
+ "launchctl",
19231
+ "wipefs",
19232
+ "shred"
19151
19233
  ],
19152
19234
  rules: [
19153
19235
  // --- CLI tools ---
@@ -19262,7 +19344,15 @@ var DEFAULT_CONFIG = {
19262
19344
  ]
19263
19345
  },
19264
19346
  { command: "docker-compose", default: "ask" },
19265
- { command: "kubectl", default: "ask" },
19347
+ {
19348
+ command: "kubectl",
19349
+ default: "ask",
19350
+ argPatterns: [
19351
+ { match: { anyArgMatches: ["^(get|describe|logs|top|explain|api-resources|api-versions|version|config|cluster-info)$"] }, decision: "allow", description: "Read-only kubectl commands" },
19352
+ { match: { anyArgMatches: ["^(delete|drain|cordon|taint)$"] }, decision: "ask", reason: "Destructive kubectl operation" },
19353
+ VERSION_HELP_FLAGS
19354
+ ]
19355
+ },
19266
19356
  // --- File operations ---
19267
19357
  {
19268
19358
  command: "rm",
@@ -19302,7 +19392,92 @@ var DEFAULT_CONFIG = {
19302
19392
  // --- Terraform / IaC ---
19303
19393
  { command: "terraform", default: "ask", argPatterns: [
19304
19394
  { match: { anyArgMatches: ["^(plan|validate|fmt|show|state|output|providers|version|graph|console)$"] }, decision: "allow", description: "Read-only terraform commands" }
19305
- ] }
19395
+ ] },
19396
+ // --- macOS open ---
19397
+ { command: "open", default: "ask" },
19398
+ // --- Text editors ---
19399
+ ...["vi", "vim", "nvim", "nano", "emacs"].map((cmd) => ({
19400
+ command: cmd,
19401
+ default: "ask",
19402
+ argPatterns: [VERSION_HELP_FLAGS]
19403
+ })),
19404
+ // --- Scripting languages ---
19405
+ ...["ruby", "perl", "php"].map((cmd) => ({
19406
+ command: cmd,
19407
+ default: "ask",
19408
+ argPatterns: [
19409
+ { match: { anyArgMatches: ["^-e$", "^--eval"] }, decision: "ask", reason: "Inline code execution" },
19410
+ VERSION_HELP_FLAGS
19411
+ ]
19412
+ })),
19413
+ // --- Java ecosystem ---
19414
+ { command: "java", default: "ask", argPatterns: [VERSION_HELP_FLAGS] },
19415
+ { command: "javac", default: "allow" },
19416
+ // --- Swift / Zig / Dotnet ---
19417
+ { command: "swift", default: "allow", argPatterns: [
19418
+ { match: { anyArgMatches: ["^(build|test|run|package)$"] }, decision: "allow" }
19419
+ ] },
19420
+ { command: "swiftc", default: "allow" },
19421
+ { command: "zig", default: "allow" },
19422
+ { command: "dotnet", default: "allow", argPatterns: [
19423
+ { match: { anyArgMatches: ["^(publish|nuget)$"] }, decision: "ask", reason: "Publishing" }
19424
+ ] },
19425
+ // --- Database CLIs ---
19426
+ ...["psql", "mysql", "mariadb", "sqlite3", "redis-cli", "mongosh"].map((cmd) => ({
19427
+ command: cmd,
19428
+ default: "ask",
19429
+ argPatterns: [VERSION_HELP_FLAGS]
19430
+ })),
19431
+ // --- Cloud CLIs ---
19432
+ { command: "gcloud", default: "ask", argPatterns: [
19433
+ { match: { anyArgMatches: ["^(info|version|help|config|components)$"] }, decision: "allow", description: "Config/info" },
19434
+ { match: { anyArgMatches: ["^(list|describe|get-iam-policy|get)$"] }, decision: "allow", description: "Read-only ops" },
19435
+ VERSION_HELP_FLAGS
19436
+ ] },
19437
+ { command: "az", default: "ask", argPatterns: [
19438
+ { match: { anyArgMatches: ["^(list|show|get)$"] }, decision: "allow", description: "Read-only ops" },
19439
+ VERSION_HELP_FLAGS
19440
+ ] },
19441
+ { command: "aws", default: "ask", argPatterns: [
19442
+ { match: { anyArgMatches: ["^(describe|list|get|sts)$"] }, decision: "allow", description: "Read-only ops" },
19443
+ VERSION_HELP_FLAGS
19444
+ ] },
19445
+ // --- Helm ---
19446
+ { command: "helm", default: "ask", argPatterns: [
19447
+ { match: { anyArgMatches: ["^(list|search|show|status|get|template|version|env|history)$"] }, decision: "allow", description: "Read-only helm commands" },
19448
+ VERSION_HELP_FLAGS
19449
+ ] },
19450
+ // --- Screen/tmux ---
19451
+ ...["screen", "tmux"].map((cmd) => ({
19452
+ command: cmd,
19453
+ default: "ask",
19454
+ argPatterns: [
19455
+ { match: { anyArgMatches: ["^(list-sessions|ls|list)$"] }, decision: "allow", description: "List sessions" },
19456
+ VERSION_HELP_FLAGS
19457
+ ]
19458
+ })),
19459
+ // --- GPG ---
19460
+ { command: "gpg", default: "ask", argPatterns: [
19461
+ { match: { anyArgMatches: ["^(--verify|--list-keys|--list-secret-keys|--fingerprint)$"] }, decision: "allow", description: "Read-only gpg" },
19462
+ VERSION_HELP_FLAGS
19463
+ ] },
19464
+ // --- macOS-specific ---
19465
+ { command: "defaults", default: "ask", argPatterns: [
19466
+ { match: { anyArgMatches: ["^(read|read-type|find|domains)$"] }, decision: "allow", description: "Read-only defaults operations" }
19467
+ ] },
19468
+ { command: "diskutil", default: "ask", argPatterns: [
19469
+ { match: { anyArgMatches: ["^(list|info|apfs|cs|appleRAID)$"] }, decision: "allow", description: "Read-only diskutil" }
19470
+ ] },
19471
+ { command: "codesign", default: "ask", argPatterns: [
19472
+ { match: { anyArgMatches: ["^(-vv|--verify|--display|-d)$"] }, decision: "allow", description: "Verify codesign" }
19473
+ ] },
19474
+ { command: "osascript", default: "ask" },
19475
+ { command: "say", default: "ask" },
19476
+ // --- Process management ---
19477
+ { command: "kill", default: "ask" },
19478
+ { command: "killall", default: "ask" },
19479
+ { command: "pkill", default: "ask" },
19480
+ { command: "renice", default: "ask" }
19306
19481
  ]
19307
19482
  }]
19308
19483
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-warden",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Smart command safety filter for Claude Code — auto-approves safe commands, blocks dangerous ones",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",