bash-classify 0.13.0__tar.gz → 0.14.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.
- {bash_classify-0.13.0 → bash_classify-0.14.0}/.claude-plugin/marketplace.json +1 -1
- {bash_classify-0.13.0 → bash_classify-0.14.0}/.gitignore +3 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/PKG-INFO +1 -1
- {bash_classify-0.13.0 → bash_classify-0.14.0}/SPEC.md +17 -1
- {bash_classify-0.13.0 → bash_classify-0.14.0}/coding-agent-plugins/claude-code/.claude-plugin/plugin.json +1 -1
- {bash_classify-0.13.0 → bash_classify-0.14.0}/docs/classification-guidance.md +61 -4
- {bash_classify-0.13.0 → bash_classify-0.14.0}/schemas/command.schema.json +4 -0
- bash_classify-0.14.0/scripts/audit-missing-base.py +94 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/classifier.py +123 -6
- bash_classify-0.14.0/src/bash_classify/commands/apt.yaml +42 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/brew.yaml +9 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/cargo.yaml +13 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/docker.yaml +17 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/gh.yaml +24 -1
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/git.yaml +136 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/glab-discussion.yaml +3 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/glab.yaml +44 -1
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/go.yaml +7 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/helm.yaml +8 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/kubectl.yaml +4 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/mise.yaml +28 -8
- bash_classify-0.14.0/src/bash_classify/commands/npm.yaml +141 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/npx.yaml +8 -2
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/pip.yaml +6 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/pip3.yaml +6 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/pipx.yaml +5 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/pnpm.yaml +14 -8
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/poetry.yaml +15 -1
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/pup.yaml +1 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/rtk.yaml +4 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/ruff.yaml +4 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/slack.yaml +11 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/snip.yaml +4 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/uv.yaml +15 -1
- bash_classify-0.14.0/src/bash_classify/commands/yarn.yaml +104 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/database.py +101 -8
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/matcher.py +63 -3
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/models.py +8 -0
- bash_classify-0.14.0/tests/fixtures/match/glab-discussion/block/env-end-of-options-mr-note.sh +1 -0
- bash_classify-0.14.0/tests/fixtures/match/glab-discussion/block/sudo-end-of-options-mr-note.sh +1 -0
- bash_classify-0.14.0/tests/fixtures/match/glab-discussion/block/timeout-end-of-options-mr-note.sh +1 -0
- bash_classify-0.14.0/tests/fixtures/match/glab-discussion/block/xargs-end-of-options-mr-note.sh +1 -0
- bash_classify-0.14.0/tests/test_classifier.py +2341 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_database.py +76 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_matcher.py +19 -15
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_real_world.py +3 -2
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_rules.py +40 -0
- bash_classify-0.13.0/src/bash_classify/commands/apt.yaml +0 -25
- bash_classify-0.13.0/src/bash_classify/commands/npm.yaml +0 -71
- bash_classify-0.13.0/src/bash_classify/commands/yarn.yaml +0 -72
- bash_classify-0.13.0/tests/test_classifier.py +0 -1111
- {bash_classify-0.13.0 → bash_classify-0.14.0}/.claude/rules/command-database.md +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/.editorconfig +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/.github/workflows/ci.yml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/.github/workflows/publish.yml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/.python-version +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/CLAUDE.md +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/LICENSE +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/README.md +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/coding-agent-plugins/claude-code/hooks/hook-permission-request.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/coding-agent-plugins/claude-code/hooks/hook-pre-tool-use.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/coding-agent-plugins/claude-code/hooks/hooks.json +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/pyproject.toml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/ruff.toml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/schemas/match-rules.schema.json +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/schemas/sensitive-paths.schema.json +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/__init__.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/__main__.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/cli.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/agent-browser.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/awk.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/basename.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/bash-classify.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/bash.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/black.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/builtin.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/cat.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/chgrp.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/chmod.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/chown.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/column.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/comm.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/command.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/cp.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/curl.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/cut.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/date.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/df.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/diff.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/dig.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/dirname.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/du.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/echo.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/env.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/eslint.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/eval.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/exec.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/expand.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/false.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/file.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/find.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/fmt.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/fold.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/free.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/gawk.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/gcloud.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/gog.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/gradle.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/gradlew.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/grep.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/groups.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/gunzip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/gws.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/gzip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/hadolint.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/head.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/hostname.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/id.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/install.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/isort.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/java.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/javac.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/join.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/journalctl.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/jq.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/kill.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/killall.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/less.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/ln.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/ls.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/make.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/md5sum.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/mkdir.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/more.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/mv.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/mvn.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/mvnw.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/mypy.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/netstat.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/nice.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/nl.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/node.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/nohup.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/nslookup.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/paste.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/ping.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/pkill.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/prettier.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/printenv.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/printf.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/ps.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/pwd.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/pytest.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/python.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/python3.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/read.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/readlink.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/realpath.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/rev.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/rg.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/rm.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/rsync.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/scp.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/sed.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/seq.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/sh.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/sha1sum.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/sha256sum.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/shellcheck.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/sleep.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/sort.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/ss.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/ssh.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/stat.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/stdbuf.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/strace.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/strings.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/sudo.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/systemctl.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/tac.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/tail.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/tar.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/tee.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/terraform.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/test.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/time.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/timeout.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/top.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/touch.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/tr.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/traceroute.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/true.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/tsc.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/type.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/uname.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/unexpand.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/uniq.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/unzip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/uptime.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/wait.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/wc.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/wget.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/whereis.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/which.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/whoami.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/xargs.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/xmllint.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/yes.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/yq.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/zip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/commands/zsh.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/parser.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/py.typed +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/redirects.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/rules.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/sensitive-paths.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/src/bash_classify/sensitive.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/__init__.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/conftest.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-award-emoji.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-include-diverged.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-itself.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-pipelines-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-update-description.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/api-project-lookup.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/ci-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/comment-only-mention.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/echo-mentions-api-endpoint.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/echo-mentions-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/git-commit-heredoc-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/git-commit-inline-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read-and-api-mr.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/glab-pipeline-inspect.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/grep-pattern-mentions-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/grep-recursive-for-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-2026-09-04.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-mentions-blocked-commands.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/heredoc-report-mentions-blocked.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-custom-delimiter.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-phrase-split-across-lines.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/hook-self-test-json-payload.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/loop-over-quoted-command-strings.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/mr-note-list-output-json.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/mr-note-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/mr-update-then-view.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/mr-view-bare.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/mr-view-grep-pipeline.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/mr-view-output-equals-json.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/mr-view-output-json.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/mr-view-output-short-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/printf-mentions-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/python-heredoc-triple-quoted-mention.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/allow/ripgrep-pattern-args.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-absolute-binary-path.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-delete-note-nested-api.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-cd-and-prefix.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-export-host-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-for-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-heredoc-then-call.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-hostname-python-consumer.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-line-continuation.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-method-get-field.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-output-ndjson.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate-before-path.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-per-page-query.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-quoted-paginate-jq.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-redirect-to-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-repo-flag-first.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-discussions-var-capture.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-edit-note-put-heredoc.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-input-stdin.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-position-fields.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-note-award-emoji.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-note-by-id-or-retry.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-notes-after-allowed-mr-view.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-notes-query-sort.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-notes-timeout-prefix.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-reply-method-post-after-path.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-reply-post-body-from-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-reply-post-heredoc-body.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-resolve-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-resolve-put-field.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/api-single-discussion-by-id.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/heredoc-then-and-chain-to-blocked.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/heredoc-then-pipe-to-blocked.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-note-custom-heredoc-delimiter.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-note-help.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-note-heredoc-body.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-note-inline-after-mr-update.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-note-long-message-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-note-repo-before-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-note-second-in-pipeline.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-note-then-close.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-bare.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-no-iid.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-page-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-repo-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-cluster.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/wrapper-bash-c.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/block/wrapper-sudo.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-discussion/rules.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-without-trace.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-xargs.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-itself.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list-per-page.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-bash-c.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-ref.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-single-quoted.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/ci-lint-local-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/ci-list-per-page.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/ci-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/ci-status-compact.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/ci-status-pipeline-id.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/comment-only-mention.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/echo-mentions-ci-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/git-commit-heredoc-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/git-commit-inline-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/glab-discussion-read.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/glab-pipeline-inspect.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/grep-pattern-mentions-ci.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/heredoc-brief-mentions-ci-commands.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/heredoc-skill-mentions-ci.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/loop-over-quoted-command-strings.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/printf-mentions-ci-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/allow/ripgrep-pattern-args.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-continuation-lines.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-input-and-header.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-method-post-field.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-raw-field-cat.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-after-allowed-metadata.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-env-assignment.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-redirect-to-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-retry-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-xargs.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-detail.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-env-assignment.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-hostname-after-path.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-comment-and-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-nested-loop-timeout.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-paginate-ndjson.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-python-consumer.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-scope-failed-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-status-poll-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-test-report.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-get-after-allowed-status.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-in-echo-chain.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-ref-sleep-prefix.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-get-json-jq-sort-uniq.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-get-then-ci-trace.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-get-var-capture-poll-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-get-with-job-details-repo.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-job-name-with-pipeline.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-pipeline-id-before-job-name.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-redirect-to-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-repo-before-job-id.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-view-help.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-view-job-web-or-api.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/ci-view-pipeline-id.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/heredoc-then-pipe-to-blocked.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/pipe-get-alias.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/pipeline-view-alias.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/wrapper-bash-c.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/block/wrapper-sudo.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/fixtures/match/glab-pipeline/rules.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_cli.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_cli_serialization.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_match_fixtures.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_models.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_output_paths.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_parser.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_public_api.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_schema.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_sensitive_paths.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/tests/test_smoke.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.14.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: bash-classify
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.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
|
|
@@ -330,6 +330,22 @@ Certain expression-level patterns elevate risk to at least `HIGH`:
|
|
|
330
330
|
- Backgrounding (`cmd &`)
|
|
331
331
|
- Output redirects to non-`/dev/null` targets (except when all write targets are under `/tmp` or `/var/tmp`)
|
|
332
332
|
|
|
333
|
+
The system-path elevation reads the operands of a command, never the program it runs. `argv[0]` is the binary being executed rather than a path the command writes to, so `/usr/bin/git add a.txt` gets exactly the verdict `git add a.txt` gets. The exemption covers the program word of every command in the expression, not only the outermost one: a wrapper carries the words of the command it runs in its own argv, so `sudo /usr/bin/git add a.txt` is scanned as `['sudo', '/usr/bin/git', 'add', 'a.txt']` and both `sudo` and `/usr/bin/git` are exempt. Each exempt word is consumed once, so a program word spelled a second time as an operand still counts and `/usr/bin/git add /usr/bin/git` stays `DANGEROUS`.
|
|
334
|
+
|
|
335
|
+
A script handed to a shell is a token holding a whole command line, not a path. `sh -c '/usr/bin/touch /etc/passwd'` would otherwise be read as a path under `/usr/bin`, because the scan compares whole tokens against directory prefixes and only the script's leading word — the program — ever made it look like one. So the script token is not scanned as a path, and **the commands parsed out of it are scanned instead**, each against its own program word and each guarded by its own classification the way a top-level command is. Classification is delegated to the inner commands; this elevation is not, so without that second scan the operands inside a script would be checked nowhere.
|
|
336
|
+
|
|
337
|
+
The consequence is that `sh -c 'X'` gets the verdict `X` gets, in both directions. `sh -c '/usr/bin/git add a.txt'` is `LOCAL_EFFECTS`/`LOW`, and `sh -c 'mkdir -p /usr/lib/x'` is `DANGEROUS`/`HIGH` exactly as `mkdir -p /usr/lib/x` is. In `sh -c 'cat /etc/hosts && touch x'` the `cat` sits below `LOCAL_EFFECTS`, so its `/etc/hosts` is not a hit and the expression stays `LOCAL_EFFECTS` — again what the bare spelling gives.
|
|
338
|
+
|
|
339
|
+
Two limits are worth stating. A script reaches this scan only when the delegating option is recognised, so a clustered shell flag (`bash -lc '...'`) parses no inner command at all and the token is scanned as a path instead. For `sh`, `bash` and `zsh` that is unobservable: they are `DANGEROUS` from their own definitions, and the elevation is gated on the command not already being `DANGEROUS`, so nothing the path scan finds there changes the verdict. For a command declared in a user database with this delegation mode and no `DANGEROUS` floor, the clustered spelling is a genuine miss — `X -c 'mkdir -p /usr/lib/x'` is `DANGEROUS`/`HIGH` and `X -lc 'mkdir -p /usr/lib/x'` is whatever `X` itself is. The second limit is that a redirect written *inside* a script is dropped before the inner command is classified, so `sh -c 'grep foo /etc/hosts > out'` is `READONLY` while the bare `grep foo /etc/hosts > out` is `DANGEROUS`. Both gaps predate this rule and neither is about system paths.
|
|
340
|
+
|
|
341
|
+
The exemption applies to a program word, so it is given only where the inner command really begins with one. The matcher strips `{}` placeholders before building a `find -exec` inner's argv, so in `find . -exec {} /usr/bin/git add \;` the inner `argv[0]` is `/usr/bin/git` — an argument handed to each file `find` matched, not the program being run — and nothing is exempt there. `find . -exec /bin/cp {} /usr/bin/x \;` still exempts `/bin/cp` and still reports `/usr/bin/x`.
|
|
342
|
+
|
|
343
|
+
Both kinds of skip are consumed once, never matched by value. A program word spelled again as an operand counts, and so does an operand that happens to read the same as the script text: `nohup sh -c /bin/ls /bin/ls` runs the first `/bin/ls` as the script and hands it the second as an argument, and the second is a hit.
|
|
344
|
+
|
|
345
|
+
For `args_are_expression` delegation the exemption applies only when the whole script is a single token. `eval 'cp a /usr/bin/b'` exempts that token and scans the `cp` parsed out of it; `eval cp a /usr/bin/b` spreads the script over several tokens, none of which is the script, so every token stays scannable.
|
|
346
|
+
|
|
347
|
+
Redirect targets are unaffected by any of this: `echo x > /etc/hosts` is still `DANGEROUS`.
|
|
348
|
+
|
|
333
349
|
#### Temp path risk lowering
|
|
334
350
|
|
|
335
351
|
When every write target of an expression is under `/tmp` or `/var/tmp`, the risk elevation to `MEDIUM` from output redirects is skipped. `cat > /tmp/foo.txt` stays at `LOW` risk and is still classified as `LOCAL_EFFECTS`. The lowering applies to every write form equally, so `1> /tmp/foo.txt` gets the same verdict as `> /tmp/foo.txt`.
|
|
@@ -927,7 +943,7 @@ The `delegates_to` field defines how a command (or option like `find -exec`) han
|
|
|
927
943
|
|
|
928
944
|
| Mode | How the inner argv is extracted | Example |
|
|
929
945
|
|---|---|---|
|
|
930
|
-
| `rest_are_argv` | All remaining positional args after the wrapper's own options are consumed. The first positional arg is the binary, the rest are its arguments. | `xargs grep -r foo` → inner: `["grep", "-r", "foo"]` |
|
|
946
|
+
| `rest_are_argv` | All remaining positional args after the wrapper's own options are consumed. The first positional arg is the binary, the rest are its arguments. One `--` is skipped as the wrapper's own end-of-options marker, but only where it precedes every operand of the wrapper — past that point the wrapper's option parser has stopped and the `--` is the program word, which is why `env FOO=bar -- ls` and `timeout 5 -- ls` exit 127 on a real shell. | `xargs grep -r foo` → inner: `["grep", "-r", "foo"]`; `sudo -- rm -rf /` → inner: `["rm", "-rf", "/"]`; `timeout -- 5 ls` → inner: `["ls"]`; `timeout 5 -- ls` → inner: `["--", "ls"]` |
|
|
931
947
|
| `after_separator` | Everything after the `separator` token forms the inner argv. | `kubectl exec pod -- ls -la` → inner: `["ls", "-la"]` |
|
|
932
948
|
| `terminated_argv` | Tokens after the flag up to `terminator` form the inner argv. `{}` tokens are stripped (they are `find` placeholders). | `find . -exec rm {} \;` → inner: `["rm"]` |
|
|
933
949
|
| `flag_value_is_expression` | The value of the specified `flag` is a complete shell expression string, parsed from scratch through the bash parser (not just tokenized as argv). | `sh -c "ls \| grep foo"` → inner expression: `ls \| grep foo` (two piped commands) |
|
|
@@ -79,7 +79,7 @@ options: # options that affect classification
|
|
|
79
79
|
| `description` | string | -- | Short one-liner describing the tool |
|
|
80
80
|
| `classification` | enum | `READONLY` | Base classification when no subcommand matches |
|
|
81
81
|
| `strict` | boolean | `true` | If true, unrecognized options yield UNKNOWN |
|
|
82
|
-
| `global_options` | map | -- | Options
|
|
82
|
+
| `global_options` | map | -- | Options that belong to the binary rather than to one subcommand. Stripped before subcommand matching, and re-checked afterwards, so an entry here **applies at every subcommand depth** -- see [Global options apply at every depth](#global-options-apply-at-every-depth) |
|
|
83
83
|
| `options` | map | -- | 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 |
|
|
@@ -112,6 +112,7 @@ subcommands:
|
|
|
112
112
|
| `overrides` | enum | When present, override classification to this level |
|
|
113
113
|
| `captures_directory` | boolean | The option's value is a directory the command is pointed at: a working directory (`git -C`) or an extraction destination (`tar -C`, `unzip -d`). It lands in the `directories` of the invocation that carries the option, wrapped or not. The expression-level `directories` picks it up only for a top-level invocation. |
|
|
114
114
|
| `names_output_path` | boolean | The option's value is a path the command writes (`curl -o`, `sort -o`). It lands in `write_paths`. |
|
|
115
|
+
| `before_subcommand_only` | boolean | `global_options` only: the tool honours this option ahead of its subcommand and not after one (`docker -v` is `--version`; `docker compose down -v` is `--volumes`). |
|
|
115
116
|
| `delegates_to` | object | This option triggers delegation (e.g. `find -exec`) |
|
|
116
117
|
|
|
117
118
|
##### Marking an option as an output path
|
|
@@ -124,6 +125,29 @@ subcommands:
|
|
|
124
125
|
|
|
125
126
|
A consumer uses the field to tell a write to a credential from a mention of one, so a wrong mark is worse than a missing one. When in doubt, leave it off.
|
|
126
127
|
|
|
128
|
+
### Global options apply at every depth
|
|
129
|
+
|
|
130
|
+
`global_options` is stripped ahead of subcommand matching, and the leftovers are re-checked against it afterwards so that `kubectl apply --help` works. Both halves mean the same thing: **an entry in `global_options` is claimed to be valid, and to mean the same thing, at every subcommand depth of the file.** Before adding one -- especially an `overrides` -- run it against the real binary *with a subcommand*, not just bare. Bare is the spelling that always works and it proves nothing.
|
|
131
|
+
|
|
132
|
+
A short flag whose long spelling differs per subcommand is the trap, and `-v` is almost always that flag:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
docker -v -> --version, prints and exits
|
|
136
|
+
docker compose down -v -> --volumes, removes the named volumes
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Declared as a plain global, `overrides: READONLY` on `-v` turns the second line into READONLY/LOW, which the bundled hook auto-approves. The same shape caught `git push -v` and `git commit -v` (`--verbose`, and the push and the commit both happen), `pip install -V` (silently ignored, and the install happens), and `apt upgrade -v`.
|
|
140
|
+
|
|
141
|
+
Three answers, in order of preference:
|
|
142
|
+
|
|
143
|
+
1. **The flag really is universal.** `--help` usually is, and `-h` often is -- but not always: `-h` is human-readable for `du` and `df`, no-dereference for `chown`, `chgrp` and `ln`, and a Click-based CLI answers `No such option: -h` at every depth. Declare it only after seeing it work at depth.
|
|
144
|
+
2. **The flag is honoured only ahead of the subcommand.** Mark it `before_subcommand_only: true`. It is then stripped as a global on `docker -v` and ignored on `docker compose down -v`, which is exactly what the tool does. This is what `git`, `docker`, `mise`, `uv`, `cargo`, `pip`, `pip3`, `pipx` and `brew` use for their version flags. `apt` is the counter-example: it honours both spellings at every depth and acts on neither, so it needs no marker -- and where one of its subcommands takes its own `-v`, that subcommand declares it, which is the third answer below applied in reverse.
|
|
145
|
+
3. **The flag does not exist.** Do not declare it. A declaration that does not correspond to a real flag is a free `READONLY` on every command that happens to carry that token.
|
|
146
|
+
|
|
147
|
+
A *subcommand's* own `options:` need a different kind of care, not less of it. They reach only that subcommand, so the depth question does not arise -- but an `overrides` there still applies wherever the flag appears in the invocation, operands included, and it is not subject to the operand rule below. `git branch` declares `-v` as `overrides: READONLY` because `git branch -v` lists; `git branch <name> -v` creates the branch and reads READONLY all the same. Before writing `overrides: READONLY` on a subcommand's flag, ask whether the same flag means the same thing in that subcommand's *other* mode.
|
|
148
|
+
|
|
149
|
+
**The operand rule.** A `global_options` override that would make the command look *safer* is ignored once the invocation has an operand, because an operand means the binary is dispatching and the token may not be its own -- `docker run alpine sh -c '<script>' --help` hands the `--help` to the container and the script still runs. An override that would make it look *more dangerous* is applied wherever it appears; guessing the token belongs to the operand is the cautious reading only in one direction. This is why `apt install foo --version` is HIGH while `apt --version` is LOW, and why a `--unmasked` that prints plaintext tokens survives an operand.
|
|
150
|
+
|
|
127
151
|
#### The `# $schema:` comment
|
|
128
152
|
|
|
129
153
|
Add `# $schema: ../../../schemas/command.schema.json` as the first line of every YAML file. This enables autocomplete and validation in IDEs that support JSON Schema for YAML files.
|
|
@@ -268,13 +292,44 @@ Some commands do not do work themselves -- they delegate to an inner command. ba
|
|
|
268
292
|
|
|
269
293
|
### Pure-wrapper rule of thumb
|
|
270
294
|
|
|
271
|
-
For commands that are pure passthroughs -- they do nothing themselves beyond running the inner command (e.g. `env`, `xargs
|
|
295
|
+
For commands that are pure passthroughs -- they do nothing themselves beyond running the inner command (e.g. `env`, `xargs`) -- **omit `classification`**, and only when the wrapper invoked with no inner command really is read-only (`xargs` with no arguments runs `echo`; `env` prints the environment). The base is not maxed against the delegated inner: once delegation resolves an inner command the matcher sets the result to `READONLY` outright and takes the answer from the inner alone, so the base is not a floor and not an identity element -- it is the answer for the invocations where delegation resolves nothing. Writing `classification: READONLY` explicitly on a pure wrapper is misleading -- it reads as "this command is safe" when the real intent is "inherit from whatever I wrap."
|
|
272
296
|
|
|
273
297
|
Only set a non-`READONLY` base when the wrapper itself contributes risk regardless of the inner (e.g. `sudo` is `EXTERNAL_EFFECTS` because it elevates privileges) or when the wrapper also has a meaningful standalone behavior that isn't READONLY.
|
|
274
298
|
|
|
299
|
+
### The base is what is left when delegation resolves nothing
|
|
300
|
+
|
|
301
|
+
Command-level delegation drops the wrapper's own base as soon as it resolves an inner command, so the base of a delegating command is never the verdict on the ordinary spelling -- it is the verdict on every spelling the database failed to read. That makes it the fallback, not the description, and for anything that runs an arbitrary program the fallback must not be `READONLY`.
|
|
302
|
+
|
|
303
|
+
There are more of those spellings than there look to be. `after_separator` resolves nothing when the separator is absent, and it is optional in `pnpm exec`, `npm exec` and `npx`. A command passed in an option value (`npm exec -c '<sh>'`, `mise exec -c '<sh>'`) is not a positional and resolves nothing either. A program word the parser cannot read -- a variable, a substitution -- resolves to nothing usable.
|
|
304
|
+
|
|
305
|
+
So an exec-shaped wrapper gets `classification: DANGEROUS`. It costs nothing on the spelling that works, and it is the difference between a prompt and a silent auto-approve on the ones that do not. `kubectl exec` and `npx` were already written this way.
|
|
306
|
+
|
|
307
|
+
### The base also classifies every subcommand the group does not model
|
|
308
|
+
|
|
309
|
+
`classification` is documented as "base classification when no subcommand matches", and that covers two different invocations: the bare command, and one naming a subcommand this file has never heard of. A file that omits the base gives both of them `READONLY`, and for a tool that installs, publishes, authenticates or executes, the second of those is a hole -- the unmodelled subcommand is exactly the one nobody thought about.
|
|
310
|
+
|
|
311
|
+
Pick the base from what the tool does with a word it does not recognise:
|
|
312
|
+
|
|
313
|
+
- It runs it. `pnpm <word>` runs the package.json script of that name and otherwise execs the word; `yarn <word>` and `mise <word>` are the same shape. The base is `DANGEROUS`, the same as the `run` subcommand it is shorthand for.
|
|
314
|
+
- It refuses it, but the file models only part of a large surface. `npm`, `uv`, `docker`, `helm`, `apt`, `cargo` and friends. The base is `UNKNOWN`: the honest statement is "this database does not model that subcommand", and `UNKNOWN` says exactly that while still forcing a prompt.
|
|
315
|
+
- It refuses it and the file is the whole surface. Leave the base off.
|
|
316
|
+
|
|
317
|
+
Bare `npm` then prompts, where it used to be auto-allowed. That is the cost, and it is the cheaper of the two ways to be wrong: bare `npm` prints usage, while `npm token create` does not. Pay it back where it is worth paying: declare the informational spellings (`--version`, `-v`, `--help`, `-h`, and the `help`/`version` subcommands where the tool has them) so the everyday read-only calls stay `LOW`. Declare only the ones the tool really has -- `-v` is `--version` for `npm`, `pnpm`, `yarn`, `docker` and `apt`, and `--verbose` for `pip`, `uv`, `poetry`, `cargo` and `mise`, and marking a verbosity flag READONLY hands every command that carries it a free pass.
|
|
318
|
+
|
|
319
|
+
**This applies at every level of the tree, not only at the top.** A subcommand that has subcommands of its own is a group with the same defect: `yarn workspaces` modelled only `list`, so `yarn workspaces run build` -- which runs a package script in every workspace -- fell through to the group's own missing base and came back READONLY/LOW. So did `npm config set script-shell /tmp/evil`, which changes the shell every later `npm run` executes. Ask the same question of a group that you ask of a file, and answer it against what the tool does with a child the group does not declare. `uv run python scripts/audit-missing-base.py` prints every group that still has children and no classification; a group is allowed to stay without one only when an unmodelled child would genuinely be read-only, the way `gh search` and `slack users` are.
|
|
320
|
+
|
|
275
321
|
### `rest_are_argv`
|
|
276
322
|
|
|
277
|
-
All remaining positional args (after the wrapper's own options) form the inner command.
|
|
323
|
+
All remaining positional args (after the wrapper's own options) form the inner command. One leading `--` is the
|
|
324
|
+
wrapper's own end-of-options marker rather than the program word, and is skipped: `sudo -- rm -rf /` delegates to
|
|
325
|
+
`rm`, not to `--`.
|
|
326
|
+
|
|
327
|
+
That holds only while the `--` comes before any operand of the wrapper itself, because that is the only place the
|
|
328
|
+
wrapper's own option parser is still reading. `env` stops at the first assignment and `timeout` at the duration, so
|
|
329
|
+
in `env FOO=bar -- ls` and `timeout 5 -- ls` the `--` really is the program word and both really do fail with "No
|
|
330
|
+
such file or directory" -- the database says `UNKNOWN` because the shell says 127. `timeout -- 5 ls`, which a real
|
|
331
|
+
`timeout` accepts, skips the marker and then the duration, and resolves to `ls`. Only one marker is skipped: POSIX
|
|
332
|
+
makes the second `--` in `sudo -- -- ls` the program name.
|
|
278
333
|
|
|
279
334
|
**xargs:** `xargs grep -r foo` -- inner command is `["grep", "-r", "foo"]`
|
|
280
335
|
|
|
@@ -315,6 +370,8 @@ Everything after a separator token forms the inner command.
|
|
|
315
370
|
|
|
316
371
|
**kubectl exec:** `kubectl exec -it my-pod -- cat /etc/config` -- inner command is `["cat", "/etc/config"]`
|
|
317
372
|
|
|
373
|
+
Use this mode only when the tool *requires* the separator (`mise exec` errors without it, because it reads every leading positional as a `TOOL@VERSION`). Where the separator is optional -- `pnpm exec`, `npm exec` -- `after_separator` resolves nothing on the spelling that omits it, and `rest_are_argv` is the right mode.
|
|
374
|
+
|
|
318
375
|
```yaml
|
|
319
376
|
subcommands:
|
|
320
377
|
exec:
|
|
@@ -406,7 +463,7 @@ Some commands default to a higher classification when used without a recognized
|
|
|
406
463
|
|
|
407
464
|
- **kubectl** -- base `EXTERNAL_EFFECTS` (bare `kubectl` without a known subcommand should not be auto-allowed)
|
|
408
465
|
- **terraform** -- base `DANGEROUS` (unknown terraform subcommands could modify infrastructure)
|
|
409
|
-
- **docker** --
|
|
466
|
+
- **docker** -- base `UNKNOWN` (a subcommand this file does not model may be a CLI plugin, and `docker unknown-thing` must not fall through as READONLY)
|
|
410
467
|
|
|
411
468
|
### Shell builtins hardcoded in the matcher
|
|
412
469
|
|
|
@@ -162,6 +162,10 @@
|
|
|
162
162
|
"type": "boolean",
|
|
163
163
|
"description": "The tool documents this option's value as a path it writes (`curl -o`, `sort -o`). It lands in `write_paths`, and a sensitive-path hit on it is reported with source `argv_write`. Do not set it on an option whose value is read, or on one that writes only in some modes (`tar -f` writes when creating and reads when extracting)."
|
|
164
164
|
},
|
|
165
|
+
"before_subcommand_only": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"description": "Only meaningful in `global_options`: the tool honours this option ahead of its subcommand and not after one. A `global_options` entry otherwise applies at every subcommand depth, so an override there has to be valid and mean the same thing at every depth. A short flag whose long spelling differs per subcommand is the trap: `docker -v` is `--version`, while `docker compose down -v` is `--volumes` and removes named volumes."
|
|
168
|
+
},
|
|
165
169
|
"delegates_to": {
|
|
166
170
|
"$ref": "#/$defs/DelegationConfig"
|
|
167
171
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Report every subcommand group whose base is weaker than what the group can reach.
|
|
3
|
+
|
|
4
|
+
A group's classification answers for the bare invocation and for every child the group does not
|
|
5
|
+
model, so it has to be at least as severe as its children. Two ways it fails:
|
|
6
|
+
|
|
7
|
+
- **no classification at all** -- the base defaults to READONLY, and the unmodelled child is the
|
|
8
|
+
one nobody thought about;
|
|
9
|
+
- **a classification that answers `risk: LOW`** while something below it does not -- `git remote`
|
|
10
|
+
declared READONLY over an `add` that is EXTERNAL_EFFECTS says `git remote whatever` is
|
|
11
|
+
read-only, and it is not.
|
|
12
|
+
|
|
13
|
+
`risk: LOW` is the question because it is the bundled hook's auto-approve condition. A base that
|
|
14
|
+
answers MEDIUM or HIGH over more severe children is not flagged: `gh issue` at UNKNOWN prompts
|
|
15
|
+
for the child it does not model, which is all the base has to do.
|
|
16
|
+
|
|
17
|
+
A group is allowed to answer LOW over LOW only, unless an unmodelled child would genuinely be
|
|
18
|
+
read-only too, the way `gh search` is; `docs/classification-guidance.md` has the decision.
|
|
19
|
+
|
|
20
|
+
uv run python scripts/audit-missing-base.py [commands-dir]
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from __future__ import annotations
|
|
24
|
+
|
|
25
|
+
import sys
|
|
26
|
+
from pathlib import Path
|
|
27
|
+
|
|
28
|
+
import yaml
|
|
29
|
+
|
|
30
|
+
DEFAULT_DIR = Path(__file__).resolve().parent.parent / "src" / "bash_classify" / "commands"
|
|
31
|
+
|
|
32
|
+
RISK = {"LOW": 0, "MEDIUM": 1, "HIGH": 2}
|
|
33
|
+
DEFAULT_RISK = {
|
|
34
|
+
"READONLY": "LOW",
|
|
35
|
+
"LOCAL_EFFECTS": "MEDIUM",
|
|
36
|
+
"EXTERNAL_EFFECTS": "MEDIUM",
|
|
37
|
+
"UNKNOWN": "HIGH",
|
|
38
|
+
"DANGEROUS": "HIGH",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def risk_of(node: dict) -> str:
|
|
43
|
+
"""The risk a node answers with, the way the matcher derives it."""
|
|
44
|
+
if node.get("risk"):
|
|
45
|
+
return node["risk"]
|
|
46
|
+
return DEFAULT_RISK[node.get("classification") or "READONLY"]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def worst_descendant_risk(node: dict) -> tuple[str, str]:
|
|
50
|
+
"""The highest risk anywhere below this node, and the path that carries it."""
|
|
51
|
+
worst, where = "LOW", ""
|
|
52
|
+
for name, child in (node.get("subcommands") or {}).items():
|
|
53
|
+
for candidate, source in ((risk_of(child), name), worst_descendant_risk(child)):
|
|
54
|
+
if RISK[candidate] > RISK[worst]:
|
|
55
|
+
worst, where = candidate, f"{name} {source}".strip()
|
|
56
|
+
return worst, where
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def walk(node: dict, path: list[str], rows: list, totals: list[int]) -> None:
|
|
60
|
+
children = node.get("subcommands") or {}
|
|
61
|
+
if children:
|
|
62
|
+
totals[0] += 1
|
|
63
|
+
# The question is the hook's: this group answers `risk: LOW` for its bare invocation and
|
|
64
|
+
# for every child it does not model, while something under it is not LOW.
|
|
65
|
+
base = risk_of(node)
|
|
66
|
+
worst, where = worst_descendant_risk(node)
|
|
67
|
+
if base == "LOW" and RISK[worst] > 0:
|
|
68
|
+
declared = node.get("classification") or "no classification"
|
|
69
|
+
rows.append((" ".join(path), declared, f"{worst} at `{where}`", sorted(children)))
|
|
70
|
+
for name, child in children.items():
|
|
71
|
+
walk(child, [*path, name], rows, totals)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def main(argv: list[str]) -> int:
|
|
75
|
+
root = Path(argv[1]) if len(argv) > 1 else DEFAULT_DIR
|
|
76
|
+
if not root.is_dir():
|
|
77
|
+
print(f"not a directory: {root}", file=sys.stderr)
|
|
78
|
+
return 2
|
|
79
|
+
|
|
80
|
+
rows: list = []
|
|
81
|
+
totals = [0]
|
|
82
|
+
for file in sorted(root.glob("*.yaml")):
|
|
83
|
+
data = yaml.safe_load(file.read_text())
|
|
84
|
+
walk(data, [data["command"]], rows, totals)
|
|
85
|
+
|
|
86
|
+
for path, declared, reaches, names in rows:
|
|
87
|
+
shown = ", ".join(names[:5]) + (" ..." if len(names) > 5 else "")
|
|
88
|
+
print(f"{path:<32} base {declared:<17} answers LOW, reaches {reaches:<28} {shown}")
|
|
89
|
+
print(f"\n{len(rows)} groups answering LOW over something that is not, out of {totals[0]} with children")
|
|
90
|
+
return 0
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
if __name__ == "__main__":
|
|
94
|
+
raise SystemExit(main(sys.argv))
|
|
@@ -6,7 +6,11 @@ import os
|
|
|
6
6
|
from collections.abc import Iterator, Mapping, Sequence
|
|
7
7
|
|
|
8
8
|
from .database import load_database
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
# `_find_flag_value` stays private to `matcher`: it is an implementation detail of how a
|
|
11
|
+
# delegating flag is spelled, not part of the package surface, and this is the only other
|
|
12
|
+
# reader of it.
|
|
13
|
+
from .matcher import _find_flag_value, match_command
|
|
10
14
|
from .models import (
|
|
11
15
|
Classification,
|
|
12
16
|
CommandDef,
|
|
@@ -76,6 +80,121 @@ def _is_system_path(path: str) -> bool:
|
|
|
76
80
|
return any(path == sysdir or path.startswith(sysdir + "/") for sysdir in _SYSTEM_DIRS)
|
|
77
81
|
|
|
78
82
|
|
|
83
|
+
_EXPRESSION_DELEGATION_MODES = frozenset({"args_are_expression", "flag_value_is_expression"})
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def _program_words(argv: Sequence[str], inner_commands: Sequence[InnerCommandResult]) -> list[str]:
|
|
87
|
+
"""Collect the program words that appear among this invocation's own argv tokens.
|
|
88
|
+
|
|
89
|
+
`argv[0]` is the program being executed, not a path the program operates on, so
|
|
90
|
+
`/usr/bin/git add a.txt` writes nothing into `/usr/bin`. A wrapper carries the words of
|
|
91
|
+
the command it runs in its own argv -- `sudo /usr/bin/git add a.txt` is scanned as
|
|
92
|
+
`['sudo', '/usr/bin/git', 'add', 'a.txt']` -- so those nested words are collected too,
|
|
93
|
+
or only the unwrapped spelling would get the exemption.
|
|
94
|
+
|
|
95
|
+
A command reached through a script is deliberately left out: its words are inside the
|
|
96
|
+
script token, not among these tokens, and `_system_paths_in_scripts` scans it against
|
|
97
|
+
its own exemptions. Adding them here would let a word from inside a script be spent on
|
|
98
|
+
an unrelated token of the enclosing command line.
|
|
99
|
+
"""
|
|
100
|
+
words = list(argv[:1])
|
|
101
|
+
for inner in inner_commands:
|
|
102
|
+
if inner.delegation_mode in _EXPRESSION_DELEGATION_MODES:
|
|
103
|
+
continue
|
|
104
|
+
if inner.delegation_mode == "terminated_argv" and not _starts_at_its_option(argv, inner):
|
|
105
|
+
continue
|
|
106
|
+
words.extend(_program_words(inner.argv, inner.inner_commands))
|
|
107
|
+
return words
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _starts_at_its_option(argv: Sequence[str], inner: InnerCommandResult) -> bool:
|
|
111
|
+
r"""Tell whether a `find -exec` inner really begins where its option's tokens begin.
|
|
112
|
+
|
|
113
|
+
The matcher strips `{}` placeholders before building the inner argv, so in
|
|
114
|
+
`find . -exec {} /usr/bin/git add \;` the inner `argv[0]` is `/usr/bin/git` -- an argument
|
|
115
|
+
handed to whatever file `find` matched, not the program being run. Exempting it would be
|
|
116
|
+
the mistake this whole rule exists to stop, pointed at the wrong token. The inner counts
|
|
117
|
+
as starting at its option only when the option is directly followed by that word.
|
|
118
|
+
"""
|
|
119
|
+
if not inner.argv:
|
|
120
|
+
return False
|
|
121
|
+
return any(
|
|
122
|
+
token == inner.delegation_source and argv[index + 1] == inner.argv[0] for index, token in enumerate(argv[:-1])
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _script_tokens(argv: Sequence[str], inner_commands: Sequence[InnerCommandResult]) -> list[str]:
|
|
127
|
+
"""Collect the argv tokens that hold a whole script rather than a path.
|
|
128
|
+
|
|
129
|
+
`sh -c '/usr/bin/touch /etc/passwd'` hands a command line over as a single token, and a
|
|
130
|
+
scan that compares whole tokens against directory prefixes reads that token as a path
|
|
131
|
+
under `/usr/bin`. The token is source, so it is not scanned as a path; the commands
|
|
132
|
+
parsed out of it are scanned instead, by `_system_paths_in_scripts`.
|
|
133
|
+
|
|
134
|
+
Only the token that is the entire script counts. `eval cp a /usr/bin/b` spreads its
|
|
135
|
+
script over several tokens and none of them is it, so every token stays scannable.
|
|
136
|
+
|
|
137
|
+
A shell flag written in a cluster (`bash -lc '...'`) is not the flag the database declares,
|
|
138
|
+
so no script is parsed out of it and the token is scanned as a path. For `sh`, `bash` and
|
|
139
|
+
`zsh` that is unobservable -- they are DANGEROUS from their own definitions and the
|
|
140
|
+
elevation never runs -- but a user-declared command with this mode and no DANGEROUS floor
|
|
141
|
+
misses what is inside the script. See SPEC.md.
|
|
142
|
+
|
|
143
|
+
Like `_program_words` this stops at the script boundary: a token found by looking inside a
|
|
144
|
+
script does not exist in the enclosing command line, and matching it there by value would
|
|
145
|
+
mask an unrelated token. Each level computes its own.
|
|
146
|
+
"""
|
|
147
|
+
tokens: list[str] = []
|
|
148
|
+
for inner in inner_commands:
|
|
149
|
+
if inner.delegation_mode == "flag_value_is_expression":
|
|
150
|
+
value = _find_flag_value(list(argv), inner.delegation_source)
|
|
151
|
+
if value is not None:
|
|
152
|
+
tokens.append(value)
|
|
153
|
+
elif inner.delegation_mode == "args_are_expression" and len(argv) == 2:
|
|
154
|
+
tokens.append(argv[1])
|
|
155
|
+
else:
|
|
156
|
+
tokens.extend(_script_tokens(inner.argv, inner.inner_commands))
|
|
157
|
+
return tokens
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def _system_paths_in_argv(argv: Sequence[str], inner_commands: Sequence[InnerCommandResult]) -> list[str]:
|
|
161
|
+
"""Find the system paths this invocation names among its own argv tokens.
|
|
162
|
+
|
|
163
|
+
Each exempt program word and each script token is consumed once rather than matched by
|
|
164
|
+
value, so a repeat of either still counts: `/usr/bin/git add /usr/bin/git` is a hit, and
|
|
165
|
+
so is the operand in `nohup sh -c /bin/ls /bin/ls`.
|
|
166
|
+
"""
|
|
167
|
+
exempt_words = _program_words(argv, inner_commands)
|
|
168
|
+
script_tokens = _script_tokens(argv, inner_commands)
|
|
169
|
+
found: list[str] = []
|
|
170
|
+
for token in argv:
|
|
171
|
+
if token in exempt_words:
|
|
172
|
+
exempt_words.remove(token)
|
|
173
|
+
elif token in script_tokens:
|
|
174
|
+
script_tokens.remove(token)
|
|
175
|
+
elif _is_system_path(token):
|
|
176
|
+
found.append(token)
|
|
177
|
+
return found
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def _system_paths_in_scripts(argv: Sequence[str], inner_commands: Sequence[InnerCommandResult]) -> list[str]:
|
|
181
|
+
"""Find the system paths named by the commands inside the scripts this invocation runs.
|
|
182
|
+
|
|
183
|
+
The elevation is applied to the top-level invocation only, so without this the operands
|
|
184
|
+
inside `sh -c '...'` would be scanned nowhere once the script token itself is skipped.
|
|
185
|
+
Each command parsed out of a script is scanned under *its own* classification, the way a
|
|
186
|
+
top-level command is: in `sh -c 'cat /etc/hosts && touch x'` the `cat` sits below
|
|
187
|
+
`LOCAL_EFFECTS` and its `/etc/hosts` is not a hit, exactly as in the bare spelling.
|
|
188
|
+
"""
|
|
189
|
+
found: list[str] = []
|
|
190
|
+
for inner in inner_commands:
|
|
191
|
+
is_script = inner.delegation_mode in _EXPRESSION_DELEGATION_MODES
|
|
192
|
+
if is_script and inner.classification.severity() >= Classification.LOCAL_EFFECTS.severity():
|
|
193
|
+
found.extend(_system_paths_in_argv(inner.argv, inner.inner_commands))
|
|
194
|
+
found.extend(_system_paths_in_scripts(inner.argv, inner.inner_commands))
|
|
195
|
+
return found
|
|
196
|
+
|
|
197
|
+
|
|
79
198
|
def classify_expression(
|
|
80
199
|
expression: str,
|
|
81
200
|
database: Mapping[str, CommandDef] | None = None,
|
|
@@ -191,11 +310,9 @@ def classify_expression(
|
|
|
191
310
|
|
|
192
311
|
# Step 6: Elevate to DANGEROUS when writing to system directories
|
|
193
312
|
if result.classification.severity() >= Classification.LOCAL_EFFECTS.severity():
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
if _is_system_path(token):
|
|
198
|
-
system_paths_found.append(token)
|
|
313
|
+
# Check argv tokens, then the commands inside any script this one runs
|
|
314
|
+
system_paths_found = _system_paths_in_argv(invocation.argv, result.inner_commands)
|
|
315
|
+
system_paths_found.extend(_system_paths_in_scripts(invocation.argv, result.inner_commands))
|
|
199
316
|
# Check redirect targets
|
|
200
317
|
for redirect in invocation.redirects:
|
|
201
318
|
if _is_system_path(redirect.target):
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# $schema: ../../../schemas/command.schema.json
|
|
2
|
+
command: apt
|
|
3
|
+
description: "Debian package management tool"
|
|
4
|
+
# An unrecognised subcommand is one this file does not model. apt installs and removes
|
|
5
|
+
# system packages, so an unknown subcommand cannot be read as read-only.
|
|
6
|
+
classification: UNKNOWN
|
|
7
|
+
strict: false
|
|
8
|
+
global_options:
|
|
9
|
+
-h: {overrides: READONLY}
|
|
10
|
+
# apt honours both spellings at every depth and acts on neither: `apt upgrade -v` and
|
|
11
|
+
# `apt install -v <pkg>` print `apt <version>` and exit 0 having done nothing. So neither
|
|
12
|
+
# carries `before_subcommand_only` -- READONLY really is the verdict at any depth. Where a
|
|
13
|
+
# subcommand takes its own `-v` it declares it, which is what keeps that one out of here.
|
|
14
|
+
--version: {overrides: READONLY}
|
|
15
|
+
-v: {overrides: READONLY}
|
|
16
|
+
--help: {overrides: READONLY}
|
|
17
|
+
subcommands:
|
|
18
|
+
help:
|
|
19
|
+
classification: READONLY
|
|
20
|
+
strict: false
|
|
21
|
+
list:
|
|
22
|
+
classification: READONLY
|
|
23
|
+
# `apt list -v` lists packages -- here `-v` is the subcommand's own verbosity flag and not
|
|
24
|
+
# apt's `--version`, so it is declared rather than left to the global
|
|
25
|
+
options:
|
|
26
|
+
-v: {}
|
|
27
|
+
show:
|
|
28
|
+
classification: READONLY
|
|
29
|
+
search:
|
|
30
|
+
classification: READONLY
|
|
31
|
+
install:
|
|
32
|
+
classification: DANGEROUS
|
|
33
|
+
remove:
|
|
34
|
+
classification: DANGEROUS
|
|
35
|
+
purge:
|
|
36
|
+
classification: DANGEROUS
|
|
37
|
+
update:
|
|
38
|
+
classification: EXTERNAL_EFFECTS
|
|
39
|
+
upgrade:
|
|
40
|
+
classification: DANGEROUS
|
|
41
|
+
autoremove:
|
|
42
|
+
classification: DANGEROUS
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
# $schema: ../../../schemas/command.schema.json
|
|
2
2
|
command: brew
|
|
3
3
|
description: "macOS and Linux package manager"
|
|
4
|
+
# An unrecognised subcommand is one this file does not model — an external command
|
|
5
|
+
# (`brew-<word>` on PATH) or a tap's own. brew installs system packages, so an
|
|
6
|
+
# unknown subcommand cannot be read as read-only.
|
|
7
|
+
classification: UNKNOWN
|
|
4
8
|
strict: false
|
|
5
9
|
global_options:
|
|
10
|
+
-h: {overrides: READONLY}
|
|
11
|
+
--version: {overrides: READONLY, before_subcommand_only: true}
|
|
6
12
|
--help: {overrides: READONLY}
|
|
7
13
|
subcommands:
|
|
14
|
+
help:
|
|
15
|
+
classification: READONLY
|
|
16
|
+
strict: false
|
|
8
17
|
list:
|
|
9
18
|
classification: READONLY
|
|
10
19
|
info:
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
# $schema: ../../../schemas/command.schema.json
|
|
2
2
|
command: cargo
|
|
3
3
|
description: "Rust package manager and build tool"
|
|
4
|
+
# `cargo <word>` falls back to executing `cargo-<word>` from PATH, so an unrecognised
|
|
5
|
+
# subcommand is either a plugin this file does not model or nothing at all — and
|
|
6
|
+
# a plugin can do anything cargo can.
|
|
7
|
+
classification: UNKNOWN
|
|
4
8
|
strict: false
|
|
5
9
|
global_options:
|
|
10
|
+
-h: {overrides: READONLY}
|
|
11
|
+
--version: {overrides: READONLY, before_subcommand_only: true}
|
|
12
|
+
-V: {overrides: READONLY, before_subcommand_only: true}
|
|
6
13
|
--help: {overrides: READONLY}
|
|
7
14
|
subcommands:
|
|
15
|
+
help:
|
|
16
|
+
classification: READONLY
|
|
17
|
+
strict: false
|
|
18
|
+
version:
|
|
19
|
+
classification: READONLY
|
|
20
|
+
strict: false
|
|
8
21
|
build:
|
|
9
22
|
classification: LOCAL_EFFECTS
|
|
10
23
|
risk: LOW
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
# $schema: ../../../schemas/command.schema.json
|
|
2
2
|
command: docker
|
|
3
3
|
description: "Container application platform"
|
|
4
|
+
# An unrecognised subcommand is one this file does not model — a CLI plugin such as
|
|
5
|
+
# `docker scout`, or a subcommand not listed below. Docker starts containers and
|
|
6
|
+
# writes to the daemon, so an unknown one cannot be read as read-only.
|
|
7
|
+
classification: UNKNOWN
|
|
4
8
|
strict: false
|
|
5
9
|
global_options:
|
|
10
|
+
-h: {overrides: READONLY}
|
|
11
|
+
--version: {overrides: READONLY, before_subcommand_only: true}
|
|
12
|
+
-v: {overrides: READONLY, before_subcommand_only: true}
|
|
6
13
|
--help: {overrides: READONLY}
|
|
7
14
|
--host: {takes_value: true, aliases: [-H]}
|
|
8
15
|
--config: {takes_value: true}
|
|
@@ -17,6 +24,9 @@ global_options:
|
|
|
17
24
|
--debug: {}
|
|
18
25
|
|
|
19
26
|
subcommands:
|
|
27
|
+
help:
|
|
28
|
+
classification: READONLY
|
|
29
|
+
strict: false
|
|
20
30
|
ps:
|
|
21
31
|
classification: READONLY
|
|
22
32
|
strict: false
|
|
@@ -83,7 +93,11 @@ subcommands:
|
|
|
83
93
|
cp:
|
|
84
94
|
classification: EXTERNAL_EFFECTS
|
|
85
95
|
compose:
|
|
96
|
+
classification: UNKNOWN
|
|
86
97
|
subcommands:
|
|
98
|
+
version:
|
|
99
|
+
classification: READONLY
|
|
100
|
+
strict: false
|
|
87
101
|
ps:
|
|
88
102
|
classification: READONLY
|
|
89
103
|
strict: false
|
|
@@ -143,6 +157,7 @@ subcommands:
|
|
|
143
157
|
classification: DANGEROUS
|
|
144
158
|
strict: false
|
|
145
159
|
system:
|
|
160
|
+
classification: UNKNOWN
|
|
146
161
|
subcommands:
|
|
147
162
|
prune:
|
|
148
163
|
classification: DANGEROUS
|
|
@@ -152,6 +167,7 @@ subcommands:
|
|
|
152
167
|
info:
|
|
153
168
|
classification: READONLY
|
|
154
169
|
volume:
|
|
170
|
+
classification: UNKNOWN
|
|
155
171
|
subcommands:
|
|
156
172
|
ls:
|
|
157
173
|
classification: READONLY
|
|
@@ -164,6 +180,7 @@ subcommands:
|
|
|
164
180
|
prune:
|
|
165
181
|
classification: DANGEROUS
|
|
166
182
|
network:
|
|
183
|
+
classification: UNKNOWN
|
|
167
184
|
subcommands:
|
|
168
185
|
ls:
|
|
169
186
|
classification: READONLY
|