bash-classify 0.13.1__tar.gz → 0.14.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bash_classify-0.13.1 → bash_classify-0.14.1}/.claude-plugin/marketplace.json +1 -1
- {bash_classify-0.13.1 → bash_classify-0.14.1}/PKG-INFO +28 -2
- {bash_classify-0.13.1 → bash_classify-0.14.1}/README.md +27 -1
- {bash_classify-0.13.1 → bash_classify-0.14.1}/SPEC.md +18 -1
- {bash_classify-0.13.1 → bash_classify-0.14.1}/coding-agent-plugins/claude-code/.claude-plugin/plugin.json +1 -1
- {bash_classify-0.13.1 → bash_classify-0.14.1}/docs/classification-guidance.md +128 -5
- {bash_classify-0.13.1 → bash_classify-0.14.1}/schemas/command.schema.json +10 -1
- bash_classify-0.14.1/scripts/audit-missing-base.py +94 -0
- bash_classify-0.14.1/src/bash_classify/commands/apt.yaml +42 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/brew.yaml +9 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/cargo.yaml +13 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/docker.yaml +17 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/gh.yaml +24 -1
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/git.yaml +136 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/glab-discussion.yaml +3 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/glab.yaml +44 -1
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/go.yaml +7 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/helm.yaml +8 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/kubectl.yaml +4 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/mise.yaml +28 -8
- bash_classify-0.14.1/src/bash_classify/commands/npm.yaml +141 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/npx.yaml +8 -2
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/pip.yaml +6 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/pip3.yaml +6 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/pipx.yaml +5 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/pnpm.yaml +14 -8
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/poetry.yaml +15 -1
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/pup.yaml +1 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/rtk.yaml +4 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/ruff.yaml +4 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/slack.yaml +11 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/snip.yaml +4 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/uv.yaml +15 -1
- bash_classify-0.14.1/src/bash_classify/commands/yarn.yaml +104 -0
- bash_classify-0.14.1/src/bash_classify/database.py +743 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/matcher.py +63 -3
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/models.py +8 -0
- bash_classify-0.14.1/tests/conftest.py +50 -0
- bash_classify-0.14.1/tests/fixtures/match/glab-discussion/block/env-end-of-options-mr-note.sh +1 -0
- bash_classify-0.14.1/tests/fixtures/match/glab-discussion/block/sudo-end-of-options-mr-note.sh +1 -0
- bash_classify-0.14.1/tests/fixtures/match/glab-discussion/block/timeout-end-of-options-mr-note.sh +1 -0
- bash_classify-0.14.1/tests/fixtures/match/glab-discussion/block/xargs-end-of-options-mr-note.sh +1 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_classifier.py +858 -0
- bash_classify-0.14.1/tests/test_database.py +1189 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_matcher.py +19 -15
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_real_world.py +3 -2
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_rules.py +40 -0
- bash_classify-0.13.1/src/bash_classify/commands/apt.yaml +0 -25
- bash_classify-0.13.1/src/bash_classify/commands/npm.yaml +0 -71
- bash_classify-0.13.1/src/bash_classify/commands/yarn.yaml +0 -72
- bash_classify-0.13.1/src/bash_classify/database.py +0 -348
- bash_classify-0.13.1/tests/conftest.py +0 -13
- bash_classify-0.13.1/tests/test_database.py +0 -429
- {bash_classify-0.13.1 → bash_classify-0.14.1}/.claude/rules/command-database.md +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/.editorconfig +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/.github/workflows/ci.yml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/.github/workflows/publish.yml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/.gitignore +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/.python-version +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/CLAUDE.md +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/LICENSE +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/coding-agent-plugins/claude-code/hooks/hook-permission-request.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/coding-agent-plugins/claude-code/hooks/hook-pre-tool-use.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/coding-agent-plugins/claude-code/hooks/hooks.json +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/pyproject.toml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/ruff.toml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/schemas/match-rules.schema.json +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/schemas/sensitive-paths.schema.json +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/__init__.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/__main__.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/classifier.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/cli.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/agent-browser.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/awk.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/basename.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/bash-classify.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/bash.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/black.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/builtin.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/cat.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/chgrp.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/chmod.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/chown.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/column.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/comm.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/command.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/cp.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/curl.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/cut.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/date.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/df.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/diff.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/dig.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/dirname.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/du.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/echo.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/env.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/eslint.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/eval.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/exec.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/expand.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/false.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/file.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/find.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/fmt.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/fold.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/free.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/gawk.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/gcloud.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/gog.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/gradle.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/gradlew.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/grep.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/groups.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/gunzip.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/gws.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/gzip.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/hadolint.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/head.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/hostname.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/id.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/install.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/isort.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/java.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/javac.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/join.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/journalctl.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/jq.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/kill.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/killall.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/less.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/ln.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/ls.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/make.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/md5sum.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/mkdir.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/more.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/mv.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/mvn.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/mvnw.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/mypy.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/netstat.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/nice.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/nl.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/node.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/nohup.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/nslookup.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/paste.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/ping.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/pkill.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/prettier.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/printenv.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/printf.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/ps.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/pwd.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/pytest.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/python.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/python3.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/read.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/readlink.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/realpath.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/rev.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/rg.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/rm.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/rsync.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/scp.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/sed.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/seq.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/sh.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/sha1sum.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/sha256sum.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/shellcheck.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/sleep.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/sort.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/ss.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/ssh.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/stat.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/stdbuf.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/strace.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/strings.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/sudo.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/systemctl.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/tac.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/tail.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/tar.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/tee.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/terraform.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/test.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/time.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/timeout.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/top.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/touch.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/tr.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/traceroute.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/true.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/tsc.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/type.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/uname.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/unexpand.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/uniq.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/unzip.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/uptime.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/wait.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/wc.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/wget.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/whereis.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/which.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/whoami.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/xargs.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/xmllint.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/yes.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/yq.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/zip.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/commands/zsh.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/parser.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/py.typed +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/redirects.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/rules.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/sensitive-paths.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/src/bash_classify/sensitive.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/__init__.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-award-emoji.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-include-diverged.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-itself.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-pipelines-list.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-update-description.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/api-project-lookup.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/ci-list.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/comment-only-mention.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/echo-mentions-api-endpoint.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/echo-mentions-command.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/git-commit-heredoc-message.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/git-commit-inline-message.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read-and-api-mr.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/glab-pipeline-inspect.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/grep-pattern-mentions-command.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/grep-recursive-for-command.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-2026-09-04.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-mentions-blocked-commands.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/heredoc-report-mentions-blocked.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-custom-delimiter.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-phrase-split-across-lines.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/hook-self-test-json-payload.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/loop-over-quoted-command-strings.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/mr-note-list-output-json.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/mr-note-list.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/mr-update-then-view.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/mr-view-bare.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/mr-view-grep-pipeline.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/mr-view-output-equals-json.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/mr-view-output-json.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/mr-view-output-short-flag.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/printf-mentions-command.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/python-heredoc-triple-quoted-mention.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/allow/ripgrep-pattern-args.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-absolute-binary-path.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-delete-note-nested-api.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-cd-and-prefix.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-export-host-loop.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-for-loop.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-heredoc-then-call.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-hostname-python-consumer.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-line-continuation.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-method-get-field.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-output-ndjson.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate-before-path.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-per-page-query.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-quoted-paginate-jq.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-redirect-to-file.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-repo-flag-first.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-discussions-var-capture.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-edit-note-put-heredoc.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-input-stdin.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-position-fields.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-note-award-emoji.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-note-by-id-or-retry.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-notes-after-allowed-mr-view.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-notes-query-sort.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-notes-timeout-prefix.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-reply-method-post-after-path.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-reply-post-body-from-file.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-reply-post-heredoc-body.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-resolve-loop.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-resolve-put-field.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/api-single-discussion-by-id.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/heredoc-then-and-chain-to-blocked.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/heredoc-then-pipe-to-blocked.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-note-custom-heredoc-delimiter.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-note-help.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-note-heredoc-body.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-note-inline-after-mr-update.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-note-long-message-flag.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-note-repo-before-message.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-note-second-in-pipeline.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-note-then-close.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-bare.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-loop.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-no-iid.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-page-flag.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-repo-flag.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-cluster.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-flag.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/wrapper-bash-c.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/block/wrapper-sudo.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-discussion/rules.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-without-trace.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-xargs.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-itself.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list-per-page.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-bash-c.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-ref.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-single-quoted.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/ci-lint-local-file.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/ci-list-per-page.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/ci-list.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/ci-status-compact.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/ci-status-pipeline-id.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/comment-only-mention.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/echo-mentions-ci-command.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/git-commit-heredoc-message.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/git-commit-inline-message.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/glab-discussion-read.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/glab-pipeline-inspect.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/grep-pattern-mentions-ci.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/heredoc-brief-mentions-ci-commands.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/heredoc-skill-mentions-ci.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/loop-over-quoted-command-strings.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/printf-mentions-ci-command.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/allow/ripgrep-pattern-args.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-continuation-lines.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-input-and-header.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-method-post-field.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-raw-field-cat.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-after-allowed-metadata.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-env-assignment.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-redirect-to-file.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-retry-loop.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-xargs.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-detail.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-env-assignment.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-hostname-after-path.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-comment-and-loop.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-list.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-nested-loop-timeout.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-paginate-ndjson.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-python-consumer.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-scope-failed-loop.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-status-poll-loop.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-test-report.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-get-after-allowed-status.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-in-echo-chain.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-ref-sleep-prefix.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-get-json-jq-sort-uniq.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-get-then-ci-trace.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-get-var-capture-poll-loop.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-get-with-job-details-repo.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-job-name-with-pipeline.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-pipeline-id-before-job-name.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-redirect-to-file.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-repo-before-job-id.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-view-help.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-view-job-web-or-api.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/ci-view-pipeline-id.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/heredoc-then-pipe-to-blocked.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/pipe-get-alias.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/pipeline-view-alias.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/wrapper-bash-c.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/block/wrapper-sudo.sh +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/fixtures/match/glab-pipeline/rules.yaml +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_cli.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_cli_serialization.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_match_fixtures.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_models.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_output_paths.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_parser.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_public_api.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_schema.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_sensitive_paths.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/tests/test_smoke.py +0 -0
- {bash_classify-0.13.1 → bash_classify-0.14.1}/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.1
|
|
4
4
|
Summary: Classify bash commands as READONLY, WRITE, DANGEROUS, or UNKNOWN
|
|
5
5
|
Project-URL: Homepage, https://github.com/fprochazka/bash-classify
|
|
6
6
|
Project-URL: Repository, https://github.com/fprochazka/bash-classify
|
|
@@ -213,7 +213,33 @@ Once installed, any Bash tool call with `risk: LOW` is auto-approved — no perm
|
|
|
213
213
|
bash-classify loads command definitions from two locations:
|
|
214
214
|
|
|
215
215
|
- **Built-in database** — 150+ command definitions bundled with the package, covering common Unix utilities, package managers, container tools, cloud CLIs, and more. Lives in `src/bash_classify/commands/*.yaml`.
|
|
216
|
-
- **User database** — your own command definitions at `~/.config/bash-classify/commands/*.yaml` (override the location with the `BASH_CLASSIFY_CONFIG_DIR` env var, which resolves to `$BASH_CLASSIFY_CONFIG_DIR/commands/`).
|
|
216
|
+
- **User database** — your own command definitions at `~/.config/bash-classify/commands/*.yaml` (override the location with the `BASH_CLASSIFY_CONFIG_DIR` env var, which resolves to `$BASH_CLASSIFY_CONFIG_DIR/commands/`). A file here lets you classify internal tools, company-specific wrappers or personal CLIs without forking the repo.
|
|
217
|
+
|
|
218
|
+
A user file that shares its name with a built-in one picks one of two things to do with it.
|
|
219
|
+
|
|
220
|
+
**Replace it** — the default, and what a file with no `extends` key has always done. The bundled definition is discarded whole: its subcommands, its options, its base classification, all of it. Use this when your binary has nothing to do with the bundled one of the same name, or when you need the bundled file's answer *gone* rather than adjusted.
|
|
221
|
+
|
|
222
|
+
**Extend it** — `extends: builtin` merges your file over the bundled one, so you declare only what you are adding or changing. Use this to teach a command the subcommands your own setup gives it, which is otherwise a fork of a file that keeps growing underneath you:
|
|
223
|
+
|
|
224
|
+
```yaml
|
|
225
|
+
# ~/.config/bash-classify/commands/git.yaml
|
|
226
|
+
command: git
|
|
227
|
+
extends: builtin
|
|
228
|
+
subcommands:
|
|
229
|
+
tally: {classification: LOCAL_EFFECTS, risk: LOW}
|
|
230
|
+
ledger: {classification: READONLY}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Everything the bundled `git` knows is still there; `git tally` and `git ledger` are now two more subcommands it knows. Mappings merge key by key at every depth, so naming one field of a subcommand changes that field and leaves the rest of the bundled entry alone — `push: {risk: LOW}` keeps `git push` at `EXTERNAL_EFFECTS` and keeps `--force` dangerous. A scalar, a list, and a `delegates_to` block replace their bundled counterpart outright.
|
|
234
|
+
|
|
235
|
+
The guarantee is that **merging never drops a bundled subcommand or option.** It is not a blanket "cannot remove": a list is replaced rather than merged, so `aliases: []` does drop the bundled aliases, and that is the one deliberate way to take something away. A file that has to drop a bundled subcommand or option leaves `extends` off and replaces the definition instead.
|
|
236
|
+
|
|
237
|
+
Four things are load errors rather than quiet surprises, because a user database is never schema-validated at load and every one of these fails towards auto-approval:
|
|
238
|
+
|
|
239
|
+
- **`extends: builtin` on a command the bundled database does not define.** There is nothing to merge. The message names the file and the command, and no fallback to replacement happens.
|
|
240
|
+
- **Any key the loader does not recognise,** at every level of the file. `extends: bultin` is caught this way, and so is `clasification: READONLY`.
|
|
241
|
+
- **A key written with no value.** YAML reads `classification:` with nothing after it as `null`, not as an absent key, and it would replace the bundled value with the default — which is always the weaker answer. Typing half a line, or commenting a value out while you think about it, would otherwise turn `git <anything unrecognised>` from `DANGEROUS` into `READONLY` without a word. For a *subcommand or option entry* you mean to leave at its bundled settings, write `{}`; that merges as the no-op it looks like. `delegates_to: {}` is not in that class and is refused too, because an empty block parses as "does not delegate" — omit the key instead.
|
|
242
|
+
- **An option written under a name the bundled file spells as an alias of another option.** `kubectl.yaml` files `-n` only as an alias of `--namespace`, and aliases are expanded after the merge, so an entry added under `-n` shadows the bundled option rather than changing it — it loses `takes_value`, and `kubectl -n prod delete pod x` stops resolving `delete`. Write the entry under `--namespace`.
|
|
217
243
|
|
|
218
244
|
Both directories use the same YAML format. See [docs/classification-guidance.md](docs/classification-guidance.md) for how to add new commands. YAML definitions are validated against a [JSON Schema](schemas/command.schema.json) for IDE autocomplete and CI checks.
|
|
219
245
|
|
|
@@ -184,7 +184,33 @@ Once installed, any Bash tool call with `risk: LOW` is auto-approved — no perm
|
|
|
184
184
|
bash-classify loads command definitions from two locations:
|
|
185
185
|
|
|
186
186
|
- **Built-in database** — 150+ command definitions bundled with the package, covering common Unix utilities, package managers, container tools, cloud CLIs, and more. Lives in `src/bash_classify/commands/*.yaml`.
|
|
187
|
-
- **User database** — your own command definitions at `~/.config/bash-classify/commands/*.yaml` (override the location with the `BASH_CLASSIFY_CONFIG_DIR` env var, which resolves to `$BASH_CLASSIFY_CONFIG_DIR/commands/`).
|
|
187
|
+
- **User database** — your own command definitions at `~/.config/bash-classify/commands/*.yaml` (override the location with the `BASH_CLASSIFY_CONFIG_DIR` env var, which resolves to `$BASH_CLASSIFY_CONFIG_DIR/commands/`). A file here lets you classify internal tools, company-specific wrappers or personal CLIs without forking the repo.
|
|
188
|
+
|
|
189
|
+
A user file that shares its name with a built-in one picks one of two things to do with it.
|
|
190
|
+
|
|
191
|
+
**Replace it** — the default, and what a file with no `extends` key has always done. The bundled definition is discarded whole: its subcommands, its options, its base classification, all of it. Use this when your binary has nothing to do with the bundled one of the same name, or when you need the bundled file's answer *gone* rather than adjusted.
|
|
192
|
+
|
|
193
|
+
**Extend it** — `extends: builtin` merges your file over the bundled one, so you declare only what you are adding or changing. Use this to teach a command the subcommands your own setup gives it, which is otherwise a fork of a file that keeps growing underneath you:
|
|
194
|
+
|
|
195
|
+
```yaml
|
|
196
|
+
# ~/.config/bash-classify/commands/git.yaml
|
|
197
|
+
command: git
|
|
198
|
+
extends: builtin
|
|
199
|
+
subcommands:
|
|
200
|
+
tally: {classification: LOCAL_EFFECTS, risk: LOW}
|
|
201
|
+
ledger: {classification: READONLY}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Everything the bundled `git` knows is still there; `git tally` and `git ledger` are now two more subcommands it knows. Mappings merge key by key at every depth, so naming one field of a subcommand changes that field and leaves the rest of the bundled entry alone — `push: {risk: LOW}` keeps `git push` at `EXTERNAL_EFFECTS` and keeps `--force` dangerous. A scalar, a list, and a `delegates_to` block replace their bundled counterpart outright.
|
|
205
|
+
|
|
206
|
+
The guarantee is that **merging never drops a bundled subcommand or option.** It is not a blanket "cannot remove": a list is replaced rather than merged, so `aliases: []` does drop the bundled aliases, and that is the one deliberate way to take something away. A file that has to drop a bundled subcommand or option leaves `extends` off and replaces the definition instead.
|
|
207
|
+
|
|
208
|
+
Four things are load errors rather than quiet surprises, because a user database is never schema-validated at load and every one of these fails towards auto-approval:
|
|
209
|
+
|
|
210
|
+
- **`extends: builtin` on a command the bundled database does not define.** There is nothing to merge. The message names the file and the command, and no fallback to replacement happens.
|
|
211
|
+
- **Any key the loader does not recognise,** at every level of the file. `extends: bultin` is caught this way, and so is `clasification: READONLY`.
|
|
212
|
+
- **A key written with no value.** YAML reads `classification:` with nothing after it as `null`, not as an absent key, and it would replace the bundled value with the default — which is always the weaker answer. Typing half a line, or commenting a value out while you think about it, would otherwise turn `git <anything unrecognised>` from `DANGEROUS` into `READONLY` without a word. For a *subcommand or option entry* you mean to leave at its bundled settings, write `{}`; that merges as the no-op it looks like. `delegates_to: {}` is not in that class and is refused too, because an empty block parses as "does not delegate" — omit the key instead.
|
|
213
|
+
- **An option written under a name the bundled file spells as an alias of another option.** `kubectl.yaml` files `-n` only as an alias of `--namespace`, and aliases are expanded after the merge, so an entry added under `-n` shadows the bundled option rather than changing it — it loses `takes_value`, and `kubectl -n prod delete pod x` stops resolving `delete`. Write the entry under `--namespace`.
|
|
188
214
|
|
|
189
215
|
Both directories use the same YAML format. See [docs/classification-guidance.md](docs/classification-guidance.md) for how to add new commands. YAML definitions are validated against a [JSON Schema](schemas/command.schema.json) for IDE autocomplete and CI checks.
|
|
190
216
|
|
|
@@ -513,6 +513,22 @@ Step 5: classification
|
|
|
513
513
|
|
|
514
514
|
YAML files, one per command or command family. Loaded from a `commands/` directory.
|
|
515
515
|
|
|
516
|
+
### Where files are loaded from
|
|
517
|
+
|
|
518
|
+
Two directories, in this order: the bundled `src/bash_classify/commands/`, then the user's own `~/.config/bash-classify/commands/` (or `$BASH_CLASSIFY_CONFIG_DIR/commands/` when that variable is set). A user file whose name no bundled file uses simply adds a command. A user file that shares its name with a bundled one resolves in one of two ways, and the file itself chooses:
|
|
519
|
+
|
|
520
|
+
- **Without `extends`** -- the default -- the user file *replaces* the bundled definition entirely. Nothing of the bundled file survives: not its subcommands, not its options, not its base classification.
|
|
521
|
+
- **With `extends: builtin`** the user file is *merged over* the bundled one. Mappings merge key by key at every depth, so `subcommands`, `options`, `global_options`, and the fields of a single subcommand or option present in both files, all merge. A scalar, a list and a `delegates_to` block replace their bundled counterpart outright. The guarantee is that merging never drops a bundled subcommand or option; it is not a blanket "cannot remove", because a list is replaced, so `aliases: []` does drop the bundled aliases and is the one deliberate way to take something away.
|
|
522
|
+
|
|
523
|
+
An extending file is held to four rules that a replacing file is not, because each one would otherwise resolve towards the weaker verdict:
|
|
524
|
+
|
|
525
|
+
- **Nothing to extend is an error.** `extends: builtin` in a file whose name the bundled database does not carry is a load error naming the file and the command, never a silent replacement. The lookup is keyed on the *filename*, so `zzmytool.yaml` is filed under `zzmytool` whatever its `command:` says. `extends` is likewise meaningless when an explicit commands directory is passed to `load_database`, because the file is then itself the bundled definition, and that has its own message rather than being a no-op.
|
|
526
|
+
- **A key written with no value is an error.** YAML reads `classification:` with nothing after it as the value `None`, and every parser reads `None` as "not set, use the default", so it replaces the bundled value rather than leaving it alone. The default is always the weaker answer: a blank `classification:` took `git <anything unrecognised>` from `DANGEROUS` to `READONLY`, a blank `delegates_to:` took `xargs rm -rf` the same way, and a bare `subcommands:` erased every subcommand in the file. A subcommand or option entry meant to keep its bundled settings is written `{}`, which merges as a no-op; `delegates_to: {}` is not in that class and is an error of its own, because an empty block parses as "does not delegate" and losing a delegation lowers the verdict the same way. In a replacing file a blank key deletes nothing, so `-i:` there still means "an option with all defaults", which the format has always accepted even though no bundled file uses the spelling.
|
|
527
|
+
- **An option under a bundled alias spelling is an error.** Aliases are expanded after the merge, in file order, so an entry written under a name the bundled file spells as an alias of another option is a separate definition built from defaults, not a change to the bundled one. `kubectl.yaml` files `-n` only as an alias of `--namespace`; an entry under `-n` cost it `takes_value` and dropped `kubectl -n prod delete pod x` from `DANGEROUS` to `EXTERNAL_EFFECTS`. The entry goes under the primary name.
|
|
528
|
+
- **A subcommand that collides with a bundled alias is an error,** from the same alias-collision check that applies to any file.
|
|
529
|
+
|
|
530
|
+
Only the bundled files are validated against `schemas/command.schema.json`, by `tests/test_schema.py`, which is to say wherever the suite runs and never at load time. The loader therefore enforces the schema's key allowlists itself, at all four levels the schema closes with `additionalProperties: false`: command, subcommand, option and `delegates_to`. A key the loader does not recognise is a load error naming the file, the object it sits on, the unrecognised spelling and the accepted ones. Resolution is lazy: a command is parsed when it is first asked for, and an extending command reads its two files then and not before.
|
|
531
|
+
|
|
516
532
|
### Example: `commands/kubectl.yaml`
|
|
517
533
|
|
|
518
534
|
```yaml
|
|
@@ -943,7 +959,7 @@ The `delegates_to` field defines how a command (or option like `find -exec`) han
|
|
|
943
959
|
|
|
944
960
|
| Mode | How the inner argv is extracted | Example |
|
|
945
961
|
|---|---|---|
|
|
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. | `xargs grep -r foo` → inner: `["grep", "-r", "foo"]` |
|
|
962
|
+
| `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"]` |
|
|
947
963
|
| `after_separator` | Everything after the `separator` token forms the inner argv. | `kubectl exec pod -- ls -la` → inner: `["ls", "-la"]` |
|
|
948
964
|
| `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"]` |
|
|
949
965
|
| `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) |
|
|
@@ -970,6 +986,7 @@ When command-level delegation resolves at least one inner command (and no option
|
|
|
970
986
|
| Field | Type | Description |
|
|
971
987
|
|---|---|---|
|
|
972
988
|
| `command` | `string` | Binary name |
|
|
989
|
+
| `extends` | `builtin` | User database only: merge this file over the bundled definition of the same name instead of replacing it |
|
|
973
990
|
| `classification` | `enum` | Default classification for the command (when no subcommand matched) |
|
|
974
991
|
| `global_options` | `map` | Options that appear before subcommands and are stripped before matching |
|
|
975
992
|
| `subcommands` | `map` | Nested subcommand definitions (recursive structure) |
|
|
@@ -50,7 +50,7 @@ The overall classification of a full expression (e.g. a pipeline) is the **maxim
|
|
|
50
50
|
|
|
51
51
|
## 3. Database File Format
|
|
52
52
|
|
|
53
|
-
Each YAML file defines one command (binary). Files live in `src/bash_classify/commands/` and are validated against the JSON Schema at `schemas/command.schema.json`.
|
|
53
|
+
Each YAML file defines one command (binary). Files live in `src/bash_classify/commands/` and are validated against the JSON Schema at `schemas/command.schema.json`. The same format is read from a user database at `~/.config/bash-classify/commands/` (or `$BASH_CLASSIFY_CONFIG_DIR/commands/`) -- see [Extending a bundled command](#extending-a-bundled-command) for what a user file of the same name does to the bundled one.
|
|
54
54
|
|
|
55
55
|
### Annotated Example
|
|
56
56
|
|
|
@@ -71,15 +71,18 @@ options: # options that affect classification
|
|
|
71
71
|
|
|
72
72
|
### Field Reference
|
|
73
73
|
|
|
74
|
+
Every key below is the only spelling the loader accepts at that level. A key it does not know is a load error naming the file, the command or option it sits on, the unrecognised spelling and the accepted ones. That matters most outside this repo: only the bundled files are validated against the JSON Schema in CI, so in a user database this check is the only thing standing between `clasification: READONLY` and a command that silently keeps its default classification.
|
|
75
|
+
|
|
74
76
|
#### Top-level fields
|
|
75
77
|
|
|
76
78
|
| Field | Type | Default | Description |
|
|
77
79
|
|-------|------|---------|-------------|
|
|
78
80
|
| `command` | string | *(required)* | Binary name (e.g. `kubectl`, `git`, `sed`) |
|
|
79
81
|
| `description` | string | -- | Short one-liner describing the tool |
|
|
82
|
+
| `extends` | `builtin` | -- | User database only: merge this file over the bundled definition of the same name rather than replacing it -- see [Extending a bundled command](#extending-a-bundled-command) |
|
|
80
83
|
| `classification` | enum | `READONLY` | Base classification when no subcommand matches |
|
|
81
84
|
| `strict` | boolean | `true` | If true, unrecognized options yield UNKNOWN |
|
|
82
|
-
| `global_options` | map | -- | Options
|
|
85
|
+
| `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
86
|
| `options` | map | -- | Options that affect classification |
|
|
84
87
|
| `subcommands` | map | -- | Nested subcommand definitions (recursive) |
|
|
85
88
|
| `delegates_to` | object | -- | How the command hands off to an inner command |
|
|
@@ -112,6 +115,7 @@ subcommands:
|
|
|
112
115
|
| `overrides` | enum | When present, override classification to this level |
|
|
113
116
|
| `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
117
|
| `names_output_path` | boolean | The option's value is a path the command writes (`curl -o`, `sort -o`). It lands in `write_paths`. |
|
|
118
|
+
| `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
119
|
| `delegates_to` | object | This option triggers delegation (e.g. `find -exec`) |
|
|
116
120
|
|
|
117
121
|
##### Marking an option as an output path
|
|
@@ -124,6 +128,92 @@ subcommands:
|
|
|
124
128
|
|
|
125
129
|
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
130
|
|
|
131
|
+
### Extending a bundled command
|
|
132
|
+
|
|
133
|
+
A user file with the same name as a bundled one **replaces** it by default: the bundled subcommands, options and base classification are all discarded. Adding `extends: builtin` at the top level **merges** the file over the bundled one instead.
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
# ~/.config/bash-classify/commands/git.yaml
|
|
137
|
+
command: git
|
|
138
|
+
extends: builtin
|
|
139
|
+
subcommands:
|
|
140
|
+
tally: {classification: LOCAL_EFFECTS, risk: LOW} # a subcommand only this machine has
|
|
141
|
+
ledger: {classification: READONLY}
|
|
142
|
+
push: {risk: LOW} # one field of a bundled subcommand
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The merge rule is one sentence: **mappings merge key by key at every depth; a scalar, a list and a `delegates_to` block replace their bundled counterpart outright.**
|
|
146
|
+
|
|
147
|
+
| In the user file | What the merge does |
|
|
148
|
+
|---|---|
|
|
149
|
+
| `classification`, `risk`, `strict`, `subcommand_mode`, `description` | Replaces the bundled value. Absent, the bundled value stands. |
|
|
150
|
+
| `subcommands`, `options`, `global_options` | Merged by name. Entries only the bundled file has survive; entries only the user file has are added. |
|
|
151
|
+
| A subcommand or option present in both | Merged field by field, recursively. `push: {risk: LOW}` keeps `push`'s bundled classification **and** its `--force` override. |
|
|
152
|
+
| `aliases`, or any other list | Replaced. Lists have no keys to merge on, and appending would make an unwanted bundled alias impossible to drop. |
|
|
153
|
+
| A key written with no value | Rejected -- see below. YAML reads it as a value, and it would replace the bundled one with the default. |
|
|
154
|
+
| `delegates_to` | Replaced whole. `mode` decides which of its other fields mean anything, so half of one block merged into half of another is not a configuration anyone wrote. |
|
|
155
|
+
| `alias_of` | Rejected. An alias file points at another command instead of defining one, so it has nothing to extend. |
|
|
156
|
+
|
|
157
|
+
Field-by-field merging of an entry present in both files is the choice worth stating, because the alternative fails in the unsafe direction. Under wholesale replacement of the named entry, `push: {risk: LOW}` would silently delete `--force: {overrides: DANGEROUS}` along with everything else `git push` carries, and the file would read as though it had only lowered a risk.
|
|
158
|
+
|
|
159
|
+
The guarantee is that **merging never drops a bundled subcommand or option.** It is not a blanket "cannot remove": a list is replaced rather than merged, so `aliases: []` does drop the bundled aliases, and that is the one deliberate way to take something away. A file that has to drop a bundled subcommand or option leaves `extends` off and replaces the definition instead -- and then owns the whole thing, including whatever the bundled file grows later.
|
|
160
|
+
|
|
161
|
+
#### What errors rather than passing quietly
|
|
162
|
+
|
|
163
|
+
A user database is never schema-validated at load, and every mistake below resolves towards auto-approval, so each one is a load error naming the file and what is wrong with it.
|
|
164
|
+
|
|
165
|
+
**A key written with no value.** This is the one worth reading twice, because it looks like nothing:
|
|
166
|
+
|
|
167
|
+
```yaml
|
|
168
|
+
command: git
|
|
169
|
+
extends: builtin
|
|
170
|
+
classification: # <- not "leave the bundled value alone"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
YAML reads that as the value `None`, not as an absent key, and every parser below reads `None` as "not set, use the default". So it replaces the bundled value, and the default it falls back to is always the weaker answer -- here it took `git <anything unrecognised>` from `DANGEROUS` to `READONLY`, which is the exact case `git.yaml`'s own comment explains the DANGEROUS base exists for. A bare `subcommands:` erased every subcommand in the file; `delegates_to:` took `xargs rm -rf` from `DANGEROUS` to `READONLY`. Typing half a line and leaving the value for later, or commenting a value out while thinking about it, must not read as consent.
|
|
174
|
+
|
|
175
|
+
For a *subcommand or option entry* you mean to keep at its bundled settings, write `{}` -- `-delete: {}` merges as the no-op it looks like. `delegates_to` is the exception: an empty block there parses as "does not delegate", which is the same loss the blank spelling caused, so `delegates_to: {}` is refused as well and the remedy is to omit the key. The blank rule is scoped to extending files: in a file that stands alone a blank key overwrites nothing, and `-i:` meaning "an option with all defaults" is a spelling the format has always accepted -- no bundled file uses it, but files outside this repository may.
|
|
176
|
+
|
|
177
|
+
**An option written under a name the bundled file spells as an alias.** Aliases are expanded after the merge, in file order, so an entry added under an alias spelling is a separate definition built from defaults, not a change to the bundled option:
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
command: kubectl
|
|
181
|
+
extends: builtin
|
|
182
|
+
global_options:
|
|
183
|
+
-n: {} # <- rejected: write it under --namespace
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
`kubectl.yaml` files `-n` only as `--namespace: {takes_value: true, aliases: [-n]}`. The entry above cost `-n` its `takes_value`, so `prod` filled the subcommand slot, `delete` never matched, and `kubectl -n prod delete pod x` fell from `DANGEROUS` to `EXTERNAL_EFFECTS`. Whether an option merged or shadowed used to depend on whether the bundled file happened to also list the alias as a key of its own, which is no rule at all.
|
|
187
|
+
|
|
188
|
+
**A subcommand the bundled file already lists as an alias of another subcommand.** `glab pipeline` is a bundled alias of `glab ci`, so declaring `pipeline` is caught by the existing alias-collision check. Override that subcommand's `aliases` in the same file to claim the name.
|
|
189
|
+
|
|
190
|
+
**`extends: builtin` naming a command the bundled database does not define.** There is nothing to merge. The lookup is keyed on the *filename*, so `zzmytool.yaml` is filed under `zzmytool` whatever its `command:` says, and the message names the file it looked for.
|
|
191
|
+
|
|
192
|
+
**Any key the loader does not recognise,** at any level. `extends: bultin` is caught this way, and so is `clasification: READONLY`.
|
|
193
|
+
|
|
194
|
+
### Global options apply at every depth
|
|
195
|
+
|
|
196
|
+
`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.
|
|
197
|
+
|
|
198
|
+
A short flag whose long spelling differs per subcommand is the trap, and `-v` is almost always that flag:
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
docker -v -> --version, prints and exits
|
|
202
|
+
docker compose down -v -> --volumes, removes the named volumes
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
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`.
|
|
206
|
+
|
|
207
|
+
Three answers, in order of preference:
|
|
208
|
+
|
|
209
|
+
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.
|
|
210
|
+
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.
|
|
211
|
+
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.
|
|
212
|
+
|
|
213
|
+
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.
|
|
214
|
+
|
|
215
|
+
**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.
|
|
216
|
+
|
|
127
217
|
#### The `# $schema:` comment
|
|
128
218
|
|
|
129
219
|
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 +358,44 @@ Some commands do not do work themselves -- they delegate to an inner command. ba
|
|
|
268
358
|
|
|
269
359
|
### Pure-wrapper rule of thumb
|
|
270
360
|
|
|
271
|
-
For commands that are pure passthroughs -- they do nothing themselves beyond running the inner command (e.g. `env`, `xargs
|
|
361
|
+
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
362
|
|
|
273
363
|
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
364
|
|
|
365
|
+
### The base is what is left when delegation resolves nothing
|
|
366
|
+
|
|
367
|
+
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`.
|
|
368
|
+
|
|
369
|
+
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.
|
|
370
|
+
|
|
371
|
+
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.
|
|
372
|
+
|
|
373
|
+
### The base also classifies every subcommand the group does not model
|
|
374
|
+
|
|
375
|
+
`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.
|
|
376
|
+
|
|
377
|
+
Pick the base from what the tool does with a word it does not recognise:
|
|
378
|
+
|
|
379
|
+
- 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.
|
|
380
|
+
- 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.
|
|
381
|
+
- It refuses it and the file is the whole surface. Leave the base off.
|
|
382
|
+
|
|
383
|
+
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.
|
|
384
|
+
|
|
385
|
+
**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.
|
|
386
|
+
|
|
275
387
|
### `rest_are_argv`
|
|
276
388
|
|
|
277
|
-
All remaining positional args (after the wrapper's own options) form the inner command.
|
|
389
|
+
All remaining positional args (after the wrapper's own options) form the inner command. One leading `--` is the
|
|
390
|
+
wrapper's own end-of-options marker rather than the program word, and is skipped: `sudo -- rm -rf /` delegates to
|
|
391
|
+
`rm`, not to `--`.
|
|
392
|
+
|
|
393
|
+
That holds only while the `--` comes before any operand of the wrapper itself, because that is the only place the
|
|
394
|
+
wrapper's own option parser is still reading. `env` stops at the first assignment and `timeout` at the duration, so
|
|
395
|
+
in `env FOO=bar -- ls` and `timeout 5 -- ls` the `--` really is the program word and both really do fail with "No
|
|
396
|
+
such file or directory" -- the database says `UNKNOWN` because the shell says 127. `timeout -- 5 ls`, which a real
|
|
397
|
+
`timeout` accepts, skips the marker and then the duration, and resolves to `ls`. Only one marker is skipped: POSIX
|
|
398
|
+
makes the second `--` in `sudo -- -- ls` the program name.
|
|
278
399
|
|
|
279
400
|
**xargs:** `xargs grep -r foo` -- inner command is `["grep", "-r", "foo"]`
|
|
280
401
|
|
|
@@ -315,6 +436,8 @@ Everything after a separator token forms the inner command.
|
|
|
315
436
|
|
|
316
437
|
**kubectl exec:** `kubectl exec -it my-pod -- cat /etc/config` -- inner command is `["cat", "/etc/config"]`
|
|
317
438
|
|
|
439
|
+
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.
|
|
440
|
+
|
|
318
441
|
```yaml
|
|
319
442
|
subcommands:
|
|
320
443
|
exec:
|
|
@@ -406,7 +529,7 @@ Some commands default to a higher classification when used without a recognized
|
|
|
406
529
|
|
|
407
530
|
- **kubectl** -- base `EXTERNAL_EFFECTS` (bare `kubectl` without a known subcommand should not be auto-allowed)
|
|
408
531
|
- **terraform** -- base `DANGEROUS` (unknown terraform subcommands could modify infrastructure)
|
|
409
|
-
- **docker** --
|
|
532
|
+
- **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
533
|
|
|
411
534
|
### Shell builtins hardcoded in the matcher
|
|
412
535
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"required": ["alias_of"],
|
|
13
13
|
"not": {
|
|
14
14
|
"anyOf": [
|
|
15
|
+
{"required": ["extends"]},
|
|
15
16
|
{"required": ["classification"]},
|
|
16
17
|
{"required": ["risk"]},
|
|
17
18
|
{"required": ["subcommands"]},
|
|
@@ -37,9 +38,13 @@
|
|
|
37
38
|
"type": "string",
|
|
38
39
|
"description": "Short description of the tool"
|
|
39
40
|
},
|
|
41
|
+
"extends": {
|
|
42
|
+
"const": "builtin",
|
|
43
|
+
"description": "Only meaningful in a user database (~/.config/bash-classify/commands/ or $BASH_CLASSIFY_CONFIG_DIR/commands/). With it, this file is merged over the bundled definition of the same name instead of replacing it: mappings merge key by key at every depth, while a scalar, a list or a `delegates_to` block replaces its bundled counterpart. Without it, the file replaces the bundled definition outright. A file that names a command the bundled database does not define is a load error. Mutually exclusive with alias_of."
|
|
44
|
+
},
|
|
40
45
|
"alias_of": {
|
|
41
46
|
"type": "string",
|
|
42
|
-
"description": "Name of another command in the database whose definition should be used verbatim. Mutually exclusive with classification/risk/subcommands/options/global_options/subcommand_mode/delegates_to/strict."
|
|
47
|
+
"description": "Name of another command in the database whose definition should be used verbatim. Mutually exclusive with extends/classification/risk/subcommands/options/global_options/subcommand_mode/delegates_to/strict."
|
|
43
48
|
},
|
|
44
49
|
"classification": {
|
|
45
50
|
"$ref": "#/$defs/Classification"
|
|
@@ -162,6 +167,10 @@
|
|
|
162
167
|
"type": "boolean",
|
|
163
168
|
"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
169
|
},
|
|
170
|
+
"before_subcommand_only": {
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"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."
|
|
173
|
+
},
|
|
165
174
|
"delegates_to": {
|
|
166
175
|
"$ref": "#/$defs/DelegationConfig"
|
|
167
176
|
}
|
|
@@ -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))
|
|
@@ -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
|