bash-classify 0.12.0__tar.gz → 0.13.1__tar.gz

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 (374) hide show
  1. {bash_classify-0.12.0 → bash_classify-0.13.1}/.claude-plugin/marketplace.json +1 -1
  2. {bash_classify-0.12.0 → bash_classify-0.13.1}/.gitignore +3 -0
  3. {bash_classify-0.12.0 → bash_classify-0.13.1}/PKG-INFO +13 -3
  4. {bash_classify-0.12.0 → bash_classify-0.13.1}/README.md +12 -2
  5. {bash_classify-0.12.0 → bash_classify-0.13.1}/SPEC.md +84 -18
  6. {bash_classify-0.12.0 → bash_classify-0.13.1}/coding-agent-plugins/claude-code/.claude-plugin/plugin.json +1 -1
  7. {bash_classify-0.12.0 → bash_classify-0.13.1}/docs/classification-guidance.md +13 -2
  8. {bash_classify-0.12.0 → bash_classify-0.13.1}/schemas/command.schema.json +5 -1
  9. bash_classify-0.13.1/src/bash_classify/__init__.py +60 -0
  10. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/classifier.py +158 -10
  11. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/cli.py +7 -0
  12. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/cp.yaml +3 -0
  13. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/curl.yaml +2 -2
  14. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/git.yaml +2 -0
  15. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/mv.yaml +3 -0
  16. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/sort.yaml +2 -2
  17. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/unzip.yaml +1 -0
  18. bash_classify-0.13.1/src/bash_classify/commands/wget.yaml +12 -0
  19. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/database.py +1 -0
  20. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/matcher.py +59 -9
  21. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/models.py +57 -7
  22. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/sensitive.py +31 -1
  23. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_classifier.py +450 -0
  24. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_cli.py +119 -0
  25. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_cli_serialization.py +51 -0
  26. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_database.py +48 -0
  27. bash_classify-0.13.1/tests/test_output_paths.py +218 -0
  28. bash_classify-0.13.1/tests/test_public_api.py +77 -0
  29. bash_classify-0.12.0/src/bash_classify/__init__.py +0 -28
  30. bash_classify-0.12.0/src/bash_classify/commands/wget.yaml +0 -7
  31. {bash_classify-0.12.0 → bash_classify-0.13.1}/.claude/rules/command-database.md +0 -0
  32. {bash_classify-0.12.0 → bash_classify-0.13.1}/.editorconfig +0 -0
  33. {bash_classify-0.12.0 → bash_classify-0.13.1}/.github/workflows/ci.yml +0 -0
  34. {bash_classify-0.12.0 → bash_classify-0.13.1}/.github/workflows/publish.yml +0 -0
  35. {bash_classify-0.12.0 → bash_classify-0.13.1}/.python-version +0 -0
  36. {bash_classify-0.12.0 → bash_classify-0.13.1}/CLAUDE.md +0 -0
  37. {bash_classify-0.12.0 → bash_classify-0.13.1}/LICENSE +0 -0
  38. {bash_classify-0.12.0 → bash_classify-0.13.1}/coding-agent-plugins/claude-code/hooks/hook-permission-request.sh +0 -0
  39. {bash_classify-0.12.0 → bash_classify-0.13.1}/coding-agent-plugins/claude-code/hooks/hook-pre-tool-use.sh +0 -0
  40. {bash_classify-0.12.0 → bash_classify-0.13.1}/coding-agent-plugins/claude-code/hooks/hooks.json +0 -0
  41. {bash_classify-0.12.0 → bash_classify-0.13.1}/pyproject.toml +0 -0
  42. {bash_classify-0.12.0 → bash_classify-0.13.1}/ruff.toml +0 -0
  43. {bash_classify-0.12.0 → bash_classify-0.13.1}/schemas/match-rules.schema.json +0 -0
  44. {bash_classify-0.12.0 → bash_classify-0.13.1}/schemas/sensitive-paths.schema.json +0 -0
  45. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/__main__.py +0 -0
  46. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/agent-browser.yaml +0 -0
  47. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/apt.yaml +0 -0
  48. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/awk.yaml +0 -0
  49. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/basename.yaml +0 -0
  50. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/bash-classify.yaml +0 -0
  51. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/bash.yaml +0 -0
  52. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/black.yaml +0 -0
  53. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/brew.yaml +0 -0
  54. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/builtin.yaml +0 -0
  55. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/cargo.yaml +0 -0
  56. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/cat.yaml +0 -0
  57. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/chgrp.yaml +0 -0
  58. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/chmod.yaml +0 -0
  59. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/chown.yaml +0 -0
  60. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/column.yaml +0 -0
  61. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/comm.yaml +0 -0
  62. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/command.yaml +0 -0
  63. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/cut.yaml +0 -0
  64. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/date.yaml +0 -0
  65. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/df.yaml +0 -0
  66. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/diff.yaml +0 -0
  67. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/dig.yaml +0 -0
  68. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/dirname.yaml +0 -0
  69. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/docker.yaml +0 -0
  70. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/du.yaml +0 -0
  71. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/echo.yaml +0 -0
  72. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/env.yaml +0 -0
  73. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/eslint.yaml +0 -0
  74. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/eval.yaml +0 -0
  75. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/exec.yaml +0 -0
  76. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/expand.yaml +0 -0
  77. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/false.yaml +0 -0
  78. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/file.yaml +0 -0
  79. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/find.yaml +0 -0
  80. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/fmt.yaml +0 -0
  81. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/fold.yaml +0 -0
  82. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/free.yaml +0 -0
  83. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/gawk.yaml +0 -0
  84. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/gcloud.yaml +0 -0
  85. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/gh.yaml +0 -0
  86. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/glab-discussion.yaml +0 -0
  87. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/glab.yaml +0 -0
  88. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/go.yaml +0 -0
  89. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/gog.yaml +0 -0
  90. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/gradle.yaml +0 -0
  91. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/gradlew.yaml +0 -0
  92. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/grep.yaml +0 -0
  93. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/groups.yaml +0 -0
  94. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/gunzip.yaml +0 -0
  95. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/gws.yaml +0 -0
  96. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/gzip.yaml +0 -0
  97. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/hadolint.yaml +0 -0
  98. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/head.yaml +0 -0
  99. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/helm.yaml +0 -0
  100. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/hostname.yaml +0 -0
  101. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/id.yaml +0 -0
  102. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/install.yaml +0 -0
  103. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/isort.yaml +0 -0
  104. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/java.yaml +0 -0
  105. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/javac.yaml +0 -0
  106. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/join.yaml +0 -0
  107. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/journalctl.yaml +0 -0
  108. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/jq.yaml +0 -0
  109. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/kill.yaml +0 -0
  110. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/killall.yaml +0 -0
  111. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/kubectl.yaml +0 -0
  112. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/less.yaml +0 -0
  113. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/ln.yaml +0 -0
  114. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/ls.yaml +0 -0
  115. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/make.yaml +0 -0
  116. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/md5sum.yaml +0 -0
  117. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/mise.yaml +0 -0
  118. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/mkdir.yaml +0 -0
  119. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/more.yaml +0 -0
  120. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/mvn.yaml +0 -0
  121. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/mvnw.yaml +0 -0
  122. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/mypy.yaml +0 -0
  123. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/netstat.yaml +0 -0
  124. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/nice.yaml +0 -0
  125. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/nl.yaml +0 -0
  126. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/node.yaml +0 -0
  127. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/nohup.yaml +0 -0
  128. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/npm.yaml +0 -0
  129. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/npx.yaml +0 -0
  130. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/nslookup.yaml +0 -0
  131. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/paste.yaml +0 -0
  132. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/ping.yaml +0 -0
  133. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/pip.yaml +0 -0
  134. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/pip3.yaml +0 -0
  135. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/pipx.yaml +0 -0
  136. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/pkill.yaml +0 -0
  137. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/pnpm.yaml +0 -0
  138. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/poetry.yaml +0 -0
  139. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/prettier.yaml +0 -0
  140. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/printenv.yaml +0 -0
  141. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/printf.yaml +0 -0
  142. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/ps.yaml +0 -0
  143. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/pup.yaml +0 -0
  144. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/pwd.yaml +0 -0
  145. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/pytest.yaml +0 -0
  146. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/python.yaml +0 -0
  147. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/python3.yaml +0 -0
  148. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/read.yaml +0 -0
  149. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/readlink.yaml +0 -0
  150. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/realpath.yaml +0 -0
  151. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/rev.yaml +0 -0
  152. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/rg.yaml +0 -0
  153. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/rm.yaml +0 -0
  154. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/rsync.yaml +0 -0
  155. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/rtk.yaml +0 -0
  156. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/ruff.yaml +0 -0
  157. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/scp.yaml +0 -0
  158. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/sed.yaml +0 -0
  159. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/seq.yaml +0 -0
  160. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/sh.yaml +0 -0
  161. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/sha1sum.yaml +0 -0
  162. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/sha256sum.yaml +0 -0
  163. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/shellcheck.yaml +0 -0
  164. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/slack.yaml +0 -0
  165. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/sleep.yaml +0 -0
  166. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/snip.yaml +0 -0
  167. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/ss.yaml +0 -0
  168. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/ssh.yaml +0 -0
  169. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/stat.yaml +0 -0
  170. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/stdbuf.yaml +0 -0
  171. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/strace.yaml +0 -0
  172. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/strings.yaml +0 -0
  173. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/sudo.yaml +0 -0
  174. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/systemctl.yaml +0 -0
  175. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/tac.yaml +0 -0
  176. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/tail.yaml +0 -0
  177. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/tar.yaml +0 -0
  178. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/tee.yaml +0 -0
  179. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/terraform.yaml +0 -0
  180. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/test.yaml +0 -0
  181. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/time.yaml +0 -0
  182. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/timeout.yaml +0 -0
  183. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/top.yaml +0 -0
  184. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/touch.yaml +0 -0
  185. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/tr.yaml +0 -0
  186. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/traceroute.yaml +0 -0
  187. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/true.yaml +0 -0
  188. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/tsc.yaml +0 -0
  189. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/type.yaml +0 -0
  190. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/uname.yaml +0 -0
  191. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/unexpand.yaml +0 -0
  192. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/uniq.yaml +0 -0
  193. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/uptime.yaml +0 -0
  194. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/uv.yaml +0 -0
  195. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/wait.yaml +0 -0
  196. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/wc.yaml +0 -0
  197. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/whereis.yaml +0 -0
  198. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/which.yaml +0 -0
  199. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/whoami.yaml +0 -0
  200. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/xargs.yaml +0 -0
  201. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/xmllint.yaml +0 -0
  202. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/yarn.yaml +0 -0
  203. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/yes.yaml +0 -0
  204. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/yq.yaml +0 -0
  205. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/zip.yaml +0 -0
  206. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/commands/zsh.yaml +0 -0
  207. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/parser.py +0 -0
  208. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/py.typed +0 -0
  209. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/redirects.py +0 -0
  210. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/rules.py +0 -0
  211. {bash_classify-0.12.0 → bash_classify-0.13.1}/src/bash_classify/sensitive-paths.yaml +0 -0
  212. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/__init__.py +0 -0
  213. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/conftest.py +0 -0
  214. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-award-emoji.sh +0 -0
  215. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-include-diverged.sh +0 -0
  216. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-itself.sh +0 -0
  217. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-pipelines-list.sh +0 -0
  218. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-update-description.sh +0 -0
  219. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-project-lookup.sh +0 -0
  220. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/ci-list.sh +0 -0
  221. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/comment-only-mention.sh +0 -0
  222. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/echo-mentions-api-endpoint.sh +0 -0
  223. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/echo-mentions-command.sh +0 -0
  224. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/git-commit-heredoc-message.sh +0 -0
  225. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/git-commit-inline-message.sh +0 -0
  226. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read-and-api-mr.sh +0 -0
  227. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read.sh +0 -0
  228. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/glab-pipeline-inspect.sh +0 -0
  229. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/grep-pattern-mentions-command.sh +0 -0
  230. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/grep-recursive-for-command.sh +0 -0
  231. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-2026-09-04.sh +0 -0
  232. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-mentions-blocked-commands.sh +0 -0
  233. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-report-mentions-blocked.sh +0 -0
  234. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-custom-delimiter.sh +0 -0
  235. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-phrase-split-across-lines.sh +0 -0
  236. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/hook-self-test-json-payload.sh +0 -0
  237. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/loop-over-quoted-command-strings.sh +0 -0
  238. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-note-list-output-json.sh +0 -0
  239. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-note-list.sh +0 -0
  240. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-update-then-view.sh +0 -0
  241. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-bare.sh +0 -0
  242. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-grep-pipeline.sh +0 -0
  243. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-output-equals-json.sh +0 -0
  244. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-output-json.sh +0 -0
  245. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-output-short-flag.sh +0 -0
  246. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/printf-mentions-command.sh +0 -0
  247. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/python-heredoc-triple-quoted-mention.sh +0 -0
  248. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/ripgrep-pattern-args.sh +0 -0
  249. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-absolute-binary-path.sh +0 -0
  250. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-delete-note-nested-api.sh +0 -0
  251. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-cd-and-prefix.sh +0 -0
  252. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-export-host-loop.sh +0 -0
  253. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-for-loop.sh +0 -0
  254. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-heredoc-then-call.sh +0 -0
  255. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-hostname-python-consumer.sh +0 -0
  256. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-line-continuation.sh +0 -0
  257. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-method-get-field.sh +0 -0
  258. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-output-ndjson.sh +0 -0
  259. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate-before-path.sh +0 -0
  260. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate.sh +0 -0
  261. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-per-page-query.sh +0 -0
  262. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-quoted-paginate-jq.sh +0 -0
  263. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-redirect-to-file.sh +0 -0
  264. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-repo-flag-first.sh +0 -0
  265. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-var-capture.sh +0 -0
  266. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-edit-note-put-heredoc.sh +0 -0
  267. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-input-stdin.sh +0 -0
  268. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-position-fields.sh +0 -0
  269. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-note-award-emoji.sh +0 -0
  270. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-note-by-id-or-retry.sh +0 -0
  271. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-notes-after-allowed-mr-view.sh +0 -0
  272. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-notes-query-sort.sh +0 -0
  273. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-notes-timeout-prefix.sh +0 -0
  274. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-reply-method-post-after-path.sh +0 -0
  275. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-reply-post-body-from-file.sh +0 -0
  276. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-reply-post-heredoc-body.sh +0 -0
  277. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-resolve-loop.sh +0 -0
  278. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-resolve-put-field.sh +0 -0
  279. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-single-discussion-by-id.sh +0 -0
  280. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/heredoc-then-and-chain-to-blocked.sh +0 -0
  281. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/heredoc-then-pipe-to-blocked.sh +0 -0
  282. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-custom-heredoc-delimiter.sh +0 -0
  283. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-help.sh +0 -0
  284. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-heredoc-body.sh +0 -0
  285. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-inline-after-mr-update.sh +0 -0
  286. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-long-message-flag.sh +0 -0
  287. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-repo-before-message.sh +0 -0
  288. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-second-in-pipeline.sh +0 -0
  289. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-then-close.sh +0 -0
  290. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-bare.sh +0 -0
  291. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-loop.sh +0 -0
  292. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-no-iid.sh +0 -0
  293. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-page-flag.sh +0 -0
  294. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-repo-flag.sh +0 -0
  295. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-cluster.sh +0 -0
  296. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-flag.sh +0 -0
  297. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/wrapper-bash-c.sh +0 -0
  298. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/wrapper-sudo.sh +0 -0
  299. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/rules.yaml +0 -0
  300. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-without-trace.sh +0 -0
  301. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-xargs.sh +0 -0
  302. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-itself.sh +0 -0
  303. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list-per-page.sh +0 -0
  304. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list.sh +0 -0
  305. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-bash-c.sh +0 -0
  306. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-ref.sh +0 -0
  307. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-single-quoted.sh +0 -0
  308. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-lint-local-file.sh +0 -0
  309. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-list-per-page.sh +0 -0
  310. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-list.sh +0 -0
  311. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-status-compact.sh +0 -0
  312. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-status-pipeline-id.sh +0 -0
  313. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/comment-only-mention.sh +0 -0
  314. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/echo-mentions-ci-command.sh +0 -0
  315. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/git-commit-heredoc-message.sh +0 -0
  316. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/git-commit-inline-message.sh +0 -0
  317. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/glab-discussion-read.sh +0 -0
  318. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/glab-pipeline-inspect.sh +0 -0
  319. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/grep-pattern-mentions-ci.sh +0 -0
  320. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/heredoc-brief-mentions-ci-commands.sh +0 -0
  321. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/heredoc-skill-mentions-ci.sh +0 -0
  322. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/loop-over-quoted-command-strings.sh +0 -0
  323. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/printf-mentions-ci-command.sh +0 -0
  324. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ripgrep-pattern-args.sh +0 -0
  325. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-continuation-lines.sh +0 -0
  326. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-input-and-header.sh +0 -0
  327. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-method-post-field.sh +0 -0
  328. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-raw-field-cat.sh +0 -0
  329. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-after-allowed-metadata.sh +0 -0
  330. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-env-assignment.sh +0 -0
  331. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-redirect-to-file.sh +0 -0
  332. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-retry-loop.sh +0 -0
  333. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-xargs.sh +0 -0
  334. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-detail.sh +0 -0
  335. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-env-assignment.sh +0 -0
  336. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-hostname-after-path.sh +0 -0
  337. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-comment-and-loop.sh +0 -0
  338. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-list.sh +0 -0
  339. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-nested-loop-timeout.sh +0 -0
  340. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-paginate-ndjson.sh +0 -0
  341. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-python-consumer.sh +0 -0
  342. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-scope-failed-loop.sh +0 -0
  343. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-status-poll-loop.sh +0 -0
  344. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-test-report.sh +0 -0
  345. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-after-allowed-status.sh +0 -0
  346. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-in-echo-chain.sh +0 -0
  347. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-ref-sleep-prefix.sh +0 -0
  348. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-json-jq-sort-uniq.sh +0 -0
  349. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-then-ci-trace.sh +0 -0
  350. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-var-capture-poll-loop.sh +0 -0
  351. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-with-job-details-repo.sh +0 -0
  352. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-job-name-with-pipeline.sh +0 -0
  353. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-pipeline-id-before-job-name.sh +0 -0
  354. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-redirect-to-file.sh +0 -0
  355. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-repo-before-job-id.sh +0 -0
  356. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-view-help.sh +0 -0
  357. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-view-job-web-or-api.sh +0 -0
  358. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-view-pipeline-id.sh +0 -0
  359. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/heredoc-then-pipe-to-blocked.sh +0 -0
  360. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/pipe-get-alias.sh +0 -0
  361. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/pipeline-view-alias.sh +0 -0
  362. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/wrapper-bash-c.sh +0 -0
  363. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/wrapper-sudo.sh +0 -0
  364. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/rules.yaml +0 -0
  365. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_match_fixtures.py +0 -0
  366. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_matcher.py +0 -0
  367. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_models.py +0 -0
  368. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_parser.py +0 -0
  369. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_real_world.py +0 -0
  370. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_rules.py +0 -0
  371. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_schema.py +0 -0
  372. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_sensitive_paths.py +0 -0
  373. {bash_classify-0.12.0 → bash_classify-0.13.1}/tests/test_smoke.py +0 -0
  374. {bash_classify-0.12.0 → bash_classify-0.13.1}/uv.lock +0 -0
@@ -8,7 +8,7 @@
8
8
  {
9
9
  "name": "bash-classify-hook",
10
10
  "description": "Auto-allows low-risk bash commands in Claude Code using bash-classify",
11
- "version": "0.12.0",
11
+ "version": "0.13.1",
12
12
  "author": {
13
13
  "name": "Filip Procházka",
14
14
  "url": "https://github.com/fprochazka"
@@ -28,3 +28,6 @@ htmlcov/
28
28
  # OS
29
29
  .DS_Store
30
30
  Thumbs.db
31
+
32
+ # git worktrees created by `git wt`
33
+ .worktrees/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bash-classify
3
- Version: 0.12.0
3
+ Version: 0.13.1
4
4
  Summary: Classify bash commands as READONLY, WRITE, DANGEROUS, or UNKNOWN
5
5
  Project-URL: Homepage, https://github.com/fprochazka/bash-classify
6
6
  Project-URL: Repository, https://github.com/fprochazka/bash-classify
@@ -45,6 +45,14 @@ uv tool install bash-classify
45
45
  pip install bash-classify
46
46
  ```
47
47
 
48
+ To track a commit rather than a release — worth doing if you want to test a change before it ships — pin it directly:
49
+
50
+ ```
51
+ bash-classify @ git+https://github.com/fprochazka/bash-classify@<commit>
52
+ ```
53
+
54
+ The version is derived from the last tag, so a commit past it resolves to a pre-release such as `0.12.1.dev3+g8699357`. An ordinary constraint still admits that: `>=0.12,<0.13` contains it, because a specifier set only excludes pre-releases when its `prereleases` flag is explicitly false, and it is not by default. Writing the floor as `>=0.12.1.dev0,<0.13` is worth doing anyway — it says out loud that the pinned thing is a pre-release, and it sets that flag — but it is a marker for whoever reads the file next, not something the resolver needs.
55
+
48
56
  ## Quick start
49
57
 
50
58
  ```bash
@@ -147,7 +155,9 @@ $ echo 'cat ~/.ssh/id_rsa' | bash-classify | jq '{classification, risk, sensitiv
147
155
 
148
156
  `sensitive_paths` is always present, on the expression and on every command and inner command, so a caller that wants a different policy reads the detail instead of the verdict. A hit found inside `sudo`, `xargs`, `sh -c` or `find -exec` is reported at that depth and again on every level above it, up to the expression.
149
157
 
150
- `source` says where the token came from: `argv`, `redirect_read`, `redirect_write` or `env_dump`. `argv` is vague on purpose. `cat X` reads and `tee X` writes, and telling those apart needs per-command knowledge the database does not carry; only a redirect knows its direction, because the operator says so.
158
+ `source` says where the token came from: `argv`, `argv_write`, `redirect_read`, `redirect_write` or `env_dump`. `argv` is vague on purpose. `cat X` reads and `tee X` writes, and telling those apart needs per-command knowledge the database does not carry for a positional. Two sources do know the direction. A redirect knows it because the operator says so, and `argv_write` is the value of an option the tool documents as naming a file it writes, such as `curl -o` — so `curl -o ~/.ssh/authorized_keys https://x` reports a write while `cat ~/.ssh/authorized_keys` reports an argument of unknown direction.
159
+
160
+ A marked option's value is reported *only* as `argv_write`, so selecting `source == "argv"` no longer sees it — `curl -o ~/.ssh/authorized_keys` has one hit and it is not an `argv` one. And `argv_write` never covers a destination written as a plain positional (`cp a b`, `tee out.txt`), an operand that is not an option (`dd of=X`), or an option whose direction depends on another option (`tar -f`, `tar -C`). Read it as an extra signal, never as the definition of "this writes" — `source != "argv_write"` does not mean nothing is written. [SPEC.md](SPEC.md) has the full list.
151
161
 
152
162
  Paths match on whole segments and are never anchored, so `~/.ssh/id_rsa`, `/home/me/.ssh/id_rsa` and `../.ssh/id_rsa` all hit the `ssh` rule, while `.gitignore` and `.github` are not `.git`. A `.` segment is dropped and a `..` is resolved against the one before it, so `/etc/./shadow` and `~/.aws/x/../credentials` hit while `.ssh/../notes` does not. Each token is read three ways — as written, with `\` as a Windows separator, and with `\x` read as the POSIX escape `x` — so `~/.s\sh/id_rsa` is caught. A glob segment is matched backwards, the denylisted name against the token as the pattern, so `~/.ss?/id_rsa`, `~/.[^x]sh/id_rsa` and `.e*` are caught too. `spelling` reports which reading matched: `literal`, `posix_escape`, `windows` or `glob`.
153
163
 
@@ -237,7 +247,7 @@ Risk defaults are derived from classification (`READONLY`→LOW, `LOCAL_EFFECTS`
237
247
  - **Subcommand aliases** -- a subcommand can declare other names for itself, so `glab pipeline view` resolves to `glab ci view` and any rule written for the canonical name catches the aliased spelling
238
248
  - **Multi-goal build tools** -- `subcommand_mode: match_all` handles commands like `mvn clean install` and `gradle clean build test` where multiple goals can be combined in any order
239
249
  - **Delegation for wrappers** -- commands like `xargs`, `sudo`, and `env` delegate classification to the inner command
240
- - **File path detection** -- redirect targets are parsed into `write_paths`/`read_paths` in the output; a write is `>` or `>>` with the optional file descriptor and `|` no-clobber override bash allows (`1>`, `2>>`, `>|`), plus `&>`, `&>>` and `>&`; writes to `/tmp` and `/var/tmp` stay at LOW risk
250
+ - **File path detection** -- `write_paths` holds redirect targets and the values of options the database marks as naming an output (`curl -o`, `wget -O`, `cp -t`, `sort -o`), `read_paths` holds input redirect targets; a write is `>` or `>>` with the optional file descriptor and `|` no-clobber override bash allows (`1>`, `2>>`, `>|`), plus `&>`, `&>>` and `>&`; writes to `/tmp` and `/var/tmp` stay at LOW risk. A destination named by a plain positional (`cp a b`, `tee out.txt`) is in neither field
241
251
  - **Sensitive path detection** -- argv tokens and redirect targets are matched against a denylist of credential paths; a hit floors risk at HIGH and is reported in `sensitive_paths`
242
252
 
243
253
  ## Python API
@@ -16,6 +16,14 @@ uv tool install bash-classify
16
16
  pip install bash-classify
17
17
  ```
18
18
 
19
+ To track a commit rather than a release — worth doing if you want to test a change before it ships — pin it directly:
20
+
21
+ ```
22
+ bash-classify @ git+https://github.com/fprochazka/bash-classify@<commit>
23
+ ```
24
+
25
+ The version is derived from the last tag, so a commit past it resolves to a pre-release such as `0.12.1.dev3+g8699357`. An ordinary constraint still admits that: `>=0.12,<0.13` contains it, because a specifier set only excludes pre-releases when its `prereleases` flag is explicitly false, and it is not by default. Writing the floor as `>=0.12.1.dev0,<0.13` is worth doing anyway — it says out loud that the pinned thing is a pre-release, and it sets that flag — but it is a marker for whoever reads the file next, not something the resolver needs.
26
+
19
27
  ## Quick start
20
28
 
21
29
  ```bash
@@ -118,7 +126,9 @@ $ echo 'cat ~/.ssh/id_rsa' | bash-classify | jq '{classification, risk, sensitiv
118
126
 
119
127
  `sensitive_paths` is always present, on the expression and on every command and inner command, so a caller that wants a different policy reads the detail instead of the verdict. A hit found inside `sudo`, `xargs`, `sh -c` or `find -exec` is reported at that depth and again on every level above it, up to the expression.
120
128
 
121
- `source` says where the token came from: `argv`, `redirect_read`, `redirect_write` or `env_dump`. `argv` is vague on purpose. `cat X` reads and `tee X` writes, and telling those apart needs per-command knowledge the database does not carry; only a redirect knows its direction, because the operator says so.
129
+ `source` says where the token came from: `argv`, `argv_write`, `redirect_read`, `redirect_write` or `env_dump`. `argv` is vague on purpose. `cat X` reads and `tee X` writes, and telling those apart needs per-command knowledge the database does not carry for a positional. Two sources do know the direction. A redirect knows it because the operator says so, and `argv_write` is the value of an option the tool documents as naming a file it writes, such as `curl -o` — so `curl -o ~/.ssh/authorized_keys https://x` reports a write while `cat ~/.ssh/authorized_keys` reports an argument of unknown direction.
130
+
131
+ A marked option's value is reported *only* as `argv_write`, so selecting `source == "argv"` no longer sees it — `curl -o ~/.ssh/authorized_keys` has one hit and it is not an `argv` one. And `argv_write` never covers a destination written as a plain positional (`cp a b`, `tee out.txt`), an operand that is not an option (`dd of=X`), or an option whose direction depends on another option (`tar -f`, `tar -C`). Read it as an extra signal, never as the definition of "this writes" — `source != "argv_write"` does not mean nothing is written. [SPEC.md](SPEC.md) has the full list.
122
132
 
123
133
  Paths match on whole segments and are never anchored, so `~/.ssh/id_rsa`, `/home/me/.ssh/id_rsa` and `../.ssh/id_rsa` all hit the `ssh` rule, while `.gitignore` and `.github` are not `.git`. A `.` segment is dropped and a `..` is resolved against the one before it, so `/etc/./shadow` and `~/.aws/x/../credentials` hit while `.ssh/../notes` does not. Each token is read three ways — as written, with `\` as a Windows separator, and with `\x` read as the POSIX escape `x` — so `~/.s\sh/id_rsa` is caught. A glob segment is matched backwards, the denylisted name against the token as the pattern, so `~/.ss?/id_rsa`, `~/.[^x]sh/id_rsa` and `.e*` are caught too. `spelling` reports which reading matched: `literal`, `posix_escape`, `windows` or `glob`.
124
134
 
@@ -208,7 +218,7 @@ Risk defaults are derived from classification (`READONLY`→LOW, `LOCAL_EFFECTS`
208
218
  - **Subcommand aliases** -- a subcommand can declare other names for itself, so `glab pipeline view` resolves to `glab ci view` and any rule written for the canonical name catches the aliased spelling
209
219
  - **Multi-goal build tools** -- `subcommand_mode: match_all` handles commands like `mvn clean install` and `gradle clean build test` where multiple goals can be combined in any order
210
220
  - **Delegation for wrappers** -- commands like `xargs`, `sudo`, and `env` delegate classification to the inner command
211
- - **File path detection** -- redirect targets are parsed into `write_paths`/`read_paths` in the output; a write is `>` or `>>` with the optional file descriptor and `|` no-clobber override bash allows (`1>`, `2>>`, `>|`), plus `&>`, `&>>` and `>&`; writes to `/tmp` and `/var/tmp` stay at LOW risk
221
+ - **File path detection** -- `write_paths` holds redirect targets and the values of options the database marks as naming an output (`curl -o`, `wget -O`, `cp -t`, `sort -o`), `read_paths` holds input redirect targets; a write is `>` or `>>` with the optional file descriptor and `|` no-clobber override bash allows (`1>`, `2>>`, `>|`), plus `&>`, `&>>` and `>&`; writes to `/tmp` and `/var/tmp` stay at LOW risk. A destination named by a plain positional (`cp a b`, `tee out.txt`) is in neither field
212
222
  - **Sensitive path detection** -- argv tokens and redirect targets are matched against a denylist of credential paths; a hit floors risk at HIGH and is reported in `sensitive_paths`
213
223
 
214
224
  ## Python API
@@ -330,19 +330,35 @@ Certain expression-level patterns elevate risk to at least `HIGH`:
330
330
  - Backgrounding (`cmd &`)
331
331
  - Output redirects to non-`/dev/null` targets (except when all write targets are under `/tmp` or `/var/tmp`)
332
332
 
333
+ The system-path elevation reads the operands of a command, never the program it runs. `argv[0]` is the binary being executed rather than a path the command writes to, so `/usr/bin/git add a.txt` gets exactly the verdict `git add a.txt` gets. The exemption covers the program word of every command in the expression, not only the outermost one: a wrapper carries the words of the command it runs in its own argv, so `sudo /usr/bin/git add a.txt` is scanned as `['sudo', '/usr/bin/git', 'add', 'a.txt']` and both `sudo` and `/usr/bin/git` are exempt. Each exempt word is consumed once, so a program word spelled a second time as an operand still counts and `/usr/bin/git add /usr/bin/git` stays `DANGEROUS`.
334
+
335
+ A script handed to a shell is a token holding a whole command line, not a path. `sh -c '/usr/bin/touch /etc/passwd'` would otherwise be read as a path under `/usr/bin`, because the scan compares whole tokens against directory prefixes and only the script's leading word — the program — ever made it look like one. So the script token is not scanned as a path, and **the commands parsed out of it are scanned instead**, each against its own program word and each guarded by its own classification the way a top-level command is. Classification is delegated to the inner commands; this elevation is not, so without that second scan the operands inside a script would be checked nowhere.
336
+
337
+ The consequence is that `sh -c 'X'` gets the verdict `X` gets, in both directions. `sh -c '/usr/bin/git add a.txt'` is `LOCAL_EFFECTS`/`LOW`, and `sh -c 'mkdir -p /usr/lib/x'` is `DANGEROUS`/`HIGH` exactly as `mkdir -p /usr/lib/x` is. In `sh -c 'cat /etc/hosts && touch x'` the `cat` sits below `LOCAL_EFFECTS`, so its `/etc/hosts` is not a hit and the expression stays `LOCAL_EFFECTS` — again what the bare spelling gives.
338
+
339
+ Two limits are worth stating. A script reaches this scan only when the delegating option is recognised, so a clustered shell flag (`bash -lc '...'`) parses no inner command at all and the token is scanned as a path instead. For `sh`, `bash` and `zsh` that is unobservable: they are `DANGEROUS` from their own definitions, and the elevation is gated on the command not already being `DANGEROUS`, so nothing the path scan finds there changes the verdict. For a command declared in a user database with this delegation mode and no `DANGEROUS` floor, the clustered spelling is a genuine miss — `X -c 'mkdir -p /usr/lib/x'` is `DANGEROUS`/`HIGH` and `X -lc 'mkdir -p /usr/lib/x'` is whatever `X` itself is. The second limit is that a redirect written *inside* a script is dropped before the inner command is classified, so `sh -c 'grep foo /etc/hosts > out'` is `READONLY` while the bare `grep foo /etc/hosts > out` is `DANGEROUS`. Both gaps predate this rule and neither is about system paths.
340
+
341
+ The exemption applies to a program word, so it is given only where the inner command really begins with one. The matcher strips `{}` placeholders before building a `find -exec` inner's argv, so in `find . -exec {} /usr/bin/git add \;` the inner `argv[0]` is `/usr/bin/git` — an argument handed to each file `find` matched, not the program being run — and nothing is exempt there. `find . -exec /bin/cp {} /usr/bin/x \;` still exempts `/bin/cp` and still reports `/usr/bin/x`.
342
+
343
+ Both kinds of skip are consumed once, never matched by value. A program word spelled again as an operand counts, and so does an operand that happens to read the same as the script text: `nohup sh -c /bin/ls /bin/ls` runs the first `/bin/ls` as the script and hands it the second as an argument, and the second is a hit.
344
+
345
+ For `args_are_expression` delegation the exemption applies only when the whole script is a single token. `eval 'cp a /usr/bin/b'` exempts that token and scans the `cp` parsed out of it; `eval cp a /usr/bin/b` spreads the script over several tokens, none of which is the script, so every token stays scannable.
346
+
347
+ Redirect targets are unaffected by any of this: `echo x > /etc/hosts` is still `DANGEROUS`.
348
+
333
349
  #### Temp path risk lowering
334
350
 
335
351
  When every write target of an expression is under `/tmp` or `/var/tmp`, the risk elevation to `MEDIUM` from output redirects is skipped. `cat > /tmp/foo.txt` stays at `LOW` risk and is still classified as `LOCAL_EFFECTS`. The lowering applies to every write form equally, so `1> /tmp/foo.txt` gets the same verdict as `> /tmp/foo.txt`.
336
352
 
337
353
  ### File path detection
338
354
 
339
- The tool extracts file paths from shell redirects:
340
-
341
- - **`write_paths`**: Targets of output redirects, excluding `/dev/null`, `/dev/stdin`, `/dev/stdout`, `/dev/stderr`, and `/dev/fd/*`.
355
+ - **`write_paths`**: Paths the command names as output. Two sources feed it: the target of an output redirect, excluding `/dev/null`, `/dev/stdin`, `/dev/stdout`, `/dev/stderr` and `/dev/fd/*`; and the value of an option the database marks `names_output_path`, such as `curl -o` or `sort -o`. Redirect targets come after the option values.
342
356
  - **`read_paths`**: Targets of input redirects, excluding the same `/dev/*` paths.
343
357
  - Which operators those are is one definition, given under [Redirect Classification](#redirect-classification). A redirect that elevates the classification also reports its target here, or the temp path lowering above would never fire for it.
344
358
 
345
- Paths are reported at both the per-command level (`commands[].write_paths`, `commands[].read_paths`) and the expression level (aggregated from all commands).
359
+ `write_paths` is not the complete set of files a command writes. A destination written as a plain positional is absent — `cp a b`, `tee out.txt` and `sed -i f` all report nothing — because telling a read positional from a write one needs per-command knowledge the database does not carry. Read the field as "paths this command is known to write", never as "the only paths it writes".
360
+
361
+ Paths are reported at both the per-command level (`commands[].write_paths`, `commands[].read_paths`) and the expression level. The expression level aggregates every command, and reaches through wrappers: `sudo curl -o X` names no output path at the `sudo` level, so the expression level takes it from the inner command.
346
362
 
347
363
  ### Composite classification
348
364
 
@@ -977,9 +993,12 @@ A subcommand entry takes the same fields as the command level, minus `command` a
977
993
  | `takes_value` | `bool` | Whether the option consumes the next token as its value |
978
994
  | `aliases` | `list[str]` | Alternative names for this option (e.g. `-n` for `--namespace`) |
979
995
  | `overrides` | `enum` | When this option is present, override the classification to this level |
980
- | `captures_directory` | `bool` | The value of this option is a working directory (e.g. `git -C`) |
996
+ | `captures_directory` | `bool` | The value of this option is a directory the command is pointed at: a working directory (`git -C`, `make -C`) or a destination an archive is unpacked into (`tar -C`, `unzip -d`). It lands in the invocation's own `directories`, at whatever depth the invocation sits. |
997
+ | `names_output_path` | `bool` | The tool documents this option's value as a path it writes (`curl -o`, `sort -o`). It lands in `write_paths`, and a sensitive-path hit on it is reported with `source: "argv_write"`. |
981
998
  | `delegates_to` | `object` | This option's value(s) form a delegated inner command (e.g. `find -exec`) |
982
999
 
1000
+ Set `names_output_path` only from the tool's own documentation of that option, and only when it holds in every mode of the command. `curl -T` sends the named file to a server and writes nothing locally, so it stays unmarked. `tar -f` writes the archive under `-c` and reads it under `-x`; one option cannot be conditioned on another, so it stays unmarked too, and the honest answer for `tar` is the destination directory that `-C` already reports.
1001
+
983
1002
  ## Redirect Classification
984
1003
 
985
1004
  An output redirect elevates the classification to at least `LOCAL_EFFECTS`.
@@ -1048,6 +1067,12 @@ The floor is deliberately **not** guarded by a minimum classification, unlike th
1048
1067
 
1049
1068
  Tokens are scanned one at a time and never joined, so `git config` is two words and not the path `.git/config`.
1050
1069
 
1070
+ The value of an option marked `names_output_path` is scanned on its own and reported with `source: "argv_write"`, and the argv token that carries it is then skipped. That keeps one file to one hit across the three spellings of an option value: `-o ~/.ssh/x`, `--output=~/.ssh/x` and `-o~/.ssh/x` all report the path alone, in the write direction. Every other argv token keeps `source: "argv"`, whose direction is unknown.
1071
+
1072
+ **Two things a caller reading `source` has to know.** The skip means a marked option's value no longer appears as an `argv` hit at all: `curl -o ~/.ssh/authorized_keys` reports one hit with `source: "argv_write"` and nothing with `source: "argv"`. Code that selects `source == "argv"` and works out the direction itself stops seeing these paths, with nothing to signal that it happened. This changed in the release that introduced `names_output_path`.
1073
+
1074
+ And `argv_write` is not the complete set of writes, permanently rather than for now. It covers an option the tool documents as naming a file it writes, and nothing else. A destination written as a plain positional never carries it — `cp a b`, `tee out.txt`, `split`. Neither does an operand that is not an option, such as `dd of=X`. Neither does an option whose direction depends on another option: `tar -f` writes the archive under `-c` and reads it under `-x`, and `tar -C` is an extraction destination under `-x` and a source directory under `-c`, so marking either would be wrong in half its uses. So `source != "argv_write"` does not mean the command writes nothing, and must not be used as though it did. A caller that needs to cover the cases above has to keep its own reasoning for them; `argv_write` is an additional signal, not a replacement for one.
1075
+
1051
1076
  A hit is reported on the invocation that carries it, and again on every level above it up to the expression, deduplicated by token, rule, source and spelling. A caller that reads only `ExpressionResult.sensitive_paths` still sees what a wrapper hid.
1052
1077
 
1053
1078
  ### The denylist
@@ -1099,7 +1124,7 @@ Name these when you describe the feature, so nobody reads it as stronger than it
1099
1124
  - A path held in a variable: `P=~/.ssh/id_rsa; cat "$P"`.
1100
1125
  - Encoding detours: `base64`, `xxd`, `rev`, or a `sed` that reassembles the path.
1101
1126
  - A glob below the two-character floor, such as `cat .*`.
1102
- - The direction of an `argv` hit. `cat X` reads and `tee X` writes; telling them apart needs per-command read/write knowledge that the database does not carry and that this feature does not add.
1127
+ - The direction of an `argv` hit. `cat X` reads and `tee X` writes; telling them apart needs per-command read/write knowledge that the database carries only for options marked `names_output_path`, never for a positional.
1103
1128
  - A redirect inside a nested expression. `sh -c "cat < ~/.ssh/id_rsa"` is caught through the `-c` argument text, not through the redirect, because inner commands carry no redirects of their own.
1104
1129
  - A token that only *mentions* a path. `git commit -m "document ~/.ssh/config setup"`, `grep -rn "\.ssh/config" docs/` and `find . -path "*/.git/config"` are all reported, because the scan reads tokens and not the meaning a command gives them. Note the contrast with `match` mode, which is careful about exactly this: there a heredoc body, an `echo` string or a `grep` pattern that names a command is not an invocation and does not match. The two do not behave alike. Separating a path that a command opens from one it merely carries needs per-command argument knowledge, and that is out of scope here.
1105
1130
 
@@ -1107,15 +1132,53 @@ Name these when you describe the feature, so nobody reads it as stronger than it
1107
1132
 
1108
1133
  ## Directory Detection
1109
1134
 
1110
- The tool extracts working directories from:
1135
+ `directories` means something different at the expression level and on a single invocation,
1136
+ and a caller has to pick the one that answers its question.
1111
1137
 
1112
- | Source | Example |
1113
- |---|---|
1114
- | `cd dir` / `pushd dir` / `popd` | Explicit directory changes |
1115
- | Global options with `captures_directory: true` | `git -C /path`, `make -C /path` |
1116
- | Well-known commands | `ls /path`, `find /path`, `cat /path/file` (dirname) |
1138
+ **On an invocation** the list holds the values of that invocation's `captures_directory`
1139
+ options, and nothing else: the destination of `tar -C` or `unzip -d`, the working directory
1140
+ of `git -C`. Every invocation carries it at every depth — a `commands` entry and an
1141
+ `inner_commands` entry in the JSON, `CommandResult.directories` and
1142
+ `InnerCommandResult.directories` in Python — so walking invocations needs no special case
1143
+ for the top level. The JSON omits the key when the list is empty, so a wrapper that names no
1144
+ directory of its own cannot be read as one that does.
1145
+
1146
+ **At the expression level** the list is wider. It collects four kinds of value:
1147
+
1148
+ - the target of a `cd` or `pushd`
1149
+ - the value of a `captures_directory` option on a top-level invocation
1150
+ - the first positional of an `ls` or a `find`
1151
+ - the dirname of the first path holding a `/` that a `cat`, `head`, `tail`, `less` or `more` was handed
1152
+
1153
+ Directories are reported as written, never resolved, because a value may hold a variable
1154
+ or a `~`.
1155
+
1156
+ ### A destination below a wrapper stays below it
1157
+
1158
+ `sudo tar -xf e.tar -C ~/.config` reports the destination on the `tar` invocation inside
1159
+ `inner_commands`. The expression-level list stays empty. `write_paths` behaves the opposite
1160
+ way — a wrapper's expression-level `write_paths` does carry what the wrapped command names
1161
+ as output — and the difference is deliberate.
1162
+
1163
+ `write_paths` holds one kind of path: files a command names as output. Merging several of
1164
+ those produces a list that still means one thing, so a caller can act on it directly.
1165
+ `directories` mixes four, and a dirname such as the `/etc` of `cat /etc/config` reads
1166
+ exactly like the `/etc` of `tar -C /etc`. Aggregating that through wrappers would move more
1167
+ ambiguous values into the list a caller reaches for first, which is why the per-invocation
1168
+ list exists at all. A caller after destinations walks the invocations instead —
1169
+ `iter_invocations` in Python, the recursive `inner_commands` in the JSON — and reads each
1170
+ `directories` there.
1171
+
1172
+ Do not "fix" the asymmetry by making the expression-level list reach through wrappers. The
1173
+ tests that pin the current values are there to catch exactly that change.
1174
+
1175
+ ### Limit: a sensitive rule under a reported directory is not a hit
1176
+
1177
+ `tar -xf e.tar -C ~/.ssh` hits the `ssh` rule, because the destination itself spells the rule. `tar -xf e.tar -C ~/.config` does not hit `gcloud`, even though the archive may well contain `.config/gcloud/credentials.db`, and `unzip e.zip -d ~` hits nothing at all.
1178
+
1179
+ This is deliberate and it will not change. The contents of an archive are unknowable without opening it, so the only rule the library could apply is "any denylisted path that sits under the destination is a hit". The common destinations are `.`, `..`, `~` and `$PWD`: every rule sits under those, so the check would fire on every extraction anybody ever runs, and a gate that fires on everything gets switched off. `tar -xf e.tar -C .` is the case to keep in mind.
1117
1180
 
1118
- Directories are reported as-is (not resolved) since variable expansion may be involved.
1181
+ Extraction into a parent directory is therefore a general way past a path denylist, and closing it is the caller's policy call, not the library's. The destination is in the invocation's `directories` for exactly that reason, whether the invocation is top-level or sits under `sudo`, `sh -c`, `xargs` or `find -exec`. A caller that wants the floor can require the destination to carry some minimum specificity before applying it — at least a few segments, and not the working directory, the home directory or the root — the way the glob matcher requires two literal characters before reading a segment as a pattern.
1119
1182
 
1120
1183
  ## Special-cased Commands
1121
1184
 
@@ -1170,14 +1233,14 @@ The `commands` list below is recursive — any command entry can contain `inner_
1170
1233
  {
1171
1234
  "expression": "string — the original input",
1172
1235
  "classification": "READONLY | LOCAL_EFFECTS | EXTERNAL_EFFECTS | DANGEROUS | UNKNOWN",
1173
- "directories": ["string — detected directories"],
1174
- "write_paths": ["string — files targeted by output redirects (optional, omitted when empty)"],
1236
+ "directories": ["string — cd and pushd targets, captures_directory values of top-level invocations, the first positional of ls and find, and dirnames of paths handed to cat, head, tail, less and more, mixed in one list; for a destination below a wrapper read the inner command's own directories instead"],
1237
+ "write_paths": ["string — paths the commands name as output: redirect targets and the values of options marked names_output_path (optional, omitted when empty)"],
1175
1238
  "read_paths": ["string — files targeted by input redirects (optional, omitted when empty)"],
1176
1239
  "sensitive_paths": [
1177
1240
  {
1178
- "token": "string — the argv token or redirect target, exactly as written",
1241
+ "token": "string — the path as written, or the whole argv token that holds it",
1179
1242
  "rule": "string — the denylist entry that matched, e.g. ssh",
1180
- "source": "argv | redirect_read | redirect_write | env_dump",
1243
+ "source": "argv | argv_write | redirect_read | redirect_write | env_dump",
1181
1244
  "spelling": "literal | posix_escape | windows | glob"
1182
1245
  }
1183
1246
  ],
@@ -1193,7 +1256,8 @@ The `commands` list below is recursive — any command entry can contain `inner_
1193
1256
  "remaining_options": ["string — options that were not in database"],
1194
1257
  "classification_reason": "string — why this classification was chosen",
1195
1258
  "overriding_option": "string | null — the option that elevated classification",
1196
- "write_paths": ["string — files targeted by output redirects (optional, omitted when empty)"],
1259
+ "directories": ["string — the values of this invocation's captures_directory options (optional, omitted when empty); narrower than the expression-level directories"],
1260
+ "write_paths": ["string — this command's own output paths: option values and redirect targets (optional, omitted when empty)"],
1197
1261
  "read_paths": ["string — files targeted by input redirects (optional, omitted when empty)"],
1198
1262
  "sensitive_paths": ["... — this command's own hits plus its inner commands'; always present, empty when none"],
1199
1263
  "inner_commands": [
@@ -1206,6 +1270,8 @@ The `commands` list below is recursive — any command entry can contain `inner_
1206
1270
  "matched_rule": "...",
1207
1271
  "options": ["... — same meaning as on the enclosing command"],
1208
1272
  "positionals": ["... — same meaning as on the enclosing command"],
1273
+ "directories": ["... — same meaning as on the enclosing command; not aggregated into the expression-level directories"],
1274
+ "write_paths": ["... — option values only; an inner command carries no redirects of its own"],
1209
1275
  "sensitive_paths": ["... — same meaning as on the enclosing command"],
1210
1276
  "inner_commands": ["... — recursive, can nest further"]
1211
1277
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bash-classify-hook",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "description": "Auto-allows low-risk bash commands in Claude Code using bash-classify",
5
5
  "author": {
6
6
  "name": "Filip Prochazka"
@@ -110,9 +110,20 @@ subcommands:
110
110
  | `takes_value` | boolean | Whether the option consumes the next token as its value |
111
111
  | `aliases` | list | Alternative names (e.g. `-n` for `--namespace`) |
112
112
  | `overrides` | enum | When present, override classification to this level |
113
- | `captures_directory` | boolean | The option's value is a working directory (e.g. `git -C`) |
113
+ | `captures_directory` | boolean | The option's value is a directory the command is pointed at: a working directory (`git -C`) or an extraction destination (`tar -C`, `unzip -d`). It lands in the `directories` of the invocation that carries the option, wrapped or not. The expression-level `directories` picks it up only for a top-level invocation. |
114
+ | `names_output_path` | boolean | The option's value is a path the command writes (`curl -o`, `sort -o`). It lands in `write_paths`. |
114
115
  | `delegates_to` | object | This option triggers delegation (e.g. `find -exec`) |
115
116
 
117
+ ##### Marking an option as an output path
118
+
119
+ `names_output_path` answers one question: does the tool's own documentation say this option's value names a file it writes? Check the man page before you set it, and apply three rules.
120
+
121
+ 1. A read is not a write. `curl -T file` uploads the named file to a server and writes nothing locally, so it stays unmarked.
122
+ 2. The answer has to hold in every mode of the command. `tar -f` writes the archive under `-c` and reads it under `-x`, and one option cannot be conditioned on another, so it stays unmarked.
123
+ 3. A destination named by a positional is out of reach. `cp a b`, `tee out.txt`, `dd of=X` and the prefix of `split` are not options, and nothing in the database describes them.
124
+
125
+ A consumer uses the field to tell a write to a credential from a mention of one, so a wrong mark is worse than a missing one. When in doubt, leave it off.
126
+
116
127
  #### The `# $schema:` comment
117
128
 
118
129
  Add `# $schema: ../../../schemas/command.schema.json` as the first line of every YAML file. This enables autocomplete and validation in IDEs that support JSON Schema for YAML files.
@@ -512,7 +523,7 @@ When a command writes to a file via an output redirect, its risk is normally ele
512
523
 
513
524
  This means `cat > /tmp/foo.txt` is classified as `LOCAL_EFFECTS` with risk `LOW`, while `cat > ~/foo.txt` is classified as `LOCAL_EFFECTS` with risk `MEDIUM`.
514
525
 
515
- The tool also reports `write_paths` and `read_paths` in the output, extracted from redirect operators. These fields are omitted from the JSON output when empty.
526
+ The tool also reports `write_paths` and `read_paths` in the output. `read_paths` comes from input redirects. `write_paths` holds the targets of output redirects and the values of options marked `names_output_path`. Both fields are omitted from the JSON output when empty, and neither is a complete account of what the command touches: a destination named by a plain positional is in neither.
516
527
 
517
528
  ## 11. Sensitive Paths
518
529
 
@@ -156,7 +156,11 @@
156
156
  },
157
157
  "captures_directory": {
158
158
  "type": "boolean",
159
- "description": "The value of this option is a working directory"
159
+ "description": "The value of this option is a directory the command is pointed at: a working directory (`git -C`) or an extraction destination (`tar -C`, `unzip -d`). It lands in `directories`."
160
+ },
161
+ "names_output_path": {
162
+ "type": "boolean",
163
+ "description": "The tool documents this option's value as a path it writes (`curl -o`, `sort -o`). It lands in `write_paths`, and a sensitive-path hit on it is reported with source `argv_write`. Do not set it on an option whose value is read, or on one that writes only in some modes (`tar -f` writes when creating and reads when extracting)."
160
164
  },
161
165
  "delegates_to": {
162
166
  "$ref": "#/$defs/DelegationConfig"
@@ -0,0 +1,60 @@
1
+ """bash-classify: Classify bash expressions by their side-effect risk level.
2
+
3
+ `__all__` names every symbol a caller outside the package may rely on: the entry points, and
4
+ the types those entry points accept or return. Anything else is internal and may move.
5
+ """
6
+
7
+ from bash_classify.classifier import classify_expression, iter_invocations
8
+ from bash_classify.database import CommandDatabase, load_database
9
+ from bash_classify.models import (
10
+ Classification,
11
+ CommandDef,
12
+ CommandResult,
13
+ ExpressionResult,
14
+ InnerCommandResult,
15
+ Redirect,
16
+ Risk,
17
+ SensitiveHit,
18
+ )
19
+ from bash_classify.redirects import (
20
+ is_descriptor_duplication,
21
+ is_read_operator,
22
+ is_write_operator,
23
+ writes_a_file,
24
+ )
25
+ from bash_classify.rules import Match, MatchResult, Rule, RulesError, load_rules, match_expression
26
+ from bash_classify.sensitive import (
27
+ SensitivePathsError,
28
+ SensitiveRule,
29
+ find_path_hits,
30
+ load_sensitive_paths,
31
+ )
32
+
33
+ __all__ = [
34
+ "classify_expression",
35
+ "iter_invocations",
36
+ "load_database",
37
+ "CommandDatabase",
38
+ "CommandDef",
39
+ "Classification",
40
+ "Risk",
41
+ "ExpressionResult",
42
+ "CommandResult",
43
+ "InnerCommandResult",
44
+ "Redirect",
45
+ "Rule",
46
+ "RulesError",
47
+ "Match",
48
+ "MatchResult",
49
+ "load_rules",
50
+ "match_expression",
51
+ "SensitiveHit",
52
+ "SensitiveRule",
53
+ "SensitivePathsError",
54
+ "load_sensitive_paths",
55
+ "find_path_hits",
56
+ "is_write_operator",
57
+ "is_read_operator",
58
+ "is_descriptor_duplication",
59
+ "writes_a_file",
60
+ ]