bash-classify 0.13.0__tar.gz → 0.13.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bash_classify-0.13.0 → bash_classify-0.13.1}/.claude-plugin/marketplace.json +1 -1
- {bash_classify-0.13.0 → bash_classify-0.13.1}/.gitignore +3 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/PKG-INFO +1 -1
- {bash_classify-0.13.0 → bash_classify-0.13.1}/SPEC.md +16 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/coding-agent-plugins/claude-code/.claude-plugin/plugin.json +1 -1
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/classifier.py +123 -6
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_classifier.py +372 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/.claude/rules/command-database.md +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/.editorconfig +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/.github/workflows/ci.yml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/.github/workflows/publish.yml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/.python-version +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/CLAUDE.md +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/LICENSE +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/README.md +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/coding-agent-plugins/claude-code/hooks/hook-permission-request.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/coding-agent-plugins/claude-code/hooks/hook-pre-tool-use.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/coding-agent-plugins/claude-code/hooks/hooks.json +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/docs/classification-guidance.md +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/pyproject.toml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/ruff.toml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/schemas/command.schema.json +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/schemas/match-rules.schema.json +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/schemas/sensitive-paths.schema.json +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/__init__.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/__main__.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/cli.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/agent-browser.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/apt.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/awk.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/basename.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/bash-classify.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/bash.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/black.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/brew.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/builtin.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/cargo.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/cat.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/chgrp.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/chmod.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/chown.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/column.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/comm.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/command.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/cp.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/curl.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/cut.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/date.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/df.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/diff.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/dig.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/dirname.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/docker.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/du.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/echo.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/env.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/eslint.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/eval.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/exec.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/expand.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/false.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/file.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/find.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/fmt.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/fold.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/free.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/gawk.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/gcloud.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/gh.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/git.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/glab-discussion.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/glab.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/go.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/gog.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/gradle.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/gradlew.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/grep.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/groups.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/gunzip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/gws.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/gzip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/hadolint.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/head.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/helm.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/hostname.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/id.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/install.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/isort.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/java.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/javac.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/join.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/journalctl.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/jq.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/kill.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/killall.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/kubectl.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/less.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/ln.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/ls.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/make.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/md5sum.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/mise.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/mkdir.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/more.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/mv.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/mvn.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/mvnw.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/mypy.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/netstat.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/nice.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/nl.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/node.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/nohup.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/npm.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/npx.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/nslookup.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/paste.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/ping.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/pip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/pip3.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/pipx.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/pkill.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/pnpm.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/poetry.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/prettier.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/printenv.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/printf.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/ps.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/pup.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/pwd.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/pytest.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/python.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/python3.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/read.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/readlink.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/realpath.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/rev.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/rg.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/rm.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/rsync.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/rtk.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/ruff.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/scp.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/sed.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/seq.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/sh.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/sha1sum.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/sha256sum.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/shellcheck.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/slack.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/sleep.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/snip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/sort.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/ss.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/ssh.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/stat.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/stdbuf.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/strace.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/strings.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/sudo.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/systemctl.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/tac.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/tail.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/tar.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/tee.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/terraform.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/test.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/time.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/timeout.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/top.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/touch.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/tr.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/traceroute.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/true.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/tsc.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/type.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/uname.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/unexpand.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/uniq.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/unzip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/uptime.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/uv.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/wait.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/wc.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/wget.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/whereis.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/which.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/whoami.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/xargs.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/xmllint.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/yarn.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/yes.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/yq.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/zip.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/commands/zsh.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/database.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/matcher.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/models.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/parser.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/py.typed +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/redirects.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/rules.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/sensitive-paths.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/src/bash_classify/sensitive.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/__init__.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/conftest.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-award-emoji.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-include-diverged.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-itself.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-pipelines-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-merge-request-update-description.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/api-project-lookup.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/ci-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/comment-only-mention.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/echo-mentions-api-endpoint.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/echo-mentions-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/git-commit-heredoc-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/git-commit-inline-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read-and-api-mr.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/glab-pipeline-inspect.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/grep-pattern-mentions-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/grep-recursive-for-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-2026-09-04.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-mentions-blocked-commands.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-report-mentions-blocked.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-custom-delimiter.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-phrase-split-across-lines.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/hook-self-test-json-payload.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/loop-over-quoted-command-strings.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-note-list-output-json.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-note-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-update-then-view.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-bare.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-grep-pipeline.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-output-equals-json.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-output-json.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/mr-view-output-short-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/printf-mentions-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/python-heredoc-triple-quoted-mention.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/allow/ripgrep-pattern-args.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-absolute-binary-path.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-delete-note-nested-api.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-cd-and-prefix.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-export-host-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-for-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-heredoc-then-call.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-hostname-python-consumer.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-line-continuation.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-method-get-field.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-output-ndjson.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate-before-path.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-per-page-query.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-quoted-paginate-jq.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-redirect-to-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-repo-flag-first.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-discussions-var-capture.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-edit-note-put-heredoc.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-input-stdin.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-position-fields.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-note-award-emoji.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-note-by-id-or-retry.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-notes-after-allowed-mr-view.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-notes-query-sort.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-notes-timeout-prefix.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-reply-method-post-after-path.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-reply-post-body-from-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-reply-post-heredoc-body.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-resolve-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-resolve-put-field.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/api-single-discussion-by-id.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/heredoc-then-and-chain-to-blocked.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/heredoc-then-pipe-to-blocked.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-custom-heredoc-delimiter.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-help.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-heredoc-body.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-inline-after-mr-update.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-long-message-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-repo-before-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-second-in-pipeline.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-note-then-close.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-bare.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-no-iid.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-page-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-repo-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-cluster.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-flag.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/wrapper-bash-c.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/block/wrapper-sudo.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-discussion/rules.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-without-trace.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-xargs.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-itself.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list-per-page.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-bash-c.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-ref.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-single-quoted.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-lint-local-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-list-per-page.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-status-compact.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ci-status-pipeline-id.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/comment-only-mention.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/echo-mentions-ci-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/git-commit-heredoc-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/git-commit-inline-message.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/glab-discussion-read.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/glab-pipeline-inspect.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/grep-pattern-mentions-ci.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/heredoc-brief-mentions-ci-commands.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/heredoc-skill-mentions-ci.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/loop-over-quoted-command-strings.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/printf-mentions-ci-command.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/allow/ripgrep-pattern-args.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-continuation-lines.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-input-and-header.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-method-post-field.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-raw-field-cat.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-after-allowed-metadata.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-env-assignment.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-redirect-to-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-retry-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-job-trace-xargs.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-detail.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-env-assignment.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-hostname-after-path.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-comment-and-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-list.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-nested-loop-timeout.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-paginate-ndjson.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-python-consumer.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-scope-failed-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-status-poll-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/api-pipeline-test-report.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-after-allowed-status.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-in-echo-chain.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-ref-sleep-prefix.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-json-jq-sort-uniq.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-then-ci-trace.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-var-capture-poll-loop.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-get-with-job-details-repo.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-job-name-with-pipeline.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-pipeline-id-before-job-name.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-redirect-to-file.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-trace-repo-before-job-id.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-view-help.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-view-job-web-or-api.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/ci-view-pipeline-id.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/heredoc-then-pipe-to-blocked.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/pipe-get-alias.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/pipeline-view-alias.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/wrapper-bash-c.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/block/wrapper-sudo.sh +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/fixtures/match/glab-pipeline/rules.yaml +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_cli.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_cli_serialization.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_database.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_match_fixtures.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_matcher.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_models.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_output_paths.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_parser.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_public_api.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_real_world.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_rules.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_schema.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_sensitive_paths.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/tests/test_smoke.py +0 -0
- {bash_classify-0.13.0 → bash_classify-0.13.1}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: bash-classify
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.1
|
|
4
4
|
Summary: Classify bash commands as READONLY, WRITE, DANGEROUS, or UNKNOWN
|
|
5
5
|
Project-URL: Homepage, https://github.com/fprochazka/bash-classify
|
|
6
6
|
Project-URL: Repository, https://github.com/fprochazka/bash-classify
|
|
@@ -330,6 +330,22 @@ Certain expression-level patterns elevate risk to at least `HIGH`:
|
|
|
330
330
|
- Backgrounding (`cmd &`)
|
|
331
331
|
- Output redirects to non-`/dev/null` targets (except when all write targets are under `/tmp` or `/var/tmp`)
|
|
332
332
|
|
|
333
|
+
The system-path elevation reads the operands of a command, never the program it runs. `argv[0]` is the binary being executed rather than a path the command writes to, so `/usr/bin/git add a.txt` gets exactly the verdict `git add a.txt` gets. The exemption covers the program word of every command in the expression, not only the outermost one: a wrapper carries the words of the command it runs in its own argv, so `sudo /usr/bin/git add a.txt` is scanned as `['sudo', '/usr/bin/git', 'add', 'a.txt']` and both `sudo` and `/usr/bin/git` are exempt. Each exempt word is consumed once, so a program word spelled a second time as an operand still counts and `/usr/bin/git add /usr/bin/git` stays `DANGEROUS`.
|
|
334
|
+
|
|
335
|
+
A script handed to a shell is a token holding a whole command line, not a path. `sh -c '/usr/bin/touch /etc/passwd'` would otherwise be read as a path under `/usr/bin`, because the scan compares whole tokens against directory prefixes and only the script's leading word — the program — ever made it look like one. So the script token is not scanned as a path, and **the commands parsed out of it are scanned instead**, each against its own program word and each guarded by its own classification the way a top-level command is. Classification is delegated to the inner commands; this elevation is not, so without that second scan the operands inside a script would be checked nowhere.
|
|
336
|
+
|
|
337
|
+
The consequence is that `sh -c 'X'` gets the verdict `X` gets, in both directions. `sh -c '/usr/bin/git add a.txt'` is `LOCAL_EFFECTS`/`LOW`, and `sh -c 'mkdir -p /usr/lib/x'` is `DANGEROUS`/`HIGH` exactly as `mkdir -p /usr/lib/x` is. In `sh -c 'cat /etc/hosts && touch x'` the `cat` sits below `LOCAL_EFFECTS`, so its `/etc/hosts` is not a hit and the expression stays `LOCAL_EFFECTS` — again what the bare spelling gives.
|
|
338
|
+
|
|
339
|
+
Two limits are worth stating. A script reaches this scan only when the delegating option is recognised, so a clustered shell flag (`bash -lc '...'`) parses no inner command at all and the token is scanned as a path instead. For `sh`, `bash` and `zsh` that is unobservable: they are `DANGEROUS` from their own definitions, and the elevation is gated on the command not already being `DANGEROUS`, so nothing the path scan finds there changes the verdict. For a command declared in a user database with this delegation mode and no `DANGEROUS` floor, the clustered spelling is a genuine miss — `X -c 'mkdir -p /usr/lib/x'` is `DANGEROUS`/`HIGH` and `X -lc 'mkdir -p /usr/lib/x'` is whatever `X` itself is. The second limit is that a redirect written *inside* a script is dropped before the inner command is classified, so `sh -c 'grep foo /etc/hosts > out'` is `READONLY` while the bare `grep foo /etc/hosts > out` is `DANGEROUS`. Both gaps predate this rule and neither is about system paths.
|
|
340
|
+
|
|
341
|
+
The exemption applies to a program word, so it is given only where the inner command really begins with one. The matcher strips `{}` placeholders before building a `find -exec` inner's argv, so in `find . -exec {} /usr/bin/git add \;` the inner `argv[0]` is `/usr/bin/git` — an argument handed to each file `find` matched, not the program being run — and nothing is exempt there. `find . -exec /bin/cp {} /usr/bin/x \;` still exempts `/bin/cp` and still reports `/usr/bin/x`.
|
|
342
|
+
|
|
343
|
+
Both kinds of skip are consumed once, never matched by value. A program word spelled again as an operand counts, and so does an operand that happens to read the same as the script text: `nohup sh -c /bin/ls /bin/ls` runs the first `/bin/ls` as the script and hands it the second as an argument, and the second is a hit.
|
|
344
|
+
|
|
345
|
+
For `args_are_expression` delegation the exemption applies only when the whole script is a single token. `eval 'cp a /usr/bin/b'` exempts that token and scans the `cp` parsed out of it; `eval cp a /usr/bin/b` spreads the script over several tokens, none of which is the script, so every token stays scannable.
|
|
346
|
+
|
|
347
|
+
Redirect targets are unaffected by any of this: `echo x > /etc/hosts` is still `DANGEROUS`.
|
|
348
|
+
|
|
333
349
|
#### Temp path risk lowering
|
|
334
350
|
|
|
335
351
|
When every write target of an expression is under `/tmp` or `/var/tmp`, the risk elevation to `MEDIUM` from output redirects is skipped. `cat > /tmp/foo.txt` stays at `LOW` risk and is still classified as `LOCAL_EFFECTS`. The lowering applies to every write form equally, so `1> /tmp/foo.txt` gets the same verdict as `> /tmp/foo.txt`.
|
|
@@ -6,7 +6,11 @@ import os
|
|
|
6
6
|
from collections.abc import Iterator, Mapping, Sequence
|
|
7
7
|
|
|
8
8
|
from .database import load_database
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
# `_find_flag_value` stays private to `matcher`: it is an implementation detail of how a
|
|
11
|
+
# delegating flag is spelled, not part of the package surface, and this is the only other
|
|
12
|
+
# reader of it.
|
|
13
|
+
from .matcher import _find_flag_value, match_command
|
|
10
14
|
from .models import (
|
|
11
15
|
Classification,
|
|
12
16
|
CommandDef,
|
|
@@ -76,6 +80,121 @@ def _is_system_path(path: str) -> bool:
|
|
|
76
80
|
return any(path == sysdir or path.startswith(sysdir + "/") for sysdir in _SYSTEM_DIRS)
|
|
77
81
|
|
|
78
82
|
|
|
83
|
+
_EXPRESSION_DELEGATION_MODES = frozenset({"args_are_expression", "flag_value_is_expression"})
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def _program_words(argv: Sequence[str], inner_commands: Sequence[InnerCommandResult]) -> list[str]:
|
|
87
|
+
"""Collect the program words that appear among this invocation's own argv tokens.
|
|
88
|
+
|
|
89
|
+
`argv[0]` is the program being executed, not a path the program operates on, so
|
|
90
|
+
`/usr/bin/git add a.txt` writes nothing into `/usr/bin`. A wrapper carries the words of
|
|
91
|
+
the command it runs in its own argv -- `sudo /usr/bin/git add a.txt` is scanned as
|
|
92
|
+
`['sudo', '/usr/bin/git', 'add', 'a.txt']` -- so those nested words are collected too,
|
|
93
|
+
or only the unwrapped spelling would get the exemption.
|
|
94
|
+
|
|
95
|
+
A command reached through a script is deliberately left out: its words are inside the
|
|
96
|
+
script token, not among these tokens, and `_system_paths_in_scripts` scans it against
|
|
97
|
+
its own exemptions. Adding them here would let a word from inside a script be spent on
|
|
98
|
+
an unrelated token of the enclosing command line.
|
|
99
|
+
"""
|
|
100
|
+
words = list(argv[:1])
|
|
101
|
+
for inner in inner_commands:
|
|
102
|
+
if inner.delegation_mode in _EXPRESSION_DELEGATION_MODES:
|
|
103
|
+
continue
|
|
104
|
+
if inner.delegation_mode == "terminated_argv" and not _starts_at_its_option(argv, inner):
|
|
105
|
+
continue
|
|
106
|
+
words.extend(_program_words(inner.argv, inner.inner_commands))
|
|
107
|
+
return words
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _starts_at_its_option(argv: Sequence[str], inner: InnerCommandResult) -> bool:
|
|
111
|
+
r"""Tell whether a `find -exec` inner really begins where its option's tokens begin.
|
|
112
|
+
|
|
113
|
+
The matcher strips `{}` placeholders before building the inner argv, so in
|
|
114
|
+
`find . -exec {} /usr/bin/git add \;` the inner `argv[0]` is `/usr/bin/git` -- an argument
|
|
115
|
+
handed to whatever file `find` matched, not the program being run. Exempting it would be
|
|
116
|
+
the mistake this whole rule exists to stop, pointed at the wrong token. The inner counts
|
|
117
|
+
as starting at its option only when the option is directly followed by that word.
|
|
118
|
+
"""
|
|
119
|
+
if not inner.argv:
|
|
120
|
+
return False
|
|
121
|
+
return any(
|
|
122
|
+
token == inner.delegation_source and argv[index + 1] == inner.argv[0] for index, token in enumerate(argv[:-1])
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _script_tokens(argv: Sequence[str], inner_commands: Sequence[InnerCommandResult]) -> list[str]:
|
|
127
|
+
"""Collect the argv tokens that hold a whole script rather than a path.
|
|
128
|
+
|
|
129
|
+
`sh -c '/usr/bin/touch /etc/passwd'` hands a command line over as a single token, and a
|
|
130
|
+
scan that compares whole tokens against directory prefixes reads that token as a path
|
|
131
|
+
under `/usr/bin`. The token is source, so it is not scanned as a path; the commands
|
|
132
|
+
parsed out of it are scanned instead, by `_system_paths_in_scripts`.
|
|
133
|
+
|
|
134
|
+
Only the token that is the entire script counts. `eval cp a /usr/bin/b` spreads its
|
|
135
|
+
script over several tokens and none of them is it, so every token stays scannable.
|
|
136
|
+
|
|
137
|
+
A shell flag written in a cluster (`bash -lc '...'`) is not the flag the database declares,
|
|
138
|
+
so no script is parsed out of it and the token is scanned as a path. For `sh`, `bash` and
|
|
139
|
+
`zsh` that is unobservable -- they are DANGEROUS from their own definitions and the
|
|
140
|
+
elevation never runs -- but a user-declared command with this mode and no DANGEROUS floor
|
|
141
|
+
misses what is inside the script. See SPEC.md.
|
|
142
|
+
|
|
143
|
+
Like `_program_words` this stops at the script boundary: a token found by looking inside a
|
|
144
|
+
script does not exist in the enclosing command line, and matching it there by value would
|
|
145
|
+
mask an unrelated token. Each level computes its own.
|
|
146
|
+
"""
|
|
147
|
+
tokens: list[str] = []
|
|
148
|
+
for inner in inner_commands:
|
|
149
|
+
if inner.delegation_mode == "flag_value_is_expression":
|
|
150
|
+
value = _find_flag_value(list(argv), inner.delegation_source)
|
|
151
|
+
if value is not None:
|
|
152
|
+
tokens.append(value)
|
|
153
|
+
elif inner.delegation_mode == "args_are_expression" and len(argv) == 2:
|
|
154
|
+
tokens.append(argv[1])
|
|
155
|
+
else:
|
|
156
|
+
tokens.extend(_script_tokens(inner.argv, inner.inner_commands))
|
|
157
|
+
return tokens
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def _system_paths_in_argv(argv: Sequence[str], inner_commands: Sequence[InnerCommandResult]) -> list[str]:
|
|
161
|
+
"""Find the system paths this invocation names among its own argv tokens.
|
|
162
|
+
|
|
163
|
+
Each exempt program word and each script token is consumed once rather than matched by
|
|
164
|
+
value, so a repeat of either still counts: `/usr/bin/git add /usr/bin/git` is a hit, and
|
|
165
|
+
so is the operand in `nohup sh -c /bin/ls /bin/ls`.
|
|
166
|
+
"""
|
|
167
|
+
exempt_words = _program_words(argv, inner_commands)
|
|
168
|
+
script_tokens = _script_tokens(argv, inner_commands)
|
|
169
|
+
found: list[str] = []
|
|
170
|
+
for token in argv:
|
|
171
|
+
if token in exempt_words:
|
|
172
|
+
exempt_words.remove(token)
|
|
173
|
+
elif token in script_tokens:
|
|
174
|
+
script_tokens.remove(token)
|
|
175
|
+
elif _is_system_path(token):
|
|
176
|
+
found.append(token)
|
|
177
|
+
return found
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def _system_paths_in_scripts(argv: Sequence[str], inner_commands: Sequence[InnerCommandResult]) -> list[str]:
|
|
181
|
+
"""Find the system paths named by the commands inside the scripts this invocation runs.
|
|
182
|
+
|
|
183
|
+
The elevation is applied to the top-level invocation only, so without this the operands
|
|
184
|
+
inside `sh -c '...'` would be scanned nowhere once the script token itself is skipped.
|
|
185
|
+
Each command parsed out of a script is scanned under *its own* classification, the way a
|
|
186
|
+
top-level command is: in `sh -c 'cat /etc/hosts && touch x'` the `cat` sits below
|
|
187
|
+
`LOCAL_EFFECTS` and its `/etc/hosts` is not a hit, exactly as in the bare spelling.
|
|
188
|
+
"""
|
|
189
|
+
found: list[str] = []
|
|
190
|
+
for inner in inner_commands:
|
|
191
|
+
is_script = inner.delegation_mode in _EXPRESSION_DELEGATION_MODES
|
|
192
|
+
if is_script and inner.classification.severity() >= Classification.LOCAL_EFFECTS.severity():
|
|
193
|
+
found.extend(_system_paths_in_argv(inner.argv, inner.inner_commands))
|
|
194
|
+
found.extend(_system_paths_in_scripts(inner.argv, inner.inner_commands))
|
|
195
|
+
return found
|
|
196
|
+
|
|
197
|
+
|
|
79
198
|
def classify_expression(
|
|
80
199
|
expression: str,
|
|
81
200
|
database: Mapping[str, CommandDef] | None = None,
|
|
@@ -191,11 +310,9 @@ def classify_expression(
|
|
|
191
310
|
|
|
192
311
|
# Step 6: Elevate to DANGEROUS when writing to system directories
|
|
193
312
|
if result.classification.severity() >= Classification.LOCAL_EFFECTS.severity():
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
if _is_system_path(token):
|
|
198
|
-
system_paths_found.append(token)
|
|
313
|
+
# Check argv tokens, then the commands inside any script this one runs
|
|
314
|
+
system_paths_found = _system_paths_in_argv(invocation.argv, result.inner_commands)
|
|
315
|
+
system_paths_found.extend(_system_paths_in_scripts(invocation.argv, result.inner_commands))
|
|
199
316
|
# Check redirect targets
|
|
200
317
|
for redirect in invocation.redirects:
|
|
201
318
|
if _is_system_path(redirect.target):
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
5
7
|
import pytest
|
|
6
8
|
|
|
7
9
|
from bash_classify.classifier import _is_system_path, classify_expression, iter_invocations
|
|
@@ -698,6 +700,376 @@ class TestRiskSystemPathElevation:
|
|
|
698
700
|
assert result.risk == Risk.HIGH
|
|
699
701
|
|
|
700
702
|
|
|
703
|
+
class TestProgramWordIsNotASystemPathWrite:
|
|
704
|
+
"""Running a binary by absolute path is not a write into the directory it lives in."""
|
|
705
|
+
|
|
706
|
+
@pytest.mark.parametrize(
|
|
707
|
+
"expression",
|
|
708
|
+
[
|
|
709
|
+
"/usr/bin/git add a.txt",
|
|
710
|
+
"/usr/local/bin/git add a.txt",
|
|
711
|
+
"/opt/tools/git add a.txt",
|
|
712
|
+
],
|
|
713
|
+
)
|
|
714
|
+
def test_an_absolute_program_path_classifies_as_the_bare_spelling(
|
|
715
|
+
self, expression: str, database: dict[str, CommandDef]
|
|
716
|
+
) -> None:
|
|
717
|
+
result = classify_expression(expression, database=database)
|
|
718
|
+
bare = classify_expression("git add a.txt", database=database)
|
|
719
|
+
assert (result.classification, result.risk) == (bare.classification, bare.risk)
|
|
720
|
+
assert result.classification == Classification.LOCAL_EFFECTS
|
|
721
|
+
assert result.risk == Risk.LOW
|
|
722
|
+
|
|
723
|
+
@pytest.mark.parametrize(
|
|
724
|
+
("absolute", "bare"),
|
|
725
|
+
[
|
|
726
|
+
("env /usr/bin/git add a.txt", "env git add a.txt"),
|
|
727
|
+
("timeout 5 /usr/bin/git add a.txt", "timeout 5 git add a.txt"),
|
|
728
|
+
("xargs /bin/cp", "xargs cp"),
|
|
729
|
+
("sh -c '/usr/bin/git add a.txt'", "sh -c 'git add a.txt'"),
|
|
730
|
+
("find . -exec /bin/cp {} dst/ ;", "find . -exec cp {} dst/ ;"),
|
|
731
|
+
],
|
|
732
|
+
)
|
|
733
|
+
def test_a_wrapped_program_path_classifies_as_the_bare_spelling(
|
|
734
|
+
self, absolute: str, bare: str, database: dict[str, CommandDef]
|
|
735
|
+
) -> None:
|
|
736
|
+
"""Every wrapper here leaves the verdict to the command it runs, so the rows are real controls."""
|
|
737
|
+
wrapped = classify_expression(absolute, database=database)
|
|
738
|
+
plain = classify_expression(bare, database=database)
|
|
739
|
+
assert (wrapped.classification, wrapped.risk) == (plain.classification, plain.risk)
|
|
740
|
+
|
|
741
|
+
@pytest.mark.parametrize(
|
|
742
|
+
("absolute", "bare"),
|
|
743
|
+
[
|
|
744
|
+
("sudo /usr/bin/git add a.txt", "sudo git add a.txt"),
|
|
745
|
+
("sudo sh -c '/usr/bin/git add a.txt'", "sudo sh -c 'git add a.txt'"),
|
|
746
|
+
("eval '/usr/bin/git add a.txt'", "eval 'git add a.txt'"),
|
|
747
|
+
],
|
|
748
|
+
)
|
|
749
|
+
def test_a_floored_wrapper_gives_both_spellings_the_same_verdict(
|
|
750
|
+
self, absolute: str, bare: str, database: dict[str, CommandDef]
|
|
751
|
+
) -> None:
|
|
752
|
+
"""A documentation row, not a control.
|
|
753
|
+
|
|
754
|
+
`sudo` and `eval` are DANGEROUS/HIGH whatever they run, so both spellings agree here
|
|
755
|
+
no matter what the system-path elevation does. The row records the shape; the rows
|
|
756
|
+
above are what actually pin the behaviour.
|
|
757
|
+
"""
|
|
758
|
+
wrapped = classify_expression(absolute, database=database)
|
|
759
|
+
plain = classify_expression(bare, database=database)
|
|
760
|
+
assert (wrapped.classification, wrapped.risk) == (plain.classification, plain.risk)
|
|
761
|
+
|
|
762
|
+
@pytest.mark.parametrize(
|
|
763
|
+
("expression", "classification", "risk"),
|
|
764
|
+
[
|
|
765
|
+
("env /usr/bin/git add a.txt", Classification.LOCAL_EFFECTS, Risk.LOW),
|
|
766
|
+
("timeout 5 /usr/bin/git add a.txt", Classification.LOCAL_EFFECTS, Risk.LOW),
|
|
767
|
+
("xargs /bin/cp", Classification.LOCAL_EFFECTS, Risk.MEDIUM),
|
|
768
|
+
("sh -c '/usr/bin/git add a.txt'", Classification.LOCAL_EFFECTS, Risk.LOW),
|
|
769
|
+
],
|
|
770
|
+
)
|
|
771
|
+
def test_the_wrapped_verdicts_are_what_they_should_be(
|
|
772
|
+
self, expression: str, classification: Classification, risk: Risk, database: dict[str, CommandDef]
|
|
773
|
+
) -> None:
|
|
774
|
+
"""Pin the wrapped verdicts too, so a bare spelling that regresses the same way still fails."""
|
|
775
|
+
result = classify_expression(expression, database=database)
|
|
776
|
+
assert result.classification == classification
|
|
777
|
+
assert result.risk == risk
|
|
778
|
+
|
|
779
|
+
def test_an_absolute_readonly_program_path_stays_readonly(self, database: dict[str, CommandDef]) -> None:
|
|
780
|
+
"""A documentation row, not a control.
|
|
781
|
+
|
|
782
|
+
`READONLY` sits below the guard the elevation runs behind, so this row could not fail
|
|
783
|
+
in any version of the rule -- it records why the bug was easy to miss, not coverage.
|
|
784
|
+
"""
|
|
785
|
+
result = classify_expression("/usr/bin/git status", database=database)
|
|
786
|
+
bare = classify_expression("git status", database=database)
|
|
787
|
+
assert (result.classification, result.risk) == (bare.classification, bare.risk)
|
|
788
|
+
assert result.classification == Classification.READONLY
|
|
789
|
+
assert result.risk == Risk.LOW
|
|
790
|
+
|
|
791
|
+
def test_an_absolute_path_to_a_dangerous_program_is_still_dangerous(self, database: dict[str, CommandDef]) -> None:
|
|
792
|
+
"""`rm` earns DANGEROUS from its own definition, not from the system-path elevation."""
|
|
793
|
+
result = classify_expression("/usr/bin/rm f", database=database)
|
|
794
|
+
bare = classify_expression("rm f", database=database)
|
|
795
|
+
assert (result.classification, result.risk) == (bare.classification, bare.risk)
|
|
796
|
+
assert result.classification == Classification.DANGEROUS
|
|
797
|
+
assert result.risk == Risk.HIGH
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
class TestSystemPathsInsideAScript:
|
|
801
|
+
"""A script handed to a shell gets the verdict its commands would get on their own."""
|
|
802
|
+
|
|
803
|
+
@pytest.mark.parametrize(
|
|
804
|
+
"expression",
|
|
805
|
+
[
|
|
806
|
+
"sh -c '/usr/bin/touch /etc/passwd'",
|
|
807
|
+
"bash -c '/usr/bin/touch /etc/newfile'",
|
|
808
|
+
"sh -c '/bin/mkdir -p /usr/lib/x'",
|
|
809
|
+
"timeout 5 sh -c '/usr/bin/mkdir /usr/lib/x'",
|
|
810
|
+
"sh -c '/usr/bin/cp a /usr/bin/b'",
|
|
811
|
+
"timeout 5 sh -c '/bin/touch /etc/passwd'",
|
|
812
|
+
"sh -c 'mkdir -p /usr/lib/x'",
|
|
813
|
+
"sh -c 'touch /etc/newfile'",
|
|
814
|
+
],
|
|
815
|
+
)
|
|
816
|
+
def test_a_write_into_a_system_directory_inside_a_script_is_dangerous(
|
|
817
|
+
self, expression: str, database: dict[str, CommandDef]
|
|
818
|
+
) -> None:
|
|
819
|
+
"""These pin the script scan, but not all of them against the same thing.
|
|
820
|
+
|
|
821
|
+
The rows whose script begins with an absolute system path also pass on master, which
|
|
822
|
+
caught them by accident -- the whole script token read as a path under `/usr` or
|
|
823
|
+
`/bin`. What they are a control against is the first shape of this commit, which
|
|
824
|
+
skipped the script token and scanned nothing in its place and turned them
|
|
825
|
+
`LOCAL_EFFECTS`/`LOW`, the hook's auto-approve condition. The last two rows begin with
|
|
826
|
+
a bare command and fail on master as well, so the class is not written entirely
|
|
827
|
+
against one revision.
|
|
828
|
+
"""
|
|
829
|
+
result = classify_expression(expression, database=database)
|
|
830
|
+
assert result.classification == Classification.DANGEROUS
|
|
831
|
+
assert result.risk == Risk.HIGH
|
|
832
|
+
|
|
833
|
+
@pytest.mark.parametrize(
|
|
834
|
+
"expression",
|
|
835
|
+
[
|
|
836
|
+
"sudo sh -c '/bin/touch /etc/passwd'",
|
|
837
|
+
"sh -c 'sudo /usr/bin/touch /etc/passwd'",
|
|
838
|
+
],
|
|
839
|
+
)
|
|
840
|
+
def test_a_floored_command_around_a_script_is_dangerous_either_way(
|
|
841
|
+
self, expression: str, database: dict[str, CommandDef]
|
|
842
|
+
) -> None:
|
|
843
|
+
"""A documentation row, not a control.
|
|
844
|
+
|
|
845
|
+
`sudo` is DANGEROUS/HIGH whatever it runs, inside or outside a script, so these pass in
|
|
846
|
+
every version of this rule. They record that nesting a shell and a privilege wrapper in
|
|
847
|
+
either order is handled; the rows above are what pin the behaviour.
|
|
848
|
+
"""
|
|
849
|
+
result = classify_expression(expression, database=database)
|
|
850
|
+
assert result.classification == Classification.DANGEROUS
|
|
851
|
+
assert result.risk == Risk.HIGH
|
|
852
|
+
|
|
853
|
+
@pytest.mark.parametrize(
|
|
854
|
+
"script",
|
|
855
|
+
[
|
|
856
|
+
"mkdir -p /usr/lib/x",
|
|
857
|
+
"touch /etc/newfile",
|
|
858
|
+
"cp ./hosts /etc/hosts",
|
|
859
|
+
"/usr/bin/git add a.txt",
|
|
860
|
+
"git add a.txt",
|
|
861
|
+
"cat /etc/hosts && touch x",
|
|
862
|
+
"cd /usr/local/src && make",
|
|
863
|
+
"git status",
|
|
864
|
+
],
|
|
865
|
+
)
|
|
866
|
+
def test_a_script_gets_the_verdict_its_commands_get_unwrapped(
|
|
867
|
+
self, script: str, database: dict[str, CommandDef]
|
|
868
|
+
) -> None:
|
|
869
|
+
"""`sh -c 'X'` should agree with `X` in both directions, not only when it is safe to."""
|
|
870
|
+
wrapped = classify_expression(f"sh -c '{script}'", database=database)
|
|
871
|
+
bare = classify_expression(script, database=database)
|
|
872
|
+
assert (wrapped.classification, wrapped.risk) == (bare.classification, bare.risk)
|
|
873
|
+
|
|
874
|
+
def test_a_readonly_command_in_a_script_does_not_elevate_on_its_operand(
|
|
875
|
+
self, database: dict[str, CommandDef]
|
|
876
|
+
) -> None:
|
|
877
|
+
"""Each command in a script is guarded by its own classification, not the shell's."""
|
|
878
|
+
result = classify_expression("sh -c 'cat /etc/hosts && touch x'", database=database)
|
|
879
|
+
assert result.classification == Classification.LOCAL_EFFECTS
|
|
880
|
+
assert result.risk == Risk.LOW
|
|
881
|
+
|
|
882
|
+
def test_a_write_in_a_script_still_elevates_next_to_a_readonly_command(
|
|
883
|
+
self, database: dict[str, CommandDef]
|
|
884
|
+
) -> None:
|
|
885
|
+
result = classify_expression("sh -c 'cat /etc/hosts && touch /etc/x'", database=database)
|
|
886
|
+
assert result.classification == Classification.DANGEROUS
|
|
887
|
+
assert result.risk == Risk.HIGH
|
|
888
|
+
|
|
889
|
+
def test_a_clustered_shell_flag_parses_no_script_at_all(self, database: dict[str, CommandDef]) -> None:
|
|
890
|
+
"""`-lc` is not the `-c` the database declares, so nothing is delegated and nothing scanned.
|
|
891
|
+
|
|
892
|
+
The verdict below comes from `bash`'s own DANGEROUS classification, not from the script
|
|
893
|
+
scan, so asserting only the verdict would pin a mechanism this test does not exercise.
|
|
894
|
+
The absence of an inner command is the thing worth pinning; what it costs when the
|
|
895
|
+
wrapper is not itself DANGEROUS is pinned by `TestUserDeclaredShellDelegation`.
|
|
896
|
+
"""
|
|
897
|
+
result = classify_expression("bash -lc '/usr/bin/touch /etc/passwd'", database=database)
|
|
898
|
+
assert result.commands[0].inner_commands == []
|
|
899
|
+
assert result.commands[0].classification_reason == "base classification from rule bash"
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
class TestSystemPathOperandsStillCount:
|
|
903
|
+
"""The exemption covers the program word only; an operand naming a system path is still a hit."""
|
|
904
|
+
|
|
905
|
+
def test_a_write_into_a_system_directory_is_dangerous(self, database: dict[str, CommandDef]) -> None:
|
|
906
|
+
result = classify_expression("cp a /usr/bin/b", database=database)
|
|
907
|
+
assert result.classification == Classification.DANGEROUS
|
|
908
|
+
assert result.risk == Risk.HIGH
|
|
909
|
+
|
|
910
|
+
def test_the_destination_counts_even_when_the_program_is_absolute(self, database: dict[str, CommandDef]) -> None:
|
|
911
|
+
result = classify_expression("/usr/bin/install -m755 x /usr/local/bin/y", database=database)
|
|
912
|
+
assert result.classification == Classification.DANGEROUS
|
|
913
|
+
assert result.risk == Risk.HIGH
|
|
914
|
+
|
|
915
|
+
def test_the_program_word_is_exempt_once_not_everywhere(self, database: dict[str, CommandDef]) -> None:
|
|
916
|
+
"""`/usr/bin/git` is the program in position 0 and an operand in position 2."""
|
|
917
|
+
result = classify_expression("/usr/bin/git add /usr/bin/git", database=database)
|
|
918
|
+
assert result.classification == Classification.DANGEROUS
|
|
919
|
+
assert result.risk == Risk.HIGH
|
|
920
|
+
|
|
921
|
+
def test_a_nested_program_word_is_exempt_once_not_everywhere(self, database: dict[str, CommandDef]) -> None:
|
|
922
|
+
"""`env` rather than `sudo`, because `sudo` forces DANGEROUS on its own and would pass either way."""
|
|
923
|
+
result = classify_expression("env /usr/bin/git add /usr/bin/git", database=database)
|
|
924
|
+
assert result.classification == Classification.DANGEROUS
|
|
925
|
+
assert result.risk == Risk.HIGH
|
|
926
|
+
|
|
927
|
+
def test_a_program_word_from_inside_a_script_is_not_spent_on_an_outer_token(
|
|
928
|
+
self, database: dict[str, CommandDef]
|
|
929
|
+
) -> None:
|
|
930
|
+
"""The script's `/bin/cp` must not exempt the `/bin/cp` operand of the enclosing `cp`."""
|
|
931
|
+
result = classify_expression("cp /bin/cp dst/ && sh -c '/bin/cp a b'", database=database)
|
|
932
|
+
assert result.classification == Classification.DANGEROUS
|
|
933
|
+
assert result.risk == Risk.HIGH
|
|
934
|
+
|
|
935
|
+
def test_operands_next_to_an_absolute_program_still_count(self, database: dict[str, CommandDef]) -> None:
|
|
936
|
+
result = classify_expression("/bin/cp /bin/sh /usr/bin/x", database=database)
|
|
937
|
+
assert result.classification == Classification.DANGEROUS
|
|
938
|
+
assert result.risk == Risk.HIGH
|
|
939
|
+
|
|
940
|
+
def test_operands_next_to_a_wrapped_absolute_program_still_count(self, database: dict[str, CommandDef]) -> None:
|
|
941
|
+
result = classify_expression("env /bin/cp /bin/sh /usr/bin/x", database=database)
|
|
942
|
+
assert result.classification == Classification.DANGEROUS
|
|
943
|
+
assert result.risk == Risk.HIGH
|
|
944
|
+
|
|
945
|
+
def test_a_redirect_into_a_system_directory_is_untouched(self, database: dict[str, CommandDef]) -> None:
|
|
946
|
+
result = classify_expression("echo x > /etc/hosts", database=database)
|
|
947
|
+
assert result.classification == Classification.DANGEROUS
|
|
948
|
+
assert result.risk == Risk.HIGH
|
|
949
|
+
|
|
950
|
+
def test_an_absolute_program_does_not_exempt_a_redirect(self, database: dict[str, CommandDef]) -> None:
|
|
951
|
+
result = classify_expression("/bin/echo x > /etc/hosts", database=database)
|
|
952
|
+
assert result.classification == Classification.DANGEROUS
|
|
953
|
+
assert result.risk == Risk.HIGH
|
|
954
|
+
|
|
955
|
+
@pytest.mark.parametrize(
|
|
956
|
+
"expression",
|
|
957
|
+
["find . -exec {} /usr/bin/git add ;", "find . -exec {} /bin/mkdir -p ;"],
|
|
958
|
+
)
|
|
959
|
+
def test_an_exec_argument_after_a_placeholder_is_not_the_program_word(
|
|
960
|
+
self, expression: str, database: dict[str, CommandDef]
|
|
961
|
+
) -> None:
|
|
962
|
+
"""`{}` is stripped before the inner argv is built, so `argv[0]` here is an argument.
|
|
963
|
+
|
|
964
|
+
The program is whatever file `find` matched; `/usr/bin/git` is handed to it. Exempting
|
|
965
|
+
it would be this commit's own mistake aimed at the wrong token, and it would auto-approve
|
|
966
|
+
an expression that executes every match.
|
|
967
|
+
"""
|
|
968
|
+
result = classify_expression(expression, database=database)
|
|
969
|
+
assert result.classification == Classification.DANGEROUS
|
|
970
|
+
assert result.risk == Risk.HIGH
|
|
971
|
+
|
|
972
|
+
def test_an_exec_program_word_before_a_placeholder_is_still_exempt(self, database: dict[str, CommandDef]) -> None:
|
|
973
|
+
result = classify_expression("find . -exec /bin/cp {} . ;", database=database)
|
|
974
|
+
bare = classify_expression("find . -exec cp {} . ;", database=database)
|
|
975
|
+
assert (result.classification, result.risk) == (bare.classification, bare.risk)
|
|
976
|
+
assert result.classification == Classification.LOCAL_EFFECTS
|
|
977
|
+
|
|
978
|
+
def test_an_exec_destination_counts_next_to_an_exempt_program_word(self, database: dict[str, CommandDef]) -> None:
|
|
979
|
+
result = classify_expression("find . -exec /bin/cp {} /usr/bin/x ;", database=database)
|
|
980
|
+
assert result.classification == Classification.DANGEROUS
|
|
981
|
+
assert result.risk == Risk.HIGH
|
|
982
|
+
|
|
983
|
+
def test_a_script_token_is_skipped_once_not_everywhere(self, database: dict[str, CommandDef]) -> None:
|
|
984
|
+
"""`/bin/ls` is the script here and also the argument handed to it; only the script is skipped."""
|
|
985
|
+
result = classify_expression("nohup sh -c /bin/ls /bin/ls", database=database)
|
|
986
|
+
assert result.classification == Classification.DANGEROUS
|
|
987
|
+
assert result.risk == Risk.HIGH
|
|
988
|
+
|
|
989
|
+
def test_a_script_token_found_deeper_does_not_skip_an_outer_token(self, database: dict[str, CommandDef]) -> None:
|
|
990
|
+
"""A nested script's token belongs to the inner command line, not to this one."""
|
|
991
|
+
result = classify_expression("sh -c 'bash -c '/usr/bin/touch /etc/x''", database=database)
|
|
992
|
+
assert result.classification == Classification.DANGEROUS
|
|
993
|
+
assert result.risk == Risk.HIGH
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
class TestUserDeclaredShellDelegation:
|
|
997
|
+
"""What clustering the delegating flag costs, where the wrapper is not DANGEROUS by itself."""
|
|
998
|
+
|
|
999
|
+
@pytest.fixture
|
|
1000
|
+
def runner(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
1001
|
+
"""A user-defined command delegating on `-c`, with no DANGEROUS floor to hide behind."""
|
|
1002
|
+
commands = tmp_path / "config" / "commands"
|
|
1003
|
+
commands.mkdir(parents=True)
|
|
1004
|
+
(commands / "runner.yaml").write_text(
|
|
1005
|
+
"command: runner\n"
|
|
1006
|
+
"classification: LOCAL_EFFECTS\n"
|
|
1007
|
+
"risk: LOW\n"
|
|
1008
|
+
"strict: false\n"
|
|
1009
|
+
"delegates_to:\n"
|
|
1010
|
+
" mode: flag_value_is_expression\n"
|
|
1011
|
+
" flag: -c\n"
|
|
1012
|
+
"options:\n"
|
|
1013
|
+
" -c: {takes_value: true}\n"
|
|
1014
|
+
)
|
|
1015
|
+
monkeypatch.setenv("BASH_CLASSIFY_CONFIG_DIR", str(tmp_path / "config"))
|
|
1016
|
+
|
|
1017
|
+
@pytest.mark.usefixtures("runner")
|
|
1018
|
+
def test_the_declared_flag_delegates_and_the_script_is_scanned(self) -> None:
|
|
1019
|
+
result = classify_expression("runner -c 'mkdir -p /usr/lib/x'")
|
|
1020
|
+
assert result.classification == Classification.DANGEROUS
|
|
1021
|
+
assert result.risk == Risk.HIGH
|
|
1022
|
+
|
|
1023
|
+
@pytest.mark.usefixtures("runner")
|
|
1024
|
+
def test_a_clustered_flag_delegates_nothing_and_the_script_is_missed(self) -> None:
|
|
1025
|
+
"""Pins the limitation rather than the wish: clustering hides the script entirely.
|
|
1026
|
+
|
|
1027
|
+
`sh`, `bash` and `zsh` are DANGEROUS from their own definitions, so this is invisible
|
|
1028
|
+
for them. Here it is not, and the miss is real. SPEC.md says so.
|
|
1029
|
+
"""
|
|
1030
|
+
result = classify_expression("runner -lc 'mkdir -p /usr/lib/x'")
|
|
1031
|
+
assert result.classification == Classification.LOCAL_EFFECTS
|
|
1032
|
+
assert result.risk == Risk.LOW
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
class TestArgsAreExpressionScriptToken:
|
|
1036
|
+
"""Only the token that holds the whole script is exempt, not every argument that has a space in it."""
|
|
1037
|
+
|
|
1038
|
+
@pytest.fixture
|
|
1039
|
+
def runsh(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
1040
|
+
"""A user-defined command with `args_are_expression` and no DANGEROUS floor.
|
|
1041
|
+
|
|
1042
|
+
`eval` is the only bundled command with that mode and it is floored to DANGEROUS, so
|
|
1043
|
+
it can never show what the exemption does. A user database can declare the mode
|
|
1044
|
+
without a floor, which README documents, and then the exemption is load-bearing.
|
|
1045
|
+
"""
|
|
1046
|
+
commands = tmp_path / "config" / "commands"
|
|
1047
|
+
commands.mkdir(parents=True)
|
|
1048
|
+
(commands / "runsh.yaml").write_text(
|
|
1049
|
+
"command: runsh\nclassification: READONLY\nstrict: false\ndelegates_to:\n mode: args_are_expression\n"
|
|
1050
|
+
)
|
|
1051
|
+
monkeypatch.setenv("BASH_CLASSIFY_CONFIG_DIR", str(tmp_path / "config"))
|
|
1052
|
+
|
|
1053
|
+
@pytest.mark.usefixtures("runsh")
|
|
1054
|
+
def test_a_spaced_operand_is_not_mistaken_for_the_script(self) -> None:
|
|
1055
|
+
"""The script is spread over three tokens here, so none of them is exempt."""
|
|
1056
|
+
result = classify_expression("runsh cp a '/usr/bin/my file'")
|
|
1057
|
+
assert result.classification == Classification.DANGEROUS
|
|
1058
|
+
assert result.risk == Risk.HIGH
|
|
1059
|
+
|
|
1060
|
+
@pytest.mark.usefixtures("runsh")
|
|
1061
|
+
def test_the_single_script_token_is_exempt_and_its_commands_are_scanned(self) -> None:
|
|
1062
|
+
result = classify_expression("runsh '/usr/bin/git add a.txt'")
|
|
1063
|
+
assert result.classification == Classification.LOCAL_EFFECTS
|
|
1064
|
+
assert result.risk == Risk.LOW
|
|
1065
|
+
|
|
1066
|
+
@pytest.mark.usefixtures("runsh")
|
|
1067
|
+
def test_an_operand_inside_the_single_script_token_still_counts(self) -> None:
|
|
1068
|
+
result = classify_expression("runsh '/usr/bin/cp a /usr/bin/b'")
|
|
1069
|
+
assert result.classification == Classification.DANGEROUS
|
|
1070
|
+
assert result.risk == Risk.HIGH
|
|
1071
|
+
|
|
1072
|
+
|
|
701
1073
|
class TestRiskRedirectElevation:
|
|
702
1074
|
def test_output_redirect_medium_risk(self, database: dict[str, CommandDef]) -> None:
|
|
703
1075
|
result = classify_expression("echo hello > output.txt", database=database)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bash_classify-0.13.0 → bash_classify-0.13.1}/coding-agent-plugins/claude-code/hooks/hooks.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|