bash-classify 0.10.0__tar.gz → 0.12.0__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 (370) hide show
  1. {bash_classify-0.10.0 → bash_classify-0.12.0}/.claude-plugin/marketplace.json +1 -1
  2. {bash_classify-0.10.0 → bash_classify-0.12.0}/PKG-INFO +66 -10
  3. {bash_classify-0.10.0 → bash_classify-0.12.0}/README.md +65 -9
  4. {bash_classify-0.10.0 → bash_classify-0.12.0}/SPEC.md +171 -20
  5. {bash_classify-0.10.0 → bash_classify-0.12.0}/coding-agent-plugins/claude-code/.claude-plugin/plugin.json +1 -1
  6. {bash_classify-0.10.0 → bash_classify-0.12.0}/docs/classification-guidance.md +44 -2
  7. {bash_classify-0.10.0 → bash_classify-0.12.0}/schemas/command.schema.json +7 -0
  8. {bash_classify-0.10.0 → bash_classify-0.12.0}/schemas/match-rules.schema.json +12 -1
  9. bash_classify-0.12.0/schemas/sensitive-paths.schema.json +49 -0
  10. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/__init__.py +6 -1
  11. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/classifier.py +44 -8
  12. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/cli.py +14 -0
  13. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/glab.yaml +2 -0
  14. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/database.py +50 -4
  15. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/matcher.py +8 -3
  16. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/models.py +37 -1
  17. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/parser.py +63 -38
  18. bash_classify-0.12.0/src/bash_classify/redirects.py +50 -0
  19. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/rules.py +36 -13
  20. bash_classify-0.12.0/src/bash_classify/sensitive-paths.yaml +112 -0
  21. bash_classify-0.12.0/src/bash_classify/sensitive.py +476 -0
  22. bash_classify-0.12.0/tests/fixtures/match/glab-pipeline/block/pipe-get-alias.sh +1 -0
  23. bash_classify-0.12.0/tests/fixtures/match/glab-pipeline/block/pipeline-view-alias.sh +1 -0
  24. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_classifier.py +150 -0
  25. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_cli.py +184 -0
  26. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_database.py +67 -0
  27. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_matcher.py +60 -0
  28. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_parser.py +370 -0
  29. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_real_world.py +26 -0
  30. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_rules.py +75 -0
  31. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_schema.py +28 -0
  32. bash_classify-0.12.0/tests/test_sensitive_paths.py +638 -0
  33. {bash_classify-0.10.0 → bash_classify-0.12.0}/.claude/rules/command-database.md +0 -0
  34. {bash_classify-0.10.0 → bash_classify-0.12.0}/.editorconfig +0 -0
  35. {bash_classify-0.10.0 → bash_classify-0.12.0}/.github/workflows/ci.yml +0 -0
  36. {bash_classify-0.10.0 → bash_classify-0.12.0}/.github/workflows/publish.yml +0 -0
  37. {bash_classify-0.10.0 → bash_classify-0.12.0}/.gitignore +0 -0
  38. {bash_classify-0.10.0 → bash_classify-0.12.0}/.python-version +0 -0
  39. {bash_classify-0.10.0 → bash_classify-0.12.0}/CLAUDE.md +0 -0
  40. {bash_classify-0.10.0 → bash_classify-0.12.0}/LICENSE +0 -0
  41. {bash_classify-0.10.0 → bash_classify-0.12.0}/coding-agent-plugins/claude-code/hooks/hook-permission-request.sh +0 -0
  42. {bash_classify-0.10.0 → bash_classify-0.12.0}/coding-agent-plugins/claude-code/hooks/hook-pre-tool-use.sh +0 -0
  43. {bash_classify-0.10.0 → bash_classify-0.12.0}/coding-agent-plugins/claude-code/hooks/hooks.json +0 -0
  44. {bash_classify-0.10.0 → bash_classify-0.12.0}/pyproject.toml +0 -0
  45. {bash_classify-0.10.0 → bash_classify-0.12.0}/ruff.toml +0 -0
  46. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/__main__.py +0 -0
  47. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/agent-browser.yaml +0 -0
  48. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/apt.yaml +0 -0
  49. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/awk.yaml +0 -0
  50. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/basename.yaml +0 -0
  51. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/bash-classify.yaml +0 -0
  52. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/bash.yaml +0 -0
  53. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/black.yaml +0 -0
  54. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/brew.yaml +0 -0
  55. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/builtin.yaml +0 -0
  56. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/cargo.yaml +0 -0
  57. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/cat.yaml +0 -0
  58. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/chgrp.yaml +0 -0
  59. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/chmod.yaml +0 -0
  60. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/chown.yaml +0 -0
  61. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/column.yaml +0 -0
  62. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/comm.yaml +0 -0
  63. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/command.yaml +0 -0
  64. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/cp.yaml +0 -0
  65. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/curl.yaml +0 -0
  66. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/cut.yaml +0 -0
  67. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/date.yaml +0 -0
  68. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/df.yaml +0 -0
  69. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/diff.yaml +0 -0
  70. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/dig.yaml +0 -0
  71. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/dirname.yaml +0 -0
  72. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/docker.yaml +0 -0
  73. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/du.yaml +0 -0
  74. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/echo.yaml +0 -0
  75. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/env.yaml +0 -0
  76. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/eslint.yaml +0 -0
  77. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/eval.yaml +0 -0
  78. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/exec.yaml +0 -0
  79. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/expand.yaml +0 -0
  80. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/false.yaml +0 -0
  81. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/file.yaml +0 -0
  82. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/find.yaml +0 -0
  83. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/fmt.yaml +0 -0
  84. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/fold.yaml +0 -0
  85. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/free.yaml +0 -0
  86. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/gawk.yaml +0 -0
  87. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/gcloud.yaml +0 -0
  88. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/gh.yaml +0 -0
  89. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/git.yaml +0 -0
  90. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/glab-discussion.yaml +0 -0
  91. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/go.yaml +0 -0
  92. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/gog.yaml +0 -0
  93. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/gradle.yaml +0 -0
  94. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/gradlew.yaml +0 -0
  95. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/grep.yaml +0 -0
  96. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/groups.yaml +0 -0
  97. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/gunzip.yaml +0 -0
  98. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/gws.yaml +0 -0
  99. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/gzip.yaml +0 -0
  100. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/hadolint.yaml +0 -0
  101. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/head.yaml +0 -0
  102. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/helm.yaml +0 -0
  103. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/hostname.yaml +0 -0
  104. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/id.yaml +0 -0
  105. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/install.yaml +0 -0
  106. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/isort.yaml +0 -0
  107. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/java.yaml +0 -0
  108. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/javac.yaml +0 -0
  109. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/join.yaml +0 -0
  110. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/journalctl.yaml +0 -0
  111. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/jq.yaml +0 -0
  112. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/kill.yaml +0 -0
  113. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/killall.yaml +0 -0
  114. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/kubectl.yaml +0 -0
  115. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/less.yaml +0 -0
  116. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/ln.yaml +0 -0
  117. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/ls.yaml +0 -0
  118. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/make.yaml +0 -0
  119. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/md5sum.yaml +0 -0
  120. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/mise.yaml +0 -0
  121. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/mkdir.yaml +0 -0
  122. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/more.yaml +0 -0
  123. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/mv.yaml +0 -0
  124. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/mvn.yaml +0 -0
  125. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/mvnw.yaml +0 -0
  126. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/mypy.yaml +0 -0
  127. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/netstat.yaml +0 -0
  128. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/nice.yaml +0 -0
  129. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/nl.yaml +0 -0
  130. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/node.yaml +0 -0
  131. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/nohup.yaml +0 -0
  132. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/npm.yaml +0 -0
  133. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/npx.yaml +0 -0
  134. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/nslookup.yaml +0 -0
  135. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/paste.yaml +0 -0
  136. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/ping.yaml +0 -0
  137. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/pip.yaml +0 -0
  138. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/pip3.yaml +0 -0
  139. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/pipx.yaml +0 -0
  140. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/pkill.yaml +0 -0
  141. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/pnpm.yaml +0 -0
  142. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/poetry.yaml +0 -0
  143. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/prettier.yaml +0 -0
  144. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/printenv.yaml +0 -0
  145. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/printf.yaml +0 -0
  146. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/ps.yaml +0 -0
  147. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/pup.yaml +0 -0
  148. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/pwd.yaml +0 -0
  149. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/pytest.yaml +0 -0
  150. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/python.yaml +0 -0
  151. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/python3.yaml +0 -0
  152. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/read.yaml +0 -0
  153. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/readlink.yaml +0 -0
  154. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/realpath.yaml +0 -0
  155. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/rev.yaml +0 -0
  156. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/rg.yaml +0 -0
  157. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/rm.yaml +0 -0
  158. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/rsync.yaml +0 -0
  159. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/rtk.yaml +0 -0
  160. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/ruff.yaml +0 -0
  161. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/scp.yaml +0 -0
  162. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/sed.yaml +0 -0
  163. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/seq.yaml +0 -0
  164. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/sh.yaml +0 -0
  165. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/sha1sum.yaml +0 -0
  166. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/sha256sum.yaml +0 -0
  167. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/shellcheck.yaml +0 -0
  168. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/slack.yaml +0 -0
  169. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/sleep.yaml +0 -0
  170. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/snip.yaml +0 -0
  171. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/sort.yaml +0 -0
  172. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/ss.yaml +0 -0
  173. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/ssh.yaml +0 -0
  174. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/stat.yaml +0 -0
  175. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/stdbuf.yaml +0 -0
  176. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/strace.yaml +0 -0
  177. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/strings.yaml +0 -0
  178. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/sudo.yaml +0 -0
  179. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/systemctl.yaml +0 -0
  180. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/tac.yaml +0 -0
  181. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/tail.yaml +0 -0
  182. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/tar.yaml +0 -0
  183. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/tee.yaml +0 -0
  184. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/terraform.yaml +0 -0
  185. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/test.yaml +0 -0
  186. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/time.yaml +0 -0
  187. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/timeout.yaml +0 -0
  188. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/top.yaml +0 -0
  189. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/touch.yaml +0 -0
  190. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/tr.yaml +0 -0
  191. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/traceroute.yaml +0 -0
  192. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/true.yaml +0 -0
  193. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/tsc.yaml +0 -0
  194. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/type.yaml +0 -0
  195. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/uname.yaml +0 -0
  196. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/unexpand.yaml +0 -0
  197. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/uniq.yaml +0 -0
  198. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/unzip.yaml +0 -0
  199. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/uptime.yaml +0 -0
  200. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/uv.yaml +0 -0
  201. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/wait.yaml +0 -0
  202. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/wc.yaml +0 -0
  203. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/wget.yaml +0 -0
  204. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/whereis.yaml +0 -0
  205. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/which.yaml +0 -0
  206. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/whoami.yaml +0 -0
  207. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/xargs.yaml +0 -0
  208. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/xmllint.yaml +0 -0
  209. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/yarn.yaml +0 -0
  210. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/yes.yaml +0 -0
  211. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/yq.yaml +0 -0
  212. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/zip.yaml +0 -0
  213. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/commands/zsh.yaml +0 -0
  214. {bash_classify-0.10.0 → bash_classify-0.12.0}/src/bash_classify/py.typed +0 -0
  215. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/__init__.py +0 -0
  216. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/conftest.py +0 -0
  217. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-award-emoji.sh +0 -0
  218. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-include-diverged.sh +0 -0
  219. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-itself.sh +0 -0
  220. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-pipelines-list.sh +0 -0
  221. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-update-description.sh +0 -0
  222. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/api-project-lookup.sh +0 -0
  223. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/ci-list.sh +0 -0
  224. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/comment-only-mention.sh +0 -0
  225. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/echo-mentions-api-endpoint.sh +0 -0
  226. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/echo-mentions-command.sh +0 -0
  227. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/git-commit-heredoc-message.sh +0 -0
  228. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/git-commit-inline-message.sh +0 -0
  229. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read-and-api-mr.sh +0 -0
  230. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read.sh +0 -0
  231. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/glab-pipeline-inspect.sh +0 -0
  232. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/grep-pattern-mentions-command.sh +0 -0
  233. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/grep-recursive-for-command.sh +0 -0
  234. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-2026-09-04.sh +0 -0
  235. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-mentions-blocked-commands.sh +0 -0
  236. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/heredoc-report-mentions-blocked.sh +0 -0
  237. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-custom-delimiter.sh +0 -0
  238. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-phrase-split-across-lines.sh +0 -0
  239. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/hook-self-test-json-payload.sh +0 -0
  240. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/loop-over-quoted-command-strings.sh +0 -0
  241. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/mr-note-list-output-json.sh +0 -0
  242. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/mr-note-list.sh +0 -0
  243. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/mr-update-then-view.sh +0 -0
  244. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/mr-view-bare.sh +0 -0
  245. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/mr-view-grep-pipeline.sh +0 -0
  246. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/mr-view-output-equals-json.sh +0 -0
  247. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/mr-view-output-json.sh +0 -0
  248. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/mr-view-output-short-flag.sh +0 -0
  249. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/printf-mentions-command.sh +0 -0
  250. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/python-heredoc-triple-quoted-mention.sh +0 -0
  251. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/allow/ripgrep-pattern-args.sh +0 -0
  252. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-absolute-binary-path.sh +0 -0
  253. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-delete-note-nested-api.sh +0 -0
  254. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-cd-and-prefix.sh +0 -0
  255. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-export-host-loop.sh +0 -0
  256. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-for-loop.sh +0 -0
  257. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-heredoc-then-call.sh +0 -0
  258. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-hostname-python-consumer.sh +0 -0
  259. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-line-continuation.sh +0 -0
  260. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-method-get-field.sh +0 -0
  261. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-output-ndjson.sh +0 -0
  262. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate-before-path.sh +0 -0
  263. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate.sh +0 -0
  264. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-per-page-query.sh +0 -0
  265. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-quoted-paginate-jq.sh +0 -0
  266. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-redirect-to-file.sh +0 -0
  267. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-repo-flag-first.sh +0 -0
  268. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-discussions-var-capture.sh +0 -0
  269. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-edit-note-put-heredoc.sh +0 -0
  270. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-input-stdin.sh +0 -0
  271. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-position-fields.sh +0 -0
  272. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-note-award-emoji.sh +0 -0
  273. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-note-by-id-or-retry.sh +0 -0
  274. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-notes-after-allowed-mr-view.sh +0 -0
  275. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-notes-query-sort.sh +0 -0
  276. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-notes-timeout-prefix.sh +0 -0
  277. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-reply-method-post-after-path.sh +0 -0
  278. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-reply-post-body-from-file.sh +0 -0
  279. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-reply-post-heredoc-body.sh +0 -0
  280. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-resolve-loop.sh +0 -0
  281. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-resolve-put-field.sh +0 -0
  282. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/api-single-discussion-by-id.sh +0 -0
  283. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/heredoc-then-and-chain-to-blocked.sh +0 -0
  284. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/heredoc-then-pipe-to-blocked.sh +0 -0
  285. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-note-custom-heredoc-delimiter.sh +0 -0
  286. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-note-help.sh +0 -0
  287. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-note-heredoc-body.sh +0 -0
  288. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-note-inline-after-mr-update.sh +0 -0
  289. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-note-long-message-flag.sh +0 -0
  290. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-note-repo-before-message.sh +0 -0
  291. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-note-second-in-pipeline.sh +0 -0
  292. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-note-then-close.sh +0 -0
  293. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-bare.sh +0 -0
  294. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-loop.sh +0 -0
  295. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-no-iid.sh +0 -0
  296. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-page-flag.sh +0 -0
  297. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-repo-flag.sh +0 -0
  298. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-cluster.sh +0 -0
  299. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-flag.sh +0 -0
  300. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/wrapper-bash-c.sh +0 -0
  301. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/block/wrapper-sudo.sh +0 -0
  302. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-discussion/rules.yaml +0 -0
  303. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-without-trace.sh +0 -0
  304. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-xargs.sh +0 -0
  305. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-itself.sh +0 -0
  306. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list-per-page.sh +0 -0
  307. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list.sh +0 -0
  308. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-bash-c.sh +0 -0
  309. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-ref.sh +0 -0
  310. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-single-quoted.sh +0 -0
  311. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/ci-lint-local-file.sh +0 -0
  312. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/ci-list-per-page.sh +0 -0
  313. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/ci-list.sh +0 -0
  314. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/ci-status-compact.sh +0 -0
  315. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/ci-status-pipeline-id.sh +0 -0
  316. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/comment-only-mention.sh +0 -0
  317. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/echo-mentions-ci-command.sh +0 -0
  318. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/git-commit-heredoc-message.sh +0 -0
  319. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/git-commit-inline-message.sh +0 -0
  320. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/glab-discussion-read.sh +0 -0
  321. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/glab-pipeline-inspect.sh +0 -0
  322. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/grep-pattern-mentions-ci.sh +0 -0
  323. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/heredoc-brief-mentions-ci-commands.sh +0 -0
  324. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/heredoc-skill-mentions-ci.sh +0 -0
  325. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/loop-over-quoted-command-strings.sh +0 -0
  326. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/printf-mentions-ci-command.sh +0 -0
  327. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/allow/ripgrep-pattern-args.sh +0 -0
  328. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-continuation-lines.sh +0 -0
  329. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-input-and-header.sh +0 -0
  330. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-method-post-field.sh +0 -0
  331. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-raw-field-cat.sh +0 -0
  332. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-after-allowed-metadata.sh +0 -0
  333. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-env-assignment.sh +0 -0
  334. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-redirect-to-file.sh +0 -0
  335. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-retry-loop.sh +0 -0
  336. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-xargs.sh +0 -0
  337. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-detail.sh +0 -0
  338. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-env-assignment.sh +0 -0
  339. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-hostname-after-path.sh +0 -0
  340. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-comment-and-loop.sh +0 -0
  341. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-list.sh +0 -0
  342. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-nested-loop-timeout.sh +0 -0
  343. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-paginate-ndjson.sh +0 -0
  344. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-python-consumer.sh +0 -0
  345. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-scope-failed-loop.sh +0 -0
  346. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-status-poll-loop.sh +0 -0
  347. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-test-report.sh +0 -0
  348. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-get-after-allowed-status.sh +0 -0
  349. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-in-echo-chain.sh +0 -0
  350. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-ref-sleep-prefix.sh +0 -0
  351. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-get-json-jq-sort-uniq.sh +0 -0
  352. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-get-then-ci-trace.sh +0 -0
  353. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-get-var-capture-poll-loop.sh +0 -0
  354. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-get-with-job-details-repo.sh +0 -0
  355. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-job-name-with-pipeline.sh +0 -0
  356. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-pipeline-id-before-job-name.sh +0 -0
  357. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-redirect-to-file.sh +0 -0
  358. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-repo-before-job-id.sh +0 -0
  359. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-view-help.sh +0 -0
  360. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-view-job-web-or-api.sh +0 -0
  361. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/ci-view-pipeline-id.sh +0 -0
  362. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/heredoc-then-pipe-to-blocked.sh +0 -0
  363. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/wrapper-bash-c.sh +0 -0
  364. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/block/wrapper-sudo.sh +0 -0
  365. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/fixtures/match/glab-pipeline/rules.yaml +0 -0
  366. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_cli_serialization.py +0 -0
  367. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_match_fixtures.py +0 -0
  368. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_models.py +0 -0
  369. {bash_classify-0.10.0 → bash_classify-0.12.0}/tests/test_smoke.py +0 -0
  370. {bash_classify-0.10.0 → bash_classify-0.12.0}/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.10.0",
11
+ "version": "0.12.0",
12
12
  "author": {
13
13
  "name": "Filip Procházka",
14
14
  "url": "https://github.com/fprochazka"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bash-classify
3
- Version: 0.10.0
3
+ Version: 0.12.0
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
@@ -83,6 +83,10 @@ rules:
83
83
  - name: mr-note
84
84
  command: [glab, mr, note]
85
85
  except: [[glab, mr, note, list]]
86
+
87
+ - name: python-script
88
+ command: [python3]
89
+ except_option: [-c]
86
90
  ```
87
91
 
88
92
  ```bash
@@ -100,13 +104,9 @@ $ echo 'sudo glab mr note 42 -m hi' | bash-classify match --rules blocked-comman
100
104
  }
101
105
  ```
102
106
 
103
- Within one rule every condition given must hold; rules are independent of each other, and
104
- one invocation can match several. `command` is a prefix match against the *resolved*
105
- command path, so `/usr/bin/glab --repo x mr note` still resolves to `glab mr note`.
106
- `any_option` looks at the options actually present, with values stripped and declared
107
- clusters expanded (`-wc` carries `-c`). `any_arg_matches` is a Python `re.search` over
108
- every argument token — a pattern written for `grep -E` needs `\S` rather than
109
- `[^[:space:]]`. `via` lists the enclosing wrappers, outermost first.
107
+ Within one rule every condition given must hold; rules are independent of each other, and one invocation can match several. `command` is a prefix match against the *resolved* command path, so `/usr/bin/glab --repo x mr note` still resolves to `glab mr note`. A command path — in `command` and in every `except` entry alike — holds the binary and its subcommands only. An option never resolves into one, so a path that contains one is rejected when the rules file loads, rather than loading clean and matching nothing.
108
+
109
+ `any_option` and `except_option` are mirrors of each other: `any_option` requires at least one of the listed options to be present, `except_option` requires that none of them is. Both look at the options actually present, with values stripped (`--comments=true` counts as `--comments`) and declared clusters expanded (`-wc` carries `-c`); tokens after `--` are positionals and count as absent. An option the command database does not declare still counts, so `except_option: [-c]` separates `python3 script.py` from `python3 -c '...'`. `any_arg_matches` is a Python `re.search` over every argument token — a pattern written for `grep -E` needs `\S` rather than `[^[:space:]]`. `via` lists the enclosing wrappers, outermost first.
110
110
 
111
111
  **Two things a caller has to check.** First, `parse_warnings` is always present: when it
112
112
  is non-empty the expression could not be fully parsed, so an empty `matches` proves nothing
@@ -121,6 +121,60 @@ Exit codes are `0` whether or not anything matched, `1` for empty input or no in
121
121
  5 seconds, and `2` for bad arguments, an unreadable or invalid rules file, or an internal
122
122
  error.
123
123
 
124
+ ## Sensitive paths
125
+
126
+ Classification says what a command does to the system. It says nothing about what the command touches. Reading a private key really is read-only, so `cat ~/.ssh/id_rsa` is `READONLY`, and anything that auto-approves on `risk: LOW` auto-approves it.
127
+
128
+ So every argv token and every redirect target is checked against a denylist of paths that hold credentials. A hit leaves classification alone and floors `risk` at `HIGH`.
129
+
130
+ The list covers SSH and GPG keys, cloud and cluster credentials, `.env` files, `.netrc` and `.npmrc`, `.git-credentials`, `.pgpass` and `.my.cnf`, and the token stores of command-line tools: `~/.claude.json`, `~/.config/gh/hosts.yml` and `~/.config/glab-cli/config.yml`. Settings files are not on it. `~/.aws/config`, `.git/config`, `~/.gitconfig` and `~/.config/gh/config.yml` are routine debugging and stay `LOW`.
131
+
132
+ ```bash
133
+ $ echo 'cat ~/.ssh/id_rsa' | bash-classify | jq '{classification, risk, sensitive_paths}'
134
+ {
135
+ "classification": "READONLY",
136
+ "risk": "HIGH",
137
+ "sensitive_paths": [
138
+ {
139
+ "token": "~/.ssh/id_rsa",
140
+ "rule": "ssh",
141
+ "source": "argv",
142
+ "spelling": "literal"
143
+ }
144
+ ]
145
+ }
146
+ ```
147
+
148
+ `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
+
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.
151
+
152
+ 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
+
154
+ Nothing here reads the environment of the process doing the classifying. `~` and `$HOME` stay unresolved segments, so the verdict depends on the expression alone and a hook gives the same answer whatever `HOME` it runs under.
155
+
156
+ A rule can exempt specific files. The bundled `dotenv` rule exempts the template names projects commit on purpose — `.env.example`, `.env.sample`, `.env.template`, `.env.dist`, `.env.defaults` — while `.env`, `.env.local` and `.env.production` stay hits.
157
+
158
+ Bare `env` and `printenv` are reported with `source: "env_dump"`. They print every variable, which is where an agent's API keys live. An argument that names a secret-bearing variable is reported as well: `$GITHUB_TOKEN` and `${ANTHROPIC_API_KEY}` under any command, and a bare `ANTHROPIC_API_KEY` only under `env`, `printenv`, `export` and `unset`. Everywhere else a bare all-caps word is a search string, so `grep -rn TOKEN src` is not a hit.
159
+
160
+ **This is a speed bump against an agent being careless, not a control against one being evaded.** It raises the cost of an accident. Anyone who knows the rule can walk around it, and [SPEC.md](SPEC.md) lists how. The short version: a path computed at runtime is invisible to a static matcher, and a glob with fewer than two literal characters is ignored on purpose, so `cat .*` is not reported — a rule that fires on `ls *` is a rule people switch off.
161
+
162
+ It also over-reports in one direction. A token that only *mentions* a path is a hit, so `git commit -m "document ~/.ssh/config setup"` and `grep -rn "\.ssh/config" docs/` are both reported. This is the opposite of what `match` mode does, where a `grep` pattern that names a command is not an invocation. The two are not alike: telling a path a command opens from one it merely carries needs per-command argument knowledge that the database does not have.
163
+
164
+ Extend the denylist at `~/.config/bash-classify/sensitive-paths.yaml`, or at `$BASH_CLASSIFY_CONFIG_DIR/sensitive-paths.yaml`. It uses the same format as the bundled `src/bash_classify/sensitive-paths.yaml`, validated against a [JSON Schema](schemas/sensitive-paths.schema.json):
165
+
166
+ ```yaml
167
+ rules:
168
+ - name: company-vault
169
+ paths:
170
+ - .acme/vault
171
+ - .config/acme/token
172
+ except_paths:
173
+ - .acme/vault/README
174
+ ```
175
+
176
+ A rule there is added to the bundled set. A rule that reuses a bundled name replaces it, which is how you narrow or drop one.
177
+
124
178
  ## Claude Code plugin
125
179
 
126
180
  The repo includes a Claude Code plugin that auto-allows low-risk bash commands via a `PreToolUse` hook.
@@ -142,7 +196,7 @@ claude plugin marketplace update fprochazka-bash-classify
142
196
  claude plugin update bash-classify-hook@fprochazka-bash-classify
143
197
  ```
144
198
 
145
- Once installed, any Bash tool call with `risk: LOW` is auto-approved — no permission prompt. This includes all `READONLY` commands plus safe routine operations like `git add`, `git commit`, `mkdir`, package installs, code formatters, and more. Commands with `MEDIUM` or `HIGH` risk still require confirmation.
199
+ Once installed, any Bash tool call with `risk: LOW` is auto-approved — no permission prompt. This includes all `READONLY` commands plus safe routine operations like `git add`, `git commit`, `mkdir`, package installs, code formatters, and more. Commands with `MEDIUM` or `HIGH` risk still require confirmation. A command that names a sensitive path is never `LOW`, so the hook prompts for it even when the command itself is read-only.
146
200
 
147
201
  ## Command database
148
202
 
@@ -180,9 +234,11 @@ Risk defaults are derived from classification (`READONLY`→LOW, `LOCAL_EFFECTS`
180
234
  - **Tree-sitter parsing** -- bash expressions are parsed into an AST for accurate command extraction, handling pipes, subshells, and command substitution
181
235
  - **YAML command database** -- each command has classification rules with subcommand and option matching
182
236
  - **Subcommand matching** -- `kubectl get` and `kubectl delete` can have different classifications
237
+ - **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
183
238
  - **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
184
239
  - **Delegation for wrappers** -- commands like `xargs`, `sudo`, and `env` delegate classification to the inner command
185
- - **File path detection** -- redirect operators (`>`, `>>`, `<`) are parsed into `write_paths`/`read_paths` in the output; writes to `/tmp` and `/var/tmp` stay at LOW risk
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
241
+ - **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`
186
242
 
187
243
  ## Python API
188
244
 
@@ -54,6 +54,10 @@ rules:
54
54
  - name: mr-note
55
55
  command: [glab, mr, note]
56
56
  except: [[glab, mr, note, list]]
57
+
58
+ - name: python-script
59
+ command: [python3]
60
+ except_option: [-c]
57
61
  ```
58
62
 
59
63
  ```bash
@@ -71,13 +75,9 @@ $ echo 'sudo glab mr note 42 -m hi' | bash-classify match --rules blocked-comman
71
75
  }
72
76
  ```
73
77
 
74
- Within one rule every condition given must hold; rules are independent of each other, and
75
- one invocation can match several. `command` is a prefix match against the *resolved*
76
- command path, so `/usr/bin/glab --repo x mr note` still resolves to `glab mr note`.
77
- `any_option` looks at the options actually present, with values stripped and declared
78
- clusters expanded (`-wc` carries `-c`). `any_arg_matches` is a Python `re.search` over
79
- every argument token — a pattern written for `grep -E` needs `\S` rather than
80
- `[^[:space:]]`. `via` lists the enclosing wrappers, outermost first.
78
+ Within one rule every condition given must hold; rules are independent of each other, and one invocation can match several. `command` is a prefix match against the *resolved* command path, so `/usr/bin/glab --repo x mr note` still resolves to `glab mr note`. A command path — in `command` and in every `except` entry alike — holds the binary and its subcommands only. An option never resolves into one, so a path that contains one is rejected when the rules file loads, rather than loading clean and matching nothing.
79
+
80
+ `any_option` and `except_option` are mirrors of each other: `any_option` requires at least one of the listed options to be present, `except_option` requires that none of them is. Both look at the options actually present, with values stripped (`--comments=true` counts as `--comments`) and declared clusters expanded (`-wc` carries `-c`); tokens after `--` are positionals and count as absent. An option the command database does not declare still counts, so `except_option: [-c]` separates `python3 script.py` from `python3 -c '...'`. `any_arg_matches` is a Python `re.search` over every argument token — a pattern written for `grep -E` needs `\S` rather than `[^[:space:]]`. `via` lists the enclosing wrappers, outermost first.
81
81
 
82
82
  **Two things a caller has to check.** First, `parse_warnings` is always present: when it
83
83
  is non-empty the expression could not be fully parsed, so an empty `matches` proves nothing
@@ -92,6 +92,60 @@ Exit codes are `0` whether or not anything matched, `1` for empty input or no in
92
92
  5 seconds, and `2` for bad arguments, an unreadable or invalid rules file, or an internal
93
93
  error.
94
94
 
95
+ ## Sensitive paths
96
+
97
+ Classification says what a command does to the system. It says nothing about what the command touches. Reading a private key really is read-only, so `cat ~/.ssh/id_rsa` is `READONLY`, and anything that auto-approves on `risk: LOW` auto-approves it.
98
+
99
+ So every argv token and every redirect target is checked against a denylist of paths that hold credentials. A hit leaves classification alone and floors `risk` at `HIGH`.
100
+
101
+ The list covers SSH and GPG keys, cloud and cluster credentials, `.env` files, `.netrc` and `.npmrc`, `.git-credentials`, `.pgpass` and `.my.cnf`, and the token stores of command-line tools: `~/.claude.json`, `~/.config/gh/hosts.yml` and `~/.config/glab-cli/config.yml`. Settings files are not on it. `~/.aws/config`, `.git/config`, `~/.gitconfig` and `~/.config/gh/config.yml` are routine debugging and stay `LOW`.
102
+
103
+ ```bash
104
+ $ echo 'cat ~/.ssh/id_rsa' | bash-classify | jq '{classification, risk, sensitive_paths}'
105
+ {
106
+ "classification": "READONLY",
107
+ "risk": "HIGH",
108
+ "sensitive_paths": [
109
+ {
110
+ "token": "~/.ssh/id_rsa",
111
+ "rule": "ssh",
112
+ "source": "argv",
113
+ "spelling": "literal"
114
+ }
115
+ ]
116
+ }
117
+ ```
118
+
119
+ `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
+
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.
122
+
123
+ 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
+
125
+ Nothing here reads the environment of the process doing the classifying. `~` and `$HOME` stay unresolved segments, so the verdict depends on the expression alone and a hook gives the same answer whatever `HOME` it runs under.
126
+
127
+ A rule can exempt specific files. The bundled `dotenv` rule exempts the template names projects commit on purpose — `.env.example`, `.env.sample`, `.env.template`, `.env.dist`, `.env.defaults` — while `.env`, `.env.local` and `.env.production` stay hits.
128
+
129
+ Bare `env` and `printenv` are reported with `source: "env_dump"`. They print every variable, which is where an agent's API keys live. An argument that names a secret-bearing variable is reported as well: `$GITHUB_TOKEN` and `${ANTHROPIC_API_KEY}` under any command, and a bare `ANTHROPIC_API_KEY` only under `env`, `printenv`, `export` and `unset`. Everywhere else a bare all-caps word is a search string, so `grep -rn TOKEN src` is not a hit.
130
+
131
+ **This is a speed bump against an agent being careless, not a control against one being evaded.** It raises the cost of an accident. Anyone who knows the rule can walk around it, and [SPEC.md](SPEC.md) lists how. The short version: a path computed at runtime is invisible to a static matcher, and a glob with fewer than two literal characters is ignored on purpose, so `cat .*` is not reported — a rule that fires on `ls *` is a rule people switch off.
132
+
133
+ It also over-reports in one direction. A token that only *mentions* a path is a hit, so `git commit -m "document ~/.ssh/config setup"` and `grep -rn "\.ssh/config" docs/` are both reported. This is the opposite of what `match` mode does, where a `grep` pattern that names a command is not an invocation. The two are not alike: telling a path a command opens from one it merely carries needs per-command argument knowledge that the database does not have.
134
+
135
+ Extend the denylist at `~/.config/bash-classify/sensitive-paths.yaml`, or at `$BASH_CLASSIFY_CONFIG_DIR/sensitive-paths.yaml`. It uses the same format as the bundled `src/bash_classify/sensitive-paths.yaml`, validated against a [JSON Schema](schemas/sensitive-paths.schema.json):
136
+
137
+ ```yaml
138
+ rules:
139
+ - name: company-vault
140
+ paths:
141
+ - .acme/vault
142
+ - .config/acme/token
143
+ except_paths:
144
+ - .acme/vault/README
145
+ ```
146
+
147
+ A rule there is added to the bundled set. A rule that reuses a bundled name replaces it, which is how you narrow or drop one.
148
+
95
149
  ## Claude Code plugin
96
150
 
97
151
  The repo includes a Claude Code plugin that auto-allows low-risk bash commands via a `PreToolUse` hook.
@@ -113,7 +167,7 @@ claude plugin marketplace update fprochazka-bash-classify
113
167
  claude plugin update bash-classify-hook@fprochazka-bash-classify
114
168
  ```
115
169
 
116
- Once installed, any Bash tool call with `risk: LOW` is auto-approved — no permission prompt. This includes all `READONLY` commands plus safe routine operations like `git add`, `git commit`, `mkdir`, package installs, code formatters, and more. Commands with `MEDIUM` or `HIGH` risk still require confirmation.
170
+ Once installed, any Bash tool call with `risk: LOW` is auto-approved — no permission prompt. This includes all `READONLY` commands plus safe routine operations like `git add`, `git commit`, `mkdir`, package installs, code formatters, and more. Commands with `MEDIUM` or `HIGH` risk still require confirmation. A command that names a sensitive path is never `LOW`, so the hook prompts for it even when the command itself is read-only.
117
171
 
118
172
  ## Command database
119
173
 
@@ -151,9 +205,11 @@ Risk defaults are derived from classification (`READONLY`→LOW, `LOCAL_EFFECTS`
151
205
  - **Tree-sitter parsing** -- bash expressions are parsed into an AST for accurate command extraction, handling pipes, subshells, and command substitution
152
206
  - **YAML command database** -- each command has classification rules with subcommand and option matching
153
207
  - **Subcommand matching** -- `kubectl get` and `kubectl delete` can have different classifications
208
+ - **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
154
209
  - **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
155
210
  - **Delegation for wrappers** -- commands like `xargs`, `sudo`, and `env` delegate classification to the inner command
156
- - **File path detection** -- redirect operators (`>`, `>>`, `<`) are parsed into `write_paths`/`read_paths` in the output; writes to `/tmp` and `/var/tmp` stay at LOW risk
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
212
+ - **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`
157
213
 
158
214
  ## Python API
159
215
 
@@ -219,6 +219,7 @@ rules:
219
219
  command: [glab, mr, note] # required; prefix match on the resolved path
220
220
  except: [[glab, mr, note, list]] # optional; prefix paths excluded from the match
221
221
  any_option: [--comments, -c] # optional; at least one of these is present
222
+ except_option: [--web] # optional; none of these is present
222
223
  any_arg_matches: 'merge_requests/[^/?]+/notes' # optional; Python re.search
223
224
  ```
224
225
 
@@ -228,9 +229,10 @@ each other (OR), and one invocation may match several rules; each match is repor
228
229
  | Field | Meaning |
229
230
  |---|---|
230
231
  | `name` | Reported back on every match; must be unique within the file |
231
- | `command` | Prefix match against `command` — the *resolved* path, so `/usr/bin/glab --repo x mr note` matches `[glab, mr, note]` |
232
- | `except` | Prefix paths excluded from the match, so `[glab, mr, note]` can spare `glab mr note list` |
233
- | `any_option` | At least one of these must appear in `options`: as typed, values stripped, `--key=value` counting as `--key` and a declared cluster `-wc` counting as `-w` and `-c`. Tokens after `--` are positionals and never match |
232
+ | `command` | Prefix match against `command` — the *resolved* path, so `/usr/bin/glab --repo x mr note` matches `[glab, mr, note]`. Holds the binary and its subcommands only; an option in a command path is rejected at load time |
233
+ | `except` | Prefix paths excluded from the match, so `[glab, mr, note]` can spare `glab mr note list`. Same constraint on the path as `command` |
234
+ | `any_option` | At least one of these must appear in `options`: as typed, values stripped, `--key=value` counting as `--key` and a declared cluster `-wc` counting as `-w` and `-c`. Tokens after `--` are positionals and never match. An option the command database does not declare still appears in `options` and still counts |
235
+ | `except_option` | None of these may appear in `options`, matched exactly as `any_option` matches. Use it to exclude an invocation by the options it carries, which a command path cannot express |
234
236
  | `any_arg_matches` | Python `re.search` applied to every argument token: `argv[1:]` with the resolved subcommand words removed once each. Option flags, option values and positionals are all included; `argv[0]` and the subcommand words are not. A pattern written for `grep -E` needs `\S` instead of `[^[:space:]]` |
235
237
 
236
238
  A rule matches an invocation at any depth: top-level commands and, recursively, the inner
@@ -330,15 +332,15 @@ Certain expression-level patterns elevate risk to at least `HIGH`:
330
332
 
331
333
  #### Temp path risk lowering
332
334
 
333
- When all write targets from output redirects (`>`, `>>`, `2>`, `&>`, `>&`) are under `/tmp` or `/var/tmp`, the risk elevation to `MEDIUM` from output redirects is skipped. This allows commands like `cat > /tmp/foo.txt` to remain at `LOW` risk while still being classified as `LOCAL_EFFECTS`.
335
+ 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`.
334
336
 
335
337
  ### File path detection
336
338
 
337
339
  The tool extracts file paths from shell redirects:
338
340
 
339
- - **`write_paths`**: Files targeted by output redirects (`>`, `>>`, `2>`, `&>`, `>&`), excluding `/dev/null`, `/dev/stdin`, `/dev/stdout`, `/dev/stderr`, and `/dev/fd/*`.
340
- - **`read_paths`**: Files targeted by input redirects (`<`), excluding the same `/dev/*` paths.
341
- - Heredoc operators (`<<`, `<<<`) are not included — their target is a delimiter, not a file path.
341
+ - **`write_paths`**: Targets of output redirects, excluding `/dev/null`, `/dev/stdin`, `/dev/stdout`, `/dev/stderr`, and `/dev/fd/*`.
342
+ - **`read_paths`**: Targets of input redirects, excluding the same `/dev/*` paths.
343
+ - 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.
342
344
 
343
345
  Paths are reported at both the per-command level (`commands[].write_paths`, `commands[].read_paths`) and the expression level (aggregated from all commands).
344
346
 
@@ -377,7 +379,7 @@ The parser walks the CST and extracts a list of `CommandInvocation` objects, eac
377
379
  | Command substitution `$(cmd)` | Inner command extracted recursively |
378
380
  | Process substitution `<(cmd)` / `>(cmd)` | Inner command extracted recursively |
379
381
  | Subshells `(cmd)` | Inner command extracted recursively |
380
- | Heredocs `<<EOF` | Body is dropped entirely — it is never parsed as commands and never appears in any `argv`; only the operator and the delimiter are recorded as a redirect. Commands written *after* the opener on the same line (`cat <<EOF \| wc -l`, `cat <<EOF && rm x`) are extracted like any other pipeline or list member — tree-sitter nests them inside the heredoc node, but they are real commands. A `;` or `&` in that position is a tree-sitter parse error: the follower cannot be recovered and a `parse_warnings` entry says so |
382
+ | Heredocs `<<EOF` | Body is dropped entirely — it is never parsed as commands and never appears in any `argv`; only the operator and the delimiter are recorded as a redirect. File redirects written after the opener on the same line (`cat <<EOF > file`, `cat <<EOF > a 2> b`) are extracted as redirects of the command, identical to the reversed ordering `cat > file <<EOF`. Commands written after the opener (`cat <<EOF \| wc -l`, `cat <<EOF && rm x`) are extracted like any other pipeline or list member — tree-sitter nests them inside the heredoc node, but they are real commands. A `;` or `&` in that position is a tree-sitter parse error: the follower cannot be recovered and a `parse_warnings` entry says so |
381
383
  | Variable assignments `X=1 cmd` | Prefix assignments stripped, `cmd` extracted |
382
384
  | Backgrounding `cmd &` | Classified as EXTERNAL_EFFECTS (side effect: background process) |
383
385
 
@@ -398,7 +400,7 @@ This is the core of the tool. Given an `argv` like `["kubectl", "--context=prod"
398
400
 
399
401
  1. **Look up the binary** (`kubectl`) in the database
400
402
  2. **Separate global options** from the rest of `argv`, using the database definition of which options are global and whether they take a value
401
- 3. **Match the subcommand chain** from the remaining tokens (e.g. `get` → resolve to `kubectl.get`)
403
+ 3. **Match the subcommand chain** from the remaining tokens (e.g. `get` → resolve to `kubectl.get`), resolving any declared subcommand alias to its canonical name
402
404
  4. **Classify remaining options** against the matched subcommand's option definitions
403
405
  5. **Determine the final classification** based on subcommand default + any option overrides
404
406
 
@@ -451,6 +453,14 @@ The default mode. Subcommands are matched as a greedy chain through nested subco
451
453
 
452
454
  Example: `kubectl rollout status` matches `kubectl` → `rollout` → `status`, walking the tree.
453
455
 
456
+ #### Subcommand aliases
457
+
458
+ A subcommand may declare `aliases`. Every alias is another name for the same definition, so matching a word against a subcommand dictionary tries the canonical names and the aliases alike. What is reported is always the canonical name: `glab pipeline view 1000` yields `command: ["glab", "ci", "view"]` and `matched_rule: "glab.ci.view"`, while `argv` keeps `["glab", "pipeline", "view", "1000"]` — the word that was actually typed. Classification, options and `strict` behaviour are the canonical subcommand's, since it is literally the same definition.
459
+
460
+ This matters to `match` mode: a rule written as `command: [glab, ci, view]` catches the aliased spelling too, without listing it.
461
+
462
+ Aliases live in one namespace with their siblings. An alias that names a sibling subcommand, or that two siblings both claim, is rejected when the database file is loaded — the error names the file and the alias.
463
+
454
464
  #### `match_all`
455
465
 
456
466
  Each positional argument is matched independently against the **same** top-level subcommand dictionary. This is designed for build tools like Maven and Gradle where multiple goals/tasks appear as positional arguments in any order.
@@ -952,6 +962,14 @@ When command-level delegation resolves at least one inner command (and no option
952
962
  | `subcommand_mode` | `enum` | How subcommands are matched: `hierarchical` (default, chained tree walk) or `match_all` (each positional arg matched independently) |
953
963
  | `delegates_to` | `object` | How this command delegates execution to an inner command (see delegation modes) |
954
964
 
965
+ #### Subcommand level
966
+
967
+ A subcommand entry takes the same fields as the command level, minus `command` and `global_options` — its name is the key it is filed under — plus:
968
+
969
+ | Field | Type | Description |
970
+ |---|---|---|
971
+ | `aliases` | `list[str]` | Alternative names for this subcommand (e.g. `pipe` and `pipeline` for `glab ci`). Each alias resolves to this same definition; the resolved `command` path and `matched_rule` name the canonical subcommand, while `argv` keeps the word that was typed. An alias that collides with a sibling subcommand, or that two siblings both claim, is a load-time error. |
972
+
955
973
  #### Option level
956
974
 
957
975
  | Field | Type | Description |
@@ -964,17 +982,128 @@ When command-level delegation resolves at least one inner command (and no option
964
982
 
965
983
  ## Redirect Classification
966
984
 
967
- Output redirects affect the overall classification:
985
+ An output redirect elevates the classification to at least `LOCAL_EFFECTS`.
968
986
 
969
- | Redirect | Effect |
970
- |---|---|
971
- | `> file` | Elevates to at least `EXTERNAL_EFFECTS` |
972
- | `>> file` | Elevates to at least `EXTERNAL_EFFECTS` |
973
- | `> /dev/null` | No effect (discarding output is not a write) |
974
- | `2> file` / `2>> file` | Elevates to at least `EXTERNAL_EFFECTS` (unless `/dev/null`) |
975
- | `&> file` | Elevates to at least `EXTERNAL_EFFECTS` (unless `/dev/null`) |
976
- | `< file` | No effect (input redirect is reading) |
977
- | `\| tee file` | `tee` is classified as `EXTERNAL_EFFECTS` via its own database entry |
987
+ What counts as one is a shape, not a list. A write is `>` or `>>`, each with the leading
988
+ file descriptor and the `|` no-clobber override that bash allows, so `>`, `>|`, `1>`, `1>|`,
989
+ `2>>`, `4>|` and `10>` are one redirect to the classifier. `&>` and `&>>` redirect both
990
+ streams and count too, as does `>&` when its target is not a descriptor number.
991
+
992
+ Four shapes write nothing:
993
+
994
+ - `/dev/null` as the target, in any write form. Discarding output is not a write.
995
+ - A descriptor duplication: `>&` or `<&` whose target is a number, such as `2>&1`. The
996
+ target names a stream that is already open, not a file.
997
+ - An input redirect: `<`, again with an optional leading file descriptor.
998
+ - A heredoc (`<<`, `<<-`) or a herestring (`<<<`). The heredoc target is the delimiter word
999
+ and the herestring target is the text itself, so neither names a file.
1000
+
1001
+ `| tee file` is not a redirect. `tee` is classified through its own database entry.
1002
+
1003
+ ### Which command a redirect belongs to
1004
+
1005
+ A redirect belongs to the command it is written on. tree-sitter does not always nest it
1006
+ there: for `a && b > f` it makes the redirect a sibling of the whole `a && b` list, and for
1007
+ `{ a; b; } > f` a sibling of the whole group. In both the redirect goes to the last
1008
+ statement of what it was written on — `b` in each case. The same rule covers subshells
1009
+ (`( a; b ) > f`), loops (`for … done > f`) and groups that contain a pipeline
1010
+ (`{ a | b; } > f`, where the group's stdout is `b`'s stdout). A command that runs inside an
1011
+ argument is never a candidate, so `cat $(ls) > f` redirects `cat`, not `ls`.
1012
+
1013
+ Exactly one command gets the redirect.
1014
+
1015
+ **Known limitation.** For a group or a subshell, that one command is the last one, and the
1016
+ earlier commands in the group are then reported as if their stdout reaches the terminal. In
1017
+ `{ cat a; cat b; } > merged` a consumer asking about `cat a` is told its output reaches the
1018
+ terminal, and it does not — the group's stdout goes to `merged`.
1019
+
1020
+ Copying the redirect onto every command in the group would answer that question correctly,
1021
+ and it is rejected for two reasons. It makes `{ cat a > x; cat b; } > merged` report `cat a`
1022
+ with two stdout targets, and one command having two stdout targets is the shape a consumer
1023
+ uses to detect that the parser got attribution wrong — a correct parse would become
1024
+ indistinguishable from a broken one. It also writes the group's target into `write_paths`
1025
+ once per command in the group, so a three-command group writing one file reports three
1026
+ writes.
1027
+
1028
+ **Known limitation.** tree-sitter-bash 0.25.1 inverts operator precedence when a redirect
1029
+ sits on the last member of an and-or list that is then piped (tree-sitter/tree-sitter-bash#345). For
1030
+ `foo && cat f 2>/dev/null | head -80` it builds `(foo && cat f 2>/dev/null) | head -80`,
1031
+ where bash reads `foo && (cat f 2>/dev/null | head -80)`. The redirect is still attributed
1032
+ to `cat f` correctly, but `position_in_pipeline` and `pipeline_length` are not: `cat f`
1033
+ reports a pipeline of one standing immediately before `head -80`, which reports itself as
1034
+ stage 1 of 2. A `pipeline_length == 1` invocation immediately followed by one with
1035
+ `position_in_pipeline > 0` is the tell. The same shape appears without any `&&` when a
1036
+ redirected subshell is a pipeline stage, as in `( cat x ) > f | head`.
1037
+
1038
+ ## Sensitive Path Detection
1039
+
1040
+ Classification describes the scope of a command's side effects. It has no notion of what the command touches, so `cat ~/.ssh/id_rsa` is `READONLY` and, on the classification axis, correctly so. Risk is the axis for "how much should a human care". A token that names a credential therefore floors `risk` at `HIGH` and leaves `classification` alone.
1041
+
1042
+ The floor is deliberately **not** guarded by a minimum classification, unlike the system-path clamp in the same step. A read of a private key is the case this exists for.
1043
+
1044
+ ### What is scanned
1045
+
1046
+ - Every argv token of every invocation, at every delegation depth. `sudo cat`, `xargs cat`, `sh -c "cat …"`, `find . -exec cat {} \;`, `env cat` and `timeout 5 cat` are all covered.
1047
+ - Every redirect target whose operator names a file, in the write and read shapes given under [Redirect Classification](#redirect-classification). A `<<` target is the heredoc delimiter, a `<<<` target is the herestring text, and a `<&` target is a descriptor number, so none of the three is scanned. A file redirect on the same command as a heredoc is an ordinary write and is scanned regardless of whether it appears before or after the `<<` operator — both `cat > .env <<EOF` and `cat <<EOF > .env` hit.
1048
+
1049
+ Tokens are scanned one at a time and never joined, so `git config` is two words and not the path `.git/config`.
1050
+
1051
+ 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
+
1053
+ ### The denylist
1054
+
1055
+ Rules are data, in `src/bash_classify/sensitive-paths.yaml`, extended by `$BASH_CLASSIFY_CONFIG_DIR/sensitive-paths.yaml` or `~/.config/bash-classify/sensitive-paths.yaml`. A user rule is added to the bundled set; one that reuses a bundled name replaces it.
1056
+
1057
+ Each rule lists path spellings of the same secret. A path is a sequence of segments that has to appear in the token, in order and next to each other, and nothing is anchored — `~/.ssh/id_rsa`, `/home/me/.ssh/id_rsa` and `../.ssh/id_rsa` all hit the `ssh` rule. Segments are compared whole, which is why `.gitignore` and `.github` do not hit `.git`. A segment may carry a glob for a part that varies, such as the pid in `/proc/*/environ`.
1058
+
1059
+ A `.` segment is dropped and a `..` segment is resolved against the one before it, because they are what a path traversal is made of and neither names a directory of its own. Without that, `/etc/./shadow` has no two adjacent segments spelling `/etc/shadow` while the shell still opens the file. The resolution cuts both ways: `.ssh/../notes` opens `notes` and is correctly not a hit.
1060
+
1061
+ A rule may also list `except_paths`, which exempt a specific file from it. The bundled `dotenv` rule uses them for the template names projects commit on purpose — `.env.example`, `.env.sample`, `.env.template`, `.env.dist` and `.env.defaults` — while `.env`, `.env.local` and `.env.production` stay hits. A file genuinely named `.env.example` that does hold a secret is therefore not reported. The other choice is a gate that fires every time somebody opens a repository's template, and that gate gets switched off. An exemption never accepts a glob in the token: `fnmatch(".env.example", ".e*")` is true, so reading one backwards would let `cat .e*` exempt itself from the rule it just matched.
1062
+
1063
+ The bundled rules are `ssh`, `aws-credentials`, `gcloud`, `kube`, `dotenv`, `shadow`, `gpg`, `netrc`, `npmrc-pypirc`, `docker-config`, `agent-cli-config`, `git-credentials`, `db-credentials` and `proc-environ`. The bar for a rule is that the file holds a credential. `~/.aws/config`, `.git/config`, `~/.gitconfig` and `~/.config/gh/config.yml` hold settings and are deliberately absent, which is the same bar `docs/classification-guidance.md` sets for the command database.
1064
+
1065
+ `agent-cli-config` covers the token stores of command-line tools you log into once: `.claude.json`, `.config/gh/hosts.yml` and `.config/glab-cli/config.yml`. The name of a file does not say which of the two it is — glab keeps its token in `config.yml`, and gh keeps settings in a file of that name — so each tool is listed by the full path of its credential file and nothing else of that tool is listed. `git-credentials` covers `.git-credentials`, the file `git credential-store` writes with the password in the URL. `db-credentials` covers `.pgpass` and `.my.cnf`, where a database client password is kept so it stays off the command line.
1066
+
1067
+ ### The three readings of a token
1068
+
1069
+ A backslash means opposite things on the two platforms, and only reading a token both ways is safe. On POSIX an unquoted `\` is an escape, so `~/.s\sh/id_rsa` opens `~/.ssh/id_rsa`; on Windows it is a separator. Normalizing `\` to `/` for the Windows spelling is what *creates* the POSIX hole, because `.s\sh` then reads as the two segments `.s` and `sh` and matches nothing.
1070
+
1071
+ So every token is split three ways and a hit under any of them counts. `spelling` reports which one matched:
1072
+
1073
+ - `literal` — split on `/`, with a leading `~`, `~user`, `$HOME` or `${HOME}` resolved first. Quotes are already gone by this point: the parser hands over one token, so `~/.s'sh'/id_rsa` needs no special handling.
1074
+ - `posix_escape` — `\x` read as `x`, then split on `/`.
1075
+ - `windows` — split on `/` and `\`.
1076
+ - `glob` — not a fourth split, but a segment that matched in reverse. See below.
1077
+
1078
+ ### Globs
1079
+
1080
+ `cat ~/.ss?/id_rsa`, `~/.s*h/id_rsa`, `~/.[s]sh/id_rsa`, `cat .en?` and `cat .e*` all expand to the real file. They are caught by matching backwards: the denylisted name becomes the subject and the token's segment becomes the pattern, so `fnmatch(".ssh", ".ss?")` is true.
1081
+
1082
+ Bash spells bracket negation both `[!x]` and `[^x]`; fnmatch understands only the first. A leading `^` inside a bracket group is therefore rewritten before matching, or `~/.[^x]sh/id_rsa` reads as a literal `[^x]` and matches nothing while the shell opens the real key. Only a group that closes is rewritten: an unterminated `[` is a literal bracket to both, and a `^` that is not leading is an ordinary member of the group.
1083
+
1084
+ That rule needs a floor or it matches everything, because `fnmatch(".ssh", "*")` is also true. A segment is read as a pattern only when it carries at least **two** characters that are not `*`, `?`, `[` or `]`. `.e*` is the tightest real evasion and has exactly two, while `*`, `.*`, `?` and `**` fall below it. The cost is that `cat .*` is not reported. That is a deliberate trade: a rule that fires on `ls *` is a rule people switch off.
1085
+
1086
+ ### Environment dumps
1087
+
1088
+ Bare `env` and `printenv` print every variable, which is where an agent's API keys live. An invocation whose resolved binary is one of the two and whose `positionals` are empty is reported with `source: "env_dump"`, so `env | grep KEY` and `/usr/bin/printenv` are hits while `env FOO=1 make` and `printenv PATH` are not.
1089
+
1090
+ Separately, an argument that names a secret-bearing environment variable is reported under the rule `secret-env-var`. The name must be a conventional all-caps variable name, and one of its `_`-separated segments must be built from `API`, `SECRET`, `TOKEN`, `PASSWORD`, `KEY` or `CREDENTIAL`. Whole segments, so `APIKEY` and `CREDENTIALS` hit while `MONKEY` and `KEYBOARD` do not.
1091
+
1092
+ The `$NAME` and `${NAME}` forms count under any command, because the `$` says the token is a variable wherever it appears. A bare `API_KEY` counts only when the invocation's binary is `env`, `printenv`, `export` or `unset`. Everywhere else a bare all-caps word is a search string, and reporting `grep -rn TOKEN src` or `git log --grep TOKEN` is how a gate ends up switched off.
1093
+
1094
+ ### What this does not catch
1095
+
1096
+ Name these when you describe the feature, so nobody reads it as stronger than it is. All of them defeat any static matcher:
1097
+
1098
+ - Command substitution: `cat $(find ~ -name id_rsa)`. A substitution whose text happens to spell the path is still seen, because the token carries the segments, but that is an accident and not a guarantee.
1099
+ - A path held in a variable: `P=~/.ssh/id_rsa; cat "$P"`.
1100
+ - Encoding detours: `base64`, `xxd`, `rev`, or a `sed` that reassembles the path.
1101
+ - 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.
1103
+ - 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
+ - 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
+
1106
+ **This is a speed bump against an agent being careless, not a control against one being evaded.** It raises the cost of an accident. It does not stop an attacker who knows the rule.
978
1107
 
979
1108
  ## Directory Detection
980
1109
 
@@ -1044,6 +1173,14 @@ The `commands` list below is recursive — any command entry can contain `inner_
1044
1173
  "directories": ["string — detected directories"],
1045
1174
  "write_paths": ["string — files targeted by output redirects (optional, omitted when empty)"],
1046
1175
  "read_paths": ["string — files targeted by input redirects (optional, omitted when empty)"],
1176
+ "sensitive_paths": [
1177
+ {
1178
+ "token": "string — the argv token or redirect target, exactly as written",
1179
+ "rule": "string — the denylist entry that matched, e.g. ssh",
1180
+ "source": "argv | redirect_read | redirect_write | env_dump",
1181
+ "spelling": "literal | posix_escape | windows | glob"
1182
+ }
1183
+ ],
1047
1184
  "commands": [
1048
1185
  {
1049
1186
  "command": ["string — binary + subcommand chain (without inner command tokens)"],
@@ -1058,6 +1195,7 @@ The `commands` list below is recursive — any command entry can contain `inner_
1058
1195
  "overriding_option": "string | null — the option that elevated classification",
1059
1196
  "write_paths": ["string — files targeted by output redirects (optional, omitted when empty)"],
1060
1197
  "read_paths": ["string — files targeted by input redirects (optional, omitted when empty)"],
1198
+ "sensitive_paths": ["... — this command's own hits plus its inner commands'; always present, empty when none"],
1061
1199
  "inner_commands": [
1062
1200
  {
1063
1201
  "delegation_mode": "string — how this inner command was extracted",
@@ -1068,6 +1206,7 @@ The `commands` list below is recursive — any command entry can contain `inner_
1068
1206
  "matched_rule": "...",
1069
1207
  "options": ["... — same meaning as on the enclosing command"],
1070
1208
  "positionals": ["... — same meaning as on the enclosing command"],
1209
+ "sensitive_paths": ["... — same meaning as on the enclosing command"],
1071
1210
  "inner_commands": ["... — recursive, can nest further"]
1072
1211
  }
1073
1212
  ]
@@ -1108,6 +1247,16 @@ option in the database fixes both.
1108
1247
  `positionals` holds the non-option tokens that remain once the subcommand chain and the options have been
1109
1248
  consumed, including `--` itself and everything after it.
1110
1249
 
1250
+ #### `sensitive_paths`
1251
+
1252
+ Always serialized, as `[]` when nothing matched, at the expression level and on every command and inner command.
1253
+ A caller can therefore tell a clean verdict from the output of a binary that predates the feature: a *missing*
1254
+ `sensitive_paths` key means the latter. Never read a missing key as "nothing matched".
1255
+
1256
+ A hit floors `risk` at `HIGH` on the level that carries it and on every level above it, up to the expression.
1257
+ `classification` is not touched. See [Sensitive Path Detection](#sensitive-path-detection) for what is scanned
1258
+ and what is missed.
1259
+
1111
1260
  Both are always serialized, as `[]` when the command has none. Results that never reach option parsing — shell
1112
1261
  builtins, an unknown binary, an empty argv — carry `null` internally and serialize as `[]`.
1113
1262
 
@@ -1129,7 +1278,9 @@ builtins, an unknown binary, an empty argv — carry `null` internally and seria
1129
1278
  - **Not a sandbox.** This is a classifier, not an enforcer. It does not execute or block anything. `match` mode is no exception: it reports which declared command shapes an expression invokes, and the caller decides what to do about it.
1130
1279
  - **No awk/sed/perl script analysis.** These are classified as a whole command; their embedded programs are opaque. They should simply not be in the READONLY allowlist.
1131
1280
  - **No variable resolution.** `$DIR`, `$(cmd)` in command position → UNKNOWN. We classify what we can see statically.
1132
- - **No alias/function resolution.** We classify the literal command name as written.
1281
+ - **No shell alias/function resolution.** We classify the literal command name as written.
1282
+ - **Sensitive path detection is a speed bump, not a control.** It raises the cost of an accident by a careless agent. It does not stop one that is being evaded: a path computed at runtime, held in a variable, or reassembled through an encoding detour is invisible to it, and so is a glob below the two-character floor. The section above lists the whole set.
1283
+ - **No read/write direction for an `argv` hit.** Separating `cat X` from `tee X` needs per-command read/write knowledge in the database. `source` reports where the token came from and the caller decides.
1133
1284
 
1134
1285
  ## Future extensions
1135
1286
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bash-classify-hook",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Auto-allows low-risk bash commands in Claude Code using bash-classify",
5
5
  "author": {
6
6
  "name": "Filip Prochazka"
@@ -84,6 +84,25 @@ options: # options that affect classification
84
84
  | `subcommands` | map | -- | Nested subcommand definitions (recursive) |
85
85
  | `delegates_to` | object | -- | How the command hands off to an inner command |
86
86
 
87
+ #### Subcommand fields
88
+
89
+ A subcommand takes the same fields as the top level, minus `command`, `description` and `global_options`, plus:
90
+
91
+ | Field | Type | Description |
92
+ |-------|------|-------------|
93
+ | `aliases` | list | Alternative names for this subcommand (e.g. `pipe` and `pipeline` for `glab ci`) |
94
+
95
+ An alias is another name for the same definition, not a copy of it: `glab pipeline view` classifies exactly as `glab ci view` and is reported as `["glab", "ci", "view"]`, while `argv` keeps the word that was typed. Declare aliases only for names the tool itself accepts (`glab ci --help` lists `pipe` and `pipeline`), and never a name a sibling subcommand already uses — that is rejected when the file loads.
96
+
97
+ ```yaml
98
+ subcommands:
99
+ ci:
100
+ aliases: [pipe, pipeline]
101
+ subcommands:
102
+ list:
103
+ classification: READONLY
104
+ ```
105
+
87
106
  #### Option fields
88
107
 
89
108
  | Field | Type | Description |
@@ -489,13 +508,36 @@ subcommands:
489
508
 
490
509
  ## 10. Temp Path Risk Behavior
491
510
 
492
- When a command writes to a file via output redirects (`>`, `>>`, `2>`, `&>`, `>&`), its risk is normally elevated to at least `MEDIUM`. However, if **all** write targets are under `/tmp` or `/var/tmp`, the risk elevation is skipped and the command stays at `LOW` risk (assuming no other risk elevations apply).
511
+ When a command writes to a file via an output redirect, its risk is normally elevated to at least `MEDIUM`. If **all** write targets are under `/tmp` or `/var/tmp`, the elevation is skipped and the command stays at `LOW` risk, as long as nothing else elevates it. Which operators count as a write is given in [SPEC.md](../SPEC.md#redirect-classification).
493
512
 
494
513
  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`.
495
514
 
496
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.
497
516
 
498
- ## 11. Common Patterns
517
+ ## 11. Sensitive Paths
518
+
519
+ Credential paths are **not** part of the command database, and you should not try to express them there. A command definition says what a command does; it never says which of its arguments are paths, let alone which of those hold secrets. The two questions are separate and are answered in separate files.
520
+
521
+ The denylist lives in `src/bash_classify/sensitive-paths.yaml`, validated against `schemas/sensitive-paths.schema.json`. A token that matches one of its rules floors the command's risk at `HIGH` and leaves its classification alone, so `cat ~/.ssh/id_rsa` stays `READONLY` and stops being auto-approved.
522
+
523
+ Two consequences when you write a command definition:
524
+
525
+ - Do not lower a command's risk to work around a sensitive-path hit. The hit is a floor and is applied after your definition; a `risk: LOW` on `cat` does not undo it, and the hook prompts either way.
526
+ - Do not add a rule to the denylist for a path that is merely uninteresting to read. Every false positive is a reason for somebody to switch the whole gate off. A rule belongs there when the file holds a credential. That is why `~/.aws/credentials` and `~/.config/gh/hosts.yml` are on the list, while `~/.aws/config`, `.git/config` and `~/.config/gh/config.yml` are not.
527
+
528
+ Add a rule when a tool you define keeps its credentials somewhere the bundled rules miss. Match whole segments, keep the segments literal, and give the rule a name that says what the secret is:
529
+
530
+ ```yaml
531
+ rules:
532
+ - name: acme-cli
533
+ paths:
534
+ - .acme/credentials
535
+ - .config/acme/token
536
+ ```
537
+
538
+ See the "Sensitive Path Detection" section of [SPEC.md](../SPEC.md) for how tokens are read and what the feature deliberately misses.
539
+
540
+ ## 12. Common Patterns
499
541
 
500
542
  | Pattern | Example | Classification |
501
543
  |---------|---------|---------------|