bash-classify 0.12.0__tar.gz → 0.13.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bash_classify-0.12.0 → bash_classify-0.13.0}/.claude-plugin/marketplace.json +1 -1
- {bash_classify-0.12.0 → bash_classify-0.13.0}/PKG-INFO +13 -3
- {bash_classify-0.12.0 → bash_classify-0.13.0}/README.md +12 -2
- {bash_classify-0.12.0 → bash_classify-0.13.0}/SPEC.md +68 -18
- {bash_classify-0.12.0 → bash_classify-0.13.0}/coding-agent-plugins/claude-code/.claude-plugin/plugin.json +1 -1
- {bash_classify-0.12.0 → bash_classify-0.13.0}/docs/classification-guidance.md +13 -2
- {bash_classify-0.12.0 → bash_classify-0.13.0}/schemas/command.schema.json +5 -1
- bash_classify-0.13.0/src/bash_classify/__init__.py +60 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/classifier.py +35 -4
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/cli.py +7 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/cp.yaml +3 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/curl.yaml +2 -2
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/git.yaml +2 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/mv.yaml +3 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/sort.yaml +2 -2
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/unzip.yaml +1 -0
- bash_classify-0.13.0/src/bash_classify/commands/wget.yaml +12 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/database.py +1 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/matcher.py +59 -9
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/models.py +57 -7
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/sensitive.py +31 -1
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_classifier.py +78 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_cli.py +119 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_cli_serialization.py +51 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_database.py +48 -0
- bash_classify-0.13.0/tests/test_output_paths.py +218 -0
- bash_classify-0.13.0/tests/test_public_api.py +77 -0
- bash_classify-0.12.0/src/bash_classify/__init__.py +0 -28
- bash_classify-0.12.0/src/bash_classify/commands/wget.yaml +0 -7
- {bash_classify-0.12.0 → bash_classify-0.13.0}/.claude/rules/command-database.md +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/.editorconfig +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/.github/workflows/ci.yml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/.github/workflows/publish.yml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/.gitignore +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/.python-version +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/CLAUDE.md +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/LICENSE +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/coding-agent-plugins/claude-code/hooks/hook-permission-request.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/coding-agent-plugins/claude-code/hooks/hook-pre-tool-use.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/coding-agent-plugins/claude-code/hooks/hooks.json +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/pyproject.toml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/ruff.toml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/schemas/match-rules.schema.json +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/schemas/sensitive-paths.schema.json +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/__main__.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/agent-browser.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/apt.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/awk.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/basename.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/bash-classify.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/bash.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/black.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/brew.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/builtin.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/cargo.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/cat.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/chgrp.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/chmod.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/chown.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/column.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/comm.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/command.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/cut.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/date.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/df.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/diff.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/dig.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/dirname.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/docker.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/du.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/echo.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/env.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/eslint.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/eval.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/exec.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/expand.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/false.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/file.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/find.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/fmt.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/fold.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/free.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/gawk.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/gcloud.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/gh.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/glab-discussion.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/glab.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/go.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/gog.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/gradle.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/gradlew.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/grep.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/groups.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/gunzip.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/gws.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/gzip.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/hadolint.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/head.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/helm.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/hostname.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/id.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/install.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/isort.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/java.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/javac.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/join.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/journalctl.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/jq.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/kill.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/killall.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/kubectl.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/less.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/ln.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/ls.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/make.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/md5sum.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/mise.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/mkdir.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/more.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/mvn.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/mvnw.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/mypy.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/netstat.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/nice.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/nl.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/node.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/nohup.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/npm.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/npx.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/nslookup.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/paste.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/ping.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/pip.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/pip3.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/pipx.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/pkill.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/pnpm.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/poetry.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/prettier.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/printenv.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/printf.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/ps.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/pup.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/pwd.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/pytest.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/python.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/python3.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/read.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/readlink.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/realpath.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/rev.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/rg.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/rm.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/rsync.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/rtk.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/ruff.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/scp.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/sed.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/seq.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/sh.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/sha1sum.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/sha256sum.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/shellcheck.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/slack.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/sleep.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/snip.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/ss.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/ssh.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/stat.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/stdbuf.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/strace.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/strings.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/sudo.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/systemctl.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/tac.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/tail.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/tar.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/tee.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/terraform.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/test.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/time.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/timeout.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/top.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/touch.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/tr.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/traceroute.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/true.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/tsc.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/type.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/uname.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/unexpand.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/uniq.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/uptime.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/uv.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/wait.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/wc.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/whereis.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/which.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/whoami.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/xargs.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/xmllint.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/yarn.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/yes.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/yq.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/zip.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/commands/zsh.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/parser.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/py.typed +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/redirects.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/rules.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/src/bash_classify/sensitive-paths.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/__init__.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/conftest.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-award-emoji.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-include-diverged.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-itself.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-pipelines-list.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/api-merge-request-update-description.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/api-project-lookup.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/ci-list.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/comment-only-mention.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/echo-mentions-api-endpoint.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/echo-mentions-command.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/git-commit-heredoc-message.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/git-commit-inline-message.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read-and-api-mr.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/glab-discussion-read.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/glab-pipeline-inspect.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/grep-pattern-mentions-command.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/grep-recursive-for-command.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-2026-09-04.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/heredoc-brief-mentions-blocked-commands.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/heredoc-report-mentions-blocked.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-custom-delimiter.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/heredoc-skill-phrase-split-across-lines.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/hook-self-test-json-payload.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/loop-over-quoted-command-strings.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/mr-note-list-output-json.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/mr-note-list.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/mr-update-then-view.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/mr-view-bare.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/mr-view-grep-pipeline.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/mr-view-output-equals-json.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/mr-view-output-json.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/mr-view-output-short-flag.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/printf-mentions-command.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/python-heredoc-triple-quoted-mention.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/allow/ripgrep-pattern-args.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-absolute-binary-path.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-delete-note-nested-api.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-cd-and-prefix.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-export-host-loop.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-for-loop.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-heredoc-then-call.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-hostname-python-consumer.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-line-continuation.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-method-get-field.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-output-ndjson.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate-before-path.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-paginate.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-per-page-query.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-quoted-paginate-jq.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-redirect-to-file.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-repo-flag-first.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-discussions-var-capture.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-edit-note-put-heredoc.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-input-stdin.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-new-diff-note-position-fields.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-note-award-emoji.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-note-by-id-or-retry.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-notes-after-allowed-mr-view.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-notes-query-sort.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-notes-timeout-prefix.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-reply-method-post-after-path.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-reply-post-body-from-file.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-reply-post-heredoc-body.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-resolve-loop.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-resolve-put-field.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/api-single-discussion-by-id.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/heredoc-then-and-chain-to-blocked.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/heredoc-then-pipe-to-blocked.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-note-custom-heredoc-delimiter.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-note-help.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-note-heredoc-body.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-note-inline-after-mr-update.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-note-long-message-flag.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-note-repo-before-message.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-note-second-in-pipeline.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-note-then-close.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-bare.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-loop.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-no-iid.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-page-flag.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-repo-flag.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-cluster.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/mr-view-comments-short-flag.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/wrapper-bash-c.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/block/wrapper-sudo.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-discussion/rules.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-without-trace.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/api-job-metadata-xargs.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-itself.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list-per-page.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/api-merge-request-pipelines-list.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-bash-c.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-ref.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/api-pipelines-list-single-quoted.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/ci-lint-local-file.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/ci-list-per-page.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/ci-list.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/ci-status-compact.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/ci-status-pipeline-id.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/comment-only-mention.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/echo-mentions-ci-command.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/git-commit-heredoc-message.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/git-commit-inline-message.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/glab-discussion-read.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/glab-pipeline-inspect.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/grep-pattern-mentions-ci.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/heredoc-brief-mentions-ci-commands.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/heredoc-skill-mentions-ci.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/loop-over-quoted-command-strings.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/printf-mentions-ci-command.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/allow/ripgrep-pattern-args.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-continuation-lines.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-input-and-header.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-method-post-field.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-ci-lint-raw-field-cat.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-after-allowed-metadata.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-env-assignment.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-redirect-to-file.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-retry-loop.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-job-trace-xargs.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-detail.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-env-assignment.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-hostname-after-path.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-comment-and-loop.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-list.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-nested-loop-timeout.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-paginate-ndjson.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-python-consumer.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-jobs-scope-failed-loop.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-status-poll-loop.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/api-pipeline-test-report.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-get-after-allowed-status.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-in-echo-chain.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-get-branch-ref-sleep-prefix.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-get-json-jq-sort-uniq.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-get-then-ci-trace.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-get-var-capture-poll-loop.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-get-with-job-details-repo.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-job-name-with-pipeline.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-pipeline-id-before-job-name.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-redirect-to-file.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-trace-repo-before-job-id.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-view-help.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-view-job-web-or-api.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/ci-view-pipeline-id.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/heredoc-then-pipe-to-blocked.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/pipe-get-alias.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/pipeline-view-alias.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/wrapper-bash-c.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/block/wrapper-sudo.sh +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/fixtures/match/glab-pipeline/rules.yaml +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_match_fixtures.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_matcher.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_models.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_parser.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_real_world.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_rules.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_schema.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_sensitive_paths.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/tests/test_smoke.py +0 -0
- {bash_classify-0.12.0 → bash_classify-0.13.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: bash-classify
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.0
|
|
4
4
|
Summary: Classify bash commands as READONLY, WRITE, DANGEROUS, or UNKNOWN
|
|
5
5
|
Project-URL: Homepage, https://github.com/fprochazka/bash-classify
|
|
6
6
|
Project-URL: Repository, https://github.com/fprochazka/bash-classify
|
|
@@ -45,6 +45,14 @@ uv tool install bash-classify
|
|
|
45
45
|
pip install bash-classify
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
To track a commit rather than a release — worth doing if you want to test a change before it ships — pin it directly:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
bash-classify @ git+https://github.com/fprochazka/bash-classify@<commit>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The version is derived from the last tag, so a commit past it resolves to a pre-release such as `0.12.1.dev3+g8699357`. An ordinary constraint still admits that: `>=0.12,<0.13` contains it, because a specifier set only excludes pre-releases when its `prereleases` flag is explicitly false, and it is not by default. Writing the floor as `>=0.12.1.dev0,<0.13` is worth doing anyway — it says out loud that the pinned thing is a pre-release, and it sets that flag — but it is a marker for whoever reads the file next, not something the resolver needs.
|
|
55
|
+
|
|
48
56
|
## Quick start
|
|
49
57
|
|
|
50
58
|
```bash
|
|
@@ -147,7 +155,9 @@ $ echo 'cat ~/.ssh/id_rsa' | bash-classify | jq '{classification, risk, sensitiv
|
|
|
147
155
|
|
|
148
156
|
`sensitive_paths` is always present, on the expression and on every command and inner command, so a caller that wants a different policy reads the detail instead of the verdict. A hit found inside `sudo`, `xargs`, `sh -c` or `find -exec` is reported at that depth and again on every level above it, up to the expression.
|
|
149
157
|
|
|
150
|
-
`source` says where the token came from: `argv`, `redirect_read`, `redirect_write` or `env_dump`. `argv` is vague on purpose. `cat X` reads and `tee X` writes, and telling those apart needs per-command knowledge the database does not carry
|
|
158
|
+
`source` says where the token came from: `argv`, `argv_write`, `redirect_read`, `redirect_write` or `env_dump`. `argv` is vague on purpose. `cat X` reads and `tee X` writes, and telling those apart needs per-command knowledge the database does not carry for a positional. Two sources do know the direction. A redirect knows it because the operator says so, and `argv_write` is the value of an option the tool documents as naming a file it writes, such as `curl -o` — so `curl -o ~/.ssh/authorized_keys https://x` reports a write while `cat ~/.ssh/authorized_keys` reports an argument of unknown direction.
|
|
159
|
+
|
|
160
|
+
A marked option's value is reported *only* as `argv_write`, so selecting `source == "argv"` no longer sees it — `curl -o ~/.ssh/authorized_keys` has one hit and it is not an `argv` one. And `argv_write` never covers a destination written as a plain positional (`cp a b`, `tee out.txt`), an operand that is not an option (`dd of=X`), or an option whose direction depends on another option (`tar -f`, `tar -C`). Read it as an extra signal, never as the definition of "this writes" — `source != "argv_write"` does not mean nothing is written. [SPEC.md](SPEC.md) has the full list.
|
|
151
161
|
|
|
152
162
|
Paths match on whole segments and are never anchored, so `~/.ssh/id_rsa`, `/home/me/.ssh/id_rsa` and `../.ssh/id_rsa` all hit the `ssh` rule, while `.gitignore` and `.github` are not `.git`. A `.` segment is dropped and a `..` is resolved against the one before it, so `/etc/./shadow` and `~/.aws/x/../credentials` hit while `.ssh/../notes` does not. Each token is read three ways — as written, with `\` as a Windows separator, and with `\x` read as the POSIX escape `x` — so `~/.s\sh/id_rsa` is caught. A glob segment is matched backwards, the denylisted name against the token as the pattern, so `~/.ss?/id_rsa`, `~/.[^x]sh/id_rsa` and `.e*` are caught too. `spelling` reports which reading matched: `literal`, `posix_escape`, `windows` or `glob`.
|
|
153
163
|
|
|
@@ -237,7 +247,7 @@ Risk defaults are derived from classification (`READONLY`→LOW, `LOCAL_EFFECTS`
|
|
|
237
247
|
- **Subcommand aliases** -- a subcommand can declare other names for itself, so `glab pipeline view` resolves to `glab ci view` and any rule written for the canonical name catches the aliased spelling
|
|
238
248
|
- **Multi-goal build tools** -- `subcommand_mode: match_all` handles commands like `mvn clean install` and `gradle clean build test` where multiple goals can be combined in any order
|
|
239
249
|
- **Delegation for wrappers** -- commands like `xargs`, `sudo`, and `env` delegate classification to the inner command
|
|
240
|
-
- **File path detection** -- redirect targets
|
|
250
|
+
- **File path detection** -- `write_paths` holds redirect targets and the values of options the database marks as naming an output (`curl -o`, `wget -O`, `cp -t`, `sort -o`), `read_paths` holds input redirect targets; a write is `>` or `>>` with the optional file descriptor and `|` no-clobber override bash allows (`1>`, `2>>`, `>|`), plus `&>`, `&>>` and `>&`; writes to `/tmp` and `/var/tmp` stay at LOW risk. A destination named by a plain positional (`cp a b`, `tee out.txt`) is in neither field
|
|
241
251
|
- **Sensitive path detection** -- argv tokens and redirect targets are matched against a denylist of credential paths; a hit floors risk at HIGH and is reported in `sensitive_paths`
|
|
242
252
|
|
|
243
253
|
## Python API
|
|
@@ -16,6 +16,14 @@ uv tool install bash-classify
|
|
|
16
16
|
pip install bash-classify
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
To track a commit rather than a release — worth doing if you want to test a change before it ships — pin it directly:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
bash-classify @ git+https://github.com/fprochazka/bash-classify@<commit>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The version is derived from the last tag, so a commit past it resolves to a pre-release such as `0.12.1.dev3+g8699357`. An ordinary constraint still admits that: `>=0.12,<0.13` contains it, because a specifier set only excludes pre-releases when its `prereleases` flag is explicitly false, and it is not by default. Writing the floor as `>=0.12.1.dev0,<0.13` is worth doing anyway — it says out loud that the pinned thing is a pre-release, and it sets that flag — but it is a marker for whoever reads the file next, not something the resolver needs.
|
|
26
|
+
|
|
19
27
|
## Quick start
|
|
20
28
|
|
|
21
29
|
```bash
|
|
@@ -118,7 +126,9 @@ $ echo 'cat ~/.ssh/id_rsa' | bash-classify | jq '{classification, risk, sensitiv
|
|
|
118
126
|
|
|
119
127
|
`sensitive_paths` is always present, on the expression and on every command and inner command, so a caller that wants a different policy reads the detail instead of the verdict. A hit found inside `sudo`, `xargs`, `sh -c` or `find -exec` is reported at that depth and again on every level above it, up to the expression.
|
|
120
128
|
|
|
121
|
-
`source` says where the token came from: `argv`, `redirect_read`, `redirect_write` or `env_dump`. `argv` is vague on purpose. `cat X` reads and `tee X` writes, and telling those apart needs per-command knowledge the database does not carry
|
|
129
|
+
`source` says where the token came from: `argv`, `argv_write`, `redirect_read`, `redirect_write` or `env_dump`. `argv` is vague on purpose. `cat X` reads and `tee X` writes, and telling those apart needs per-command knowledge the database does not carry for a positional. Two sources do know the direction. A redirect knows it because the operator says so, and `argv_write` is the value of an option the tool documents as naming a file it writes, such as `curl -o` — so `curl -o ~/.ssh/authorized_keys https://x` reports a write while `cat ~/.ssh/authorized_keys` reports an argument of unknown direction.
|
|
130
|
+
|
|
131
|
+
A marked option's value is reported *only* as `argv_write`, so selecting `source == "argv"` no longer sees it — `curl -o ~/.ssh/authorized_keys` has one hit and it is not an `argv` one. And `argv_write` never covers a destination written as a plain positional (`cp a b`, `tee out.txt`), an operand that is not an option (`dd of=X`), or an option whose direction depends on another option (`tar -f`, `tar -C`). Read it as an extra signal, never as the definition of "this writes" — `source != "argv_write"` does not mean nothing is written. [SPEC.md](SPEC.md) has the full list.
|
|
122
132
|
|
|
123
133
|
Paths match on whole segments and are never anchored, so `~/.ssh/id_rsa`, `/home/me/.ssh/id_rsa` and `../.ssh/id_rsa` all hit the `ssh` rule, while `.gitignore` and `.github` are not `.git`. A `.` segment is dropped and a `..` is resolved against the one before it, so `/etc/./shadow` and `~/.aws/x/../credentials` hit while `.ssh/../notes` does not. Each token is read three ways — as written, with `\` as a Windows separator, and with `\x` read as the POSIX escape `x` — so `~/.s\sh/id_rsa` is caught. A glob segment is matched backwards, the denylisted name against the token as the pattern, so `~/.ss?/id_rsa`, `~/.[^x]sh/id_rsa` and `.e*` are caught too. `spelling` reports which reading matched: `literal`, `posix_escape`, `windows` or `glob`.
|
|
124
134
|
|
|
@@ -208,7 +218,7 @@ Risk defaults are derived from classification (`READONLY`→LOW, `LOCAL_EFFECTS`
|
|
|
208
218
|
- **Subcommand aliases** -- a subcommand can declare other names for itself, so `glab pipeline view` resolves to `glab ci view` and any rule written for the canonical name catches the aliased spelling
|
|
209
219
|
- **Multi-goal build tools** -- `subcommand_mode: match_all` handles commands like `mvn clean install` and `gradle clean build test` where multiple goals can be combined in any order
|
|
210
220
|
- **Delegation for wrappers** -- commands like `xargs`, `sudo`, and `env` delegate classification to the inner command
|
|
211
|
-
- **File path detection** -- redirect targets
|
|
221
|
+
- **File path detection** -- `write_paths` holds redirect targets and the values of options the database marks as naming an output (`curl -o`, `wget -O`, `cp -t`, `sort -o`), `read_paths` holds input redirect targets; a write is `>` or `>>` with the optional file descriptor and `|` no-clobber override bash allows (`1>`, `2>>`, `>|`), plus `&>`, `&>>` and `>&`; writes to `/tmp` and `/var/tmp` stay at LOW risk. A destination named by a plain positional (`cp a b`, `tee out.txt`) is in neither field
|
|
212
222
|
- **Sensitive path detection** -- argv tokens and redirect targets are matched against a denylist of credential paths; a hit floors risk at HIGH and is reported in `sensitive_paths`
|
|
213
223
|
|
|
214
224
|
## Python API
|
|
@@ -336,13 +336,13 @@ When every write target of an expression is under `/tmp` or `/var/tmp`, the risk
|
|
|
336
336
|
|
|
337
337
|
### File path detection
|
|
338
338
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
- **`write_paths`**: Targets of output redirects, excluding `/dev/null`, `/dev/stdin`, `/dev/stdout`, `/dev/stderr`, and `/dev/fd/*`.
|
|
339
|
+
- **`write_paths`**: Paths the command names as output. Two sources feed it: the target of an output redirect, excluding `/dev/null`, `/dev/stdin`, `/dev/stdout`, `/dev/stderr` and `/dev/fd/*`; and the value of an option the database marks `names_output_path`, such as `curl -o` or `sort -o`. Redirect targets come after the option values.
|
|
342
340
|
- **`read_paths`**: Targets of input redirects, excluding the same `/dev/*` paths.
|
|
343
341
|
- Which operators those are is one definition, given under [Redirect Classification](#redirect-classification). A redirect that elevates the classification also reports its target here, or the temp path lowering above would never fire for it.
|
|
344
342
|
|
|
345
|
-
|
|
343
|
+
`write_paths` is not the complete set of files a command writes. A destination written as a plain positional is absent — `cp a b`, `tee out.txt` and `sed -i f` all report nothing — because telling a read positional from a write one needs per-command knowledge the database does not carry. Read the field as "paths this command is known to write", never as "the only paths it writes".
|
|
344
|
+
|
|
345
|
+
Paths are reported at both the per-command level (`commands[].write_paths`, `commands[].read_paths`) and the expression level. The expression level aggregates every command, and reaches through wrappers: `sudo curl -o X` names no output path at the `sudo` level, so the expression level takes it from the inner command.
|
|
346
346
|
|
|
347
347
|
### Composite classification
|
|
348
348
|
|
|
@@ -977,9 +977,12 @@ A subcommand entry takes the same fields as the command level, minus `command` a
|
|
|
977
977
|
| `takes_value` | `bool` | Whether the option consumes the next token as its value |
|
|
978
978
|
| `aliases` | `list[str]` | Alternative names for this option (e.g. `-n` for `--namespace`) |
|
|
979
979
|
| `overrides` | `enum` | When this option is present, override the classification to this level |
|
|
980
|
-
| `captures_directory` | `bool` | The value of this option is a working directory (
|
|
980
|
+
| `captures_directory` | `bool` | The value of this option is a directory the command is pointed at: a working directory (`git -C`, `make -C`) or a destination an archive is unpacked into (`tar -C`, `unzip -d`). It lands in the invocation's own `directories`, at whatever depth the invocation sits. |
|
|
981
|
+
| `names_output_path` | `bool` | The tool documents this option's value as a path it writes (`curl -o`, `sort -o`). It lands in `write_paths`, and a sensitive-path hit on it is reported with `source: "argv_write"`. |
|
|
981
982
|
| `delegates_to` | `object` | This option's value(s) form a delegated inner command (e.g. `find -exec`) |
|
|
982
983
|
|
|
984
|
+
Set `names_output_path` only from the tool's own documentation of that option, and only when it holds in every mode of the command. `curl -T` sends the named file to a server and writes nothing locally, so it stays unmarked. `tar -f` writes the archive under `-c` and reads it under `-x`; one option cannot be conditioned on another, so it stays unmarked too, and the honest answer for `tar` is the destination directory that `-C` already reports.
|
|
985
|
+
|
|
983
986
|
## Redirect Classification
|
|
984
987
|
|
|
985
988
|
An output redirect elevates the classification to at least `LOCAL_EFFECTS`.
|
|
@@ -1048,6 +1051,12 @@ The floor is deliberately **not** guarded by a minimum classification, unlike th
|
|
|
1048
1051
|
|
|
1049
1052
|
Tokens are scanned one at a time and never joined, so `git config` is two words and not the path `.git/config`.
|
|
1050
1053
|
|
|
1054
|
+
The value of an option marked `names_output_path` is scanned on its own and reported with `source: "argv_write"`, and the argv token that carries it is then skipped. That keeps one file to one hit across the three spellings of an option value: `-o ~/.ssh/x`, `--output=~/.ssh/x` and `-o~/.ssh/x` all report the path alone, in the write direction. Every other argv token keeps `source: "argv"`, whose direction is unknown.
|
|
1055
|
+
|
|
1056
|
+
**Two things a caller reading `source` has to know.** The skip means a marked option's value no longer appears as an `argv` hit at all: `curl -o ~/.ssh/authorized_keys` reports one hit with `source: "argv_write"` and nothing with `source: "argv"`. Code that selects `source == "argv"` and works out the direction itself stops seeing these paths, with nothing to signal that it happened. This changed in the release that introduced `names_output_path`.
|
|
1057
|
+
|
|
1058
|
+
And `argv_write` is not the complete set of writes, permanently rather than for now. It covers an option the tool documents as naming a file it writes, and nothing else. A destination written as a plain positional never carries it — `cp a b`, `tee out.txt`, `split`. Neither does an operand that is not an option, such as `dd of=X`. Neither does an option whose direction depends on another option: `tar -f` writes the archive under `-c` and reads it under `-x`, and `tar -C` is an extraction destination under `-x` and a source directory under `-c`, so marking either would be wrong in half its uses. So `source != "argv_write"` does not mean the command writes nothing, and must not be used as though it did. A caller that needs to cover the cases above has to keep its own reasoning for them; `argv_write` is an additional signal, not a replacement for one.
|
|
1059
|
+
|
|
1051
1060
|
A hit is reported on the invocation that carries it, and again on every level above it up to the expression, deduplicated by token, rule, source and spelling. A caller that reads only `ExpressionResult.sensitive_paths` still sees what a wrapper hid.
|
|
1052
1061
|
|
|
1053
1062
|
### The denylist
|
|
@@ -1099,7 +1108,7 @@ Name these when you describe the feature, so nobody reads it as stronger than it
|
|
|
1099
1108
|
- A path held in a variable: `P=~/.ssh/id_rsa; cat "$P"`.
|
|
1100
1109
|
- Encoding detours: `base64`, `xxd`, `rev`, or a `sed` that reassembles the path.
|
|
1101
1110
|
- A glob below the two-character floor, such as `cat .*`.
|
|
1102
|
-
- The direction of an `argv` hit. `cat X` reads and `tee X` writes; telling them apart needs per-command read/write knowledge that the database
|
|
1111
|
+
- The direction of an `argv` hit. `cat X` reads and `tee X` writes; telling them apart needs per-command read/write knowledge that the database carries only for options marked `names_output_path`, never for a positional.
|
|
1103
1112
|
- A redirect inside a nested expression. `sh -c "cat < ~/.ssh/id_rsa"` is caught through the `-c` argument text, not through the redirect, because inner commands carry no redirects of their own.
|
|
1104
1113
|
- A token that only *mentions* a path. `git commit -m "document ~/.ssh/config setup"`, `grep -rn "\.ssh/config" docs/` and `find . -path "*/.git/config"` are all reported, because the scan reads tokens and not the meaning a command gives them. Note the contrast with `match` mode, which is careful about exactly this: there a heredoc body, an `echo` string or a `grep` pattern that names a command is not an invocation and does not match. The two do not behave alike. Separating a path that a command opens from one it merely carries needs per-command argument knowledge, and that is out of scope here.
|
|
1105
1114
|
|
|
@@ -1107,15 +1116,53 @@ Name these when you describe the feature, so nobody reads it as stronger than it
|
|
|
1107
1116
|
|
|
1108
1117
|
## Directory Detection
|
|
1109
1118
|
|
|
1110
|
-
|
|
1119
|
+
`directories` means something different at the expression level and on a single invocation,
|
|
1120
|
+
and a caller has to pick the one that answers its question.
|
|
1111
1121
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1122
|
+
**On an invocation** the list holds the values of that invocation's `captures_directory`
|
|
1123
|
+
options, and nothing else: the destination of `tar -C` or `unzip -d`, the working directory
|
|
1124
|
+
of `git -C`. Every invocation carries it at every depth — a `commands` entry and an
|
|
1125
|
+
`inner_commands` entry in the JSON, `CommandResult.directories` and
|
|
1126
|
+
`InnerCommandResult.directories` in Python — so walking invocations needs no special case
|
|
1127
|
+
for the top level. The JSON omits the key when the list is empty, so a wrapper that names no
|
|
1128
|
+
directory of its own cannot be read as one that does.
|
|
1129
|
+
|
|
1130
|
+
**At the expression level** the list is wider. It collects four kinds of value:
|
|
1131
|
+
|
|
1132
|
+
- the target of a `cd` or `pushd`
|
|
1133
|
+
- the value of a `captures_directory` option on a top-level invocation
|
|
1134
|
+
- the first positional of an `ls` or a `find`
|
|
1135
|
+
- the dirname of the first path holding a `/` that a `cat`, `head`, `tail`, `less` or `more` was handed
|
|
1136
|
+
|
|
1137
|
+
Directories are reported as written, never resolved, because a value may hold a variable
|
|
1138
|
+
or a `~`.
|
|
1139
|
+
|
|
1140
|
+
### A destination below a wrapper stays below it
|
|
1141
|
+
|
|
1142
|
+
`sudo tar -xf e.tar -C ~/.config` reports the destination on the `tar` invocation inside
|
|
1143
|
+
`inner_commands`. The expression-level list stays empty. `write_paths` behaves the opposite
|
|
1144
|
+
way — a wrapper's expression-level `write_paths` does carry what the wrapped command names
|
|
1145
|
+
as output — and the difference is deliberate.
|
|
1146
|
+
|
|
1147
|
+
`write_paths` holds one kind of path: files a command names as output. Merging several of
|
|
1148
|
+
those produces a list that still means one thing, so a caller can act on it directly.
|
|
1149
|
+
`directories` mixes four, and a dirname such as the `/etc` of `cat /etc/config` reads
|
|
1150
|
+
exactly like the `/etc` of `tar -C /etc`. Aggregating that through wrappers would move more
|
|
1151
|
+
ambiguous values into the list a caller reaches for first, which is why the per-invocation
|
|
1152
|
+
list exists at all. A caller after destinations walks the invocations instead —
|
|
1153
|
+
`iter_invocations` in Python, the recursive `inner_commands` in the JSON — and reads each
|
|
1154
|
+
`directories` there.
|
|
1155
|
+
|
|
1156
|
+
Do not "fix" the asymmetry by making the expression-level list reach through wrappers. The
|
|
1157
|
+
tests that pin the current values are there to catch exactly that change.
|
|
1158
|
+
|
|
1159
|
+
### Limit: a sensitive rule under a reported directory is not a hit
|
|
1160
|
+
|
|
1161
|
+
`tar -xf e.tar -C ~/.ssh` hits the `ssh` rule, because the destination itself spells the rule. `tar -xf e.tar -C ~/.config` does not hit `gcloud`, even though the archive may well contain `.config/gcloud/credentials.db`, and `unzip e.zip -d ~` hits nothing at all.
|
|
1162
|
+
|
|
1163
|
+
This is deliberate and it will not change. The contents of an archive are unknowable without opening it, so the only rule the library could apply is "any denylisted path that sits under the destination is a hit". The common destinations are `.`, `..`, `~` and `$PWD`: every rule sits under those, so the check would fire on every extraction anybody ever runs, and a gate that fires on everything gets switched off. `tar -xf e.tar -C .` is the case to keep in mind.
|
|
1117
1164
|
|
|
1118
|
-
|
|
1165
|
+
Extraction into a parent directory is therefore a general way past a path denylist, and closing it is the caller's policy call, not the library's. The destination is in the invocation's `directories` for exactly that reason, whether the invocation is top-level or sits under `sudo`, `sh -c`, `xargs` or `find -exec`. A caller that wants the floor can require the destination to carry some minimum specificity before applying it — at least a few segments, and not the working directory, the home directory or the root — the way the glob matcher requires two literal characters before reading a segment as a pattern.
|
|
1119
1166
|
|
|
1120
1167
|
## Special-cased Commands
|
|
1121
1168
|
|
|
@@ -1170,14 +1217,14 @@ The `commands` list below is recursive — any command entry can contain `inner_
|
|
|
1170
1217
|
{
|
|
1171
1218
|
"expression": "string — the original input",
|
|
1172
1219
|
"classification": "READONLY | LOCAL_EFFECTS | EXTERNAL_EFFECTS | DANGEROUS | UNKNOWN",
|
|
1173
|
-
"directories": ["string —
|
|
1174
|
-
"write_paths": ["string —
|
|
1220
|
+
"directories": ["string — cd and pushd targets, captures_directory values of top-level invocations, the first positional of ls and find, and dirnames of paths handed to cat, head, tail, less and more, mixed in one list; for a destination below a wrapper read the inner command's own directories instead"],
|
|
1221
|
+
"write_paths": ["string — paths the commands name as output: redirect targets and the values of options marked names_output_path (optional, omitted when empty)"],
|
|
1175
1222
|
"read_paths": ["string — files targeted by input redirects (optional, omitted when empty)"],
|
|
1176
1223
|
"sensitive_paths": [
|
|
1177
1224
|
{
|
|
1178
|
-
"token": "string — the
|
|
1225
|
+
"token": "string — the path as written, or the whole argv token that holds it",
|
|
1179
1226
|
"rule": "string — the denylist entry that matched, e.g. ssh",
|
|
1180
|
-
"source": "argv | redirect_read | redirect_write | env_dump",
|
|
1227
|
+
"source": "argv | argv_write | redirect_read | redirect_write | env_dump",
|
|
1181
1228
|
"spelling": "literal | posix_escape | windows | glob"
|
|
1182
1229
|
}
|
|
1183
1230
|
],
|
|
@@ -1193,7 +1240,8 @@ The `commands` list below is recursive — any command entry can contain `inner_
|
|
|
1193
1240
|
"remaining_options": ["string — options that were not in database"],
|
|
1194
1241
|
"classification_reason": "string — why this classification was chosen",
|
|
1195
1242
|
"overriding_option": "string | null — the option that elevated classification",
|
|
1196
|
-
"
|
|
1243
|
+
"directories": ["string — the values of this invocation's captures_directory options (optional, omitted when empty); narrower than the expression-level directories"],
|
|
1244
|
+
"write_paths": ["string — this command's own output paths: option values and redirect targets (optional, omitted when empty)"],
|
|
1197
1245
|
"read_paths": ["string — files targeted by input redirects (optional, omitted when empty)"],
|
|
1198
1246
|
"sensitive_paths": ["... — this command's own hits plus its inner commands'; always present, empty when none"],
|
|
1199
1247
|
"inner_commands": [
|
|
@@ -1206,6 +1254,8 @@ The `commands` list below is recursive — any command entry can contain `inner_
|
|
|
1206
1254
|
"matched_rule": "...",
|
|
1207
1255
|
"options": ["... — same meaning as on the enclosing command"],
|
|
1208
1256
|
"positionals": ["... — same meaning as on the enclosing command"],
|
|
1257
|
+
"directories": ["... — same meaning as on the enclosing command; not aggregated into the expression-level directories"],
|
|
1258
|
+
"write_paths": ["... — option values only; an inner command carries no redirects of its own"],
|
|
1209
1259
|
"sensitive_paths": ["... — same meaning as on the enclosing command"],
|
|
1210
1260
|
"inner_commands": ["... — recursive, can nest further"]
|
|
1211
1261
|
}
|
|
@@ -110,9 +110,20 @@ subcommands:
|
|
|
110
110
|
| `takes_value` | boolean | Whether the option consumes the next token as its value |
|
|
111
111
|
| `aliases` | list | Alternative names (e.g. `-n` for `--namespace`) |
|
|
112
112
|
| `overrides` | enum | When present, override classification to this level |
|
|
113
|
-
| `captures_directory` | boolean | The option's value is a working directory (
|
|
113
|
+
| `captures_directory` | boolean | The option's value is a directory the command is pointed at: a working directory (`git -C`) or an extraction destination (`tar -C`, `unzip -d`). It lands in the `directories` of the invocation that carries the option, wrapped or not. The expression-level `directories` picks it up only for a top-level invocation. |
|
|
114
|
+
| `names_output_path` | boolean | The option's value is a path the command writes (`curl -o`, `sort -o`). It lands in `write_paths`. |
|
|
114
115
|
| `delegates_to` | object | This option triggers delegation (e.g. `find -exec`) |
|
|
115
116
|
|
|
117
|
+
##### Marking an option as an output path
|
|
118
|
+
|
|
119
|
+
`names_output_path` answers one question: does the tool's own documentation say this option's value names a file it writes? Check the man page before you set it, and apply three rules.
|
|
120
|
+
|
|
121
|
+
1. A read is not a write. `curl -T file` uploads the named file to a server and writes nothing locally, so it stays unmarked.
|
|
122
|
+
2. The answer has to hold in every mode of the command. `tar -f` writes the archive under `-c` and reads it under `-x`, and one option cannot be conditioned on another, so it stays unmarked.
|
|
123
|
+
3. A destination named by a positional is out of reach. `cp a b`, `tee out.txt`, `dd of=X` and the prefix of `split` are not options, and nothing in the database describes them.
|
|
124
|
+
|
|
125
|
+
A consumer uses the field to tell a write to a credential from a mention of one, so a wrong mark is worse than a missing one. When in doubt, leave it off.
|
|
126
|
+
|
|
116
127
|
#### The `# $schema:` comment
|
|
117
128
|
|
|
118
129
|
Add `# $schema: ../../../schemas/command.schema.json` as the first line of every YAML file. This enables autocomplete and validation in IDEs that support JSON Schema for YAML files.
|
|
@@ -512,7 +523,7 @@ When a command writes to a file via an output redirect, its risk is normally ele
|
|
|
512
523
|
|
|
513
524
|
This means `cat > /tmp/foo.txt` is classified as `LOCAL_EFFECTS` with risk `LOW`, while `cat > ~/foo.txt` is classified as `LOCAL_EFFECTS` with risk `MEDIUM`.
|
|
514
525
|
|
|
515
|
-
The tool also reports `write_paths` and `read_paths` in the output
|
|
526
|
+
The tool also reports `write_paths` and `read_paths` in the output. `read_paths` comes from input redirects. `write_paths` holds the targets of output redirects and the values of options marked `names_output_path`. Both fields are omitted from the JSON output when empty, and neither is a complete account of what the command touches: a destination named by a plain positional is in neither.
|
|
516
527
|
|
|
517
528
|
## 11. Sensitive Paths
|
|
518
529
|
|
|
@@ -156,7 +156,11 @@
|
|
|
156
156
|
},
|
|
157
157
|
"captures_directory": {
|
|
158
158
|
"type": "boolean",
|
|
159
|
-
"description": "The value of this option is a working directory"
|
|
159
|
+
"description": "The value of this option is a directory the command is pointed at: a working directory (`git -C`) or an extraction destination (`tar -C`, `unzip -d`). It lands in `directories`."
|
|
160
|
+
},
|
|
161
|
+
"names_output_path": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"description": "The tool documents this option's value as a path it writes (`curl -o`, `sort -o`). It lands in `write_paths`, and a sensitive-path hit on it is reported with source `argv_write`. Do not set it on an option whose value is read, or on one that writes only in some modes (`tar -f` writes when creating and reads when extracting)."
|
|
160
164
|
},
|
|
161
165
|
"delegates_to": {
|
|
162
166
|
"$ref": "#/$defs/DelegationConfig"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""bash-classify: Classify bash expressions by their side-effect risk level.
|
|
2
|
+
|
|
3
|
+
`__all__` names every symbol a caller outside the package may rely on: the entry points, and
|
|
4
|
+
the types those entry points accept or return. Anything else is internal and may move.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from bash_classify.classifier import classify_expression, iter_invocations
|
|
8
|
+
from bash_classify.database import CommandDatabase, load_database
|
|
9
|
+
from bash_classify.models import (
|
|
10
|
+
Classification,
|
|
11
|
+
CommandDef,
|
|
12
|
+
CommandResult,
|
|
13
|
+
ExpressionResult,
|
|
14
|
+
InnerCommandResult,
|
|
15
|
+
Redirect,
|
|
16
|
+
Risk,
|
|
17
|
+
SensitiveHit,
|
|
18
|
+
)
|
|
19
|
+
from bash_classify.redirects import (
|
|
20
|
+
is_descriptor_duplication,
|
|
21
|
+
is_read_operator,
|
|
22
|
+
is_write_operator,
|
|
23
|
+
writes_a_file,
|
|
24
|
+
)
|
|
25
|
+
from bash_classify.rules import Match, MatchResult, Rule, RulesError, load_rules, match_expression
|
|
26
|
+
from bash_classify.sensitive import (
|
|
27
|
+
SensitivePathsError,
|
|
28
|
+
SensitiveRule,
|
|
29
|
+
find_path_hits,
|
|
30
|
+
load_sensitive_paths,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
__all__ = [
|
|
34
|
+
"classify_expression",
|
|
35
|
+
"iter_invocations",
|
|
36
|
+
"load_database",
|
|
37
|
+
"CommandDatabase",
|
|
38
|
+
"CommandDef",
|
|
39
|
+
"Classification",
|
|
40
|
+
"Risk",
|
|
41
|
+
"ExpressionResult",
|
|
42
|
+
"CommandResult",
|
|
43
|
+
"InnerCommandResult",
|
|
44
|
+
"Redirect",
|
|
45
|
+
"Rule",
|
|
46
|
+
"RulesError",
|
|
47
|
+
"Match",
|
|
48
|
+
"MatchResult",
|
|
49
|
+
"load_rules",
|
|
50
|
+
"match_expression",
|
|
51
|
+
"SensitiveHit",
|
|
52
|
+
"SensitiveRule",
|
|
53
|
+
"SensitivePathsError",
|
|
54
|
+
"load_sensitive_paths",
|
|
55
|
+
"find_path_hits",
|
|
56
|
+
"is_write_operator",
|
|
57
|
+
"is_read_operator",
|
|
58
|
+
"is_descriptor_duplication",
|
|
59
|
+
"writes_a_file",
|
|
60
|
+
]
|
|
@@ -125,14 +125,20 @@ def classify_expression(
|
|
|
125
125
|
# nested expression (`bash -c "..."`, `eval "..."`), at any depth.
|
|
126
126
|
result = match_command(invocation, database, parse_warnings)
|
|
127
127
|
|
|
128
|
+
# The matcher has already put the output paths named in option values on the
|
|
129
|
+
# result. They stay there alone until the sensitive scan below has run, because the
|
|
130
|
+
# scan reads them to tell an argv write from a mention; the redirect targets join
|
|
131
|
+
# them afterwards.
|
|
132
|
+
argv_write_paths = result.write_paths or []
|
|
133
|
+
|
|
128
134
|
# Collect file paths from redirects
|
|
129
|
-
|
|
135
|
+
redirect_write_paths: list[str] = []
|
|
130
136
|
read_paths: list[str] = []
|
|
131
137
|
all_write_targets_are_temp = True
|
|
132
138
|
|
|
133
139
|
for redirect in invocation.redirects:
|
|
134
140
|
if writes_a_file(redirect.operator, redirect.target) and _is_real_file_path(redirect.target):
|
|
135
|
-
|
|
141
|
+
redirect_write_paths.append(redirect.target)
|
|
136
142
|
if not _is_temp_path(redirect.target):
|
|
137
143
|
all_write_targets_are_temp = False
|
|
138
144
|
elif is_read_operator(redirect.operator) and _is_real_file_path(redirect.target):
|
|
@@ -151,7 +157,7 @@ def classify_expression(
|
|
|
151
157
|
else "elevated by output redirect"
|
|
152
158
|
)
|
|
153
159
|
# Only elevate risk if write targets are NOT all temp paths
|
|
154
|
-
if not (
|
|
160
|
+
if not (redirect_write_paths and all_write_targets_are_temp):
|
|
155
161
|
result.risk = Risk.max_severity(result.risk, Risk.MEDIUM)
|
|
156
162
|
# /dev/tcp and /dev/udp redirects are network access -> DANGEROUS
|
|
157
163
|
if redirect.target.startswith("/dev/tcp/") or redirect.target.startswith("/dev/udp/"):
|
|
@@ -207,6 +213,7 @@ def classify_expression(
|
|
|
207
213
|
# READONLY and is exactly the case this exists for.
|
|
208
214
|
_apply_sensitive_paths(result, invocation.redirects, sensitive_rules)
|
|
209
215
|
|
|
216
|
+
write_paths = argv_write_paths + redirect_write_paths
|
|
210
217
|
result.write_paths = write_paths if write_paths else None
|
|
211
218
|
result.read_paths = read_paths if read_paths else None
|
|
212
219
|
|
|
@@ -224,6 +231,10 @@ def classify_expression(
|
|
|
224
231
|
all_write_paths.extend(cmd_result.write_paths)
|
|
225
232
|
if cmd_result.read_paths:
|
|
226
233
|
all_read_paths.extend(cmd_result.read_paths)
|
|
234
|
+
# A wrapper names no output path of its own, so `sudo curl -o X` reports X only on
|
|
235
|
+
# the inner command. The expression-level list has to reach it, the way the
|
|
236
|
+
# directory list already reaches a `sudo git -C` below a wrapper.
|
|
237
|
+
all_write_paths.extend(_collect_inner_write_paths(cmd_result.inner_commands))
|
|
227
238
|
|
|
228
239
|
# Step 8: Compute composite classification and risk
|
|
229
240
|
if not command_results and parse_warnings:
|
|
@@ -264,8 +275,18 @@ def _apply_sensitive_paths(
|
|
|
264
275
|
Every level reports its own argv and its own redirects, plus the hits of its inner
|
|
265
276
|
commands, so a caller that reads only the top of the tree still sees what a wrapper
|
|
266
277
|
hid. A level with any hit gets risk HIGH; classification is left alone.
|
|
278
|
+
|
|
279
|
+
Call this before the redirect targets are merged into `write_paths`: the scan reads that
|
|
280
|
+
field to source a hit as `argv_write`, and a redirect target is already sourced as
|
|
281
|
+
`redirect_write` by its own operator.
|
|
282
|
+
|
|
283
|
+
A wrapper's own argv holds the inner command's tokens too, so the output paths of
|
|
284
|
+
everything below it count as writes at its level as well. Without that, `sudo curl -o
|
|
285
|
+
~/.ssh/x` reports the same path twice, as a write from `curl` and as an argument of
|
|
286
|
+
unknown direction from `sudo`.
|
|
267
287
|
"""
|
|
268
|
-
|
|
288
|
+
output_paths = [*(result.write_paths or []), *_collect_inner_write_paths(result.inner_commands)]
|
|
289
|
+
hits = scan_argv(result.argv, result.command, result.positionals, rules, output_paths=output_paths)
|
|
269
290
|
hits.extend(scan_redirects(redirects, rules))
|
|
270
291
|
for inner in result.inner_commands:
|
|
271
292
|
hits.extend(_apply_sensitive_paths(inner, (), rules))
|
|
@@ -276,6 +297,16 @@ def _apply_sensitive_paths(
|
|
|
276
297
|
return result.sensitive_paths
|
|
277
298
|
|
|
278
299
|
|
|
300
|
+
def _collect_inner_write_paths(results: list[InnerCommandResult]) -> list[str]:
|
|
301
|
+
"""Collect the output paths named below a wrapper, recursively."""
|
|
302
|
+
write_paths: list[str] = []
|
|
303
|
+
for result in results:
|
|
304
|
+
if result.write_paths:
|
|
305
|
+
write_paths.extend(result.write_paths)
|
|
306
|
+
write_paths.extend(_collect_inner_write_paths(result.inner_commands))
|
|
307
|
+
return write_paths
|
|
308
|
+
|
|
309
|
+
|
|
279
310
|
def _extract_directories_from_argv(command: list[str], argv: list[str]) -> list[str]:
|
|
280
311
|
"""Extract directories from a command's argv based on well-known command patterns.
|
|
281
312
|
|
|
@@ -50,6 +50,11 @@ def _inner_command_to_dict(result: InnerCommandResult) -> dict:
|
|
|
50
50
|
if result.overriding_option is not None:
|
|
51
51
|
d["overriding_option"] = result.overriding_option
|
|
52
52
|
|
|
53
|
+
if result.directories:
|
|
54
|
+
d["directories"] = result.directories
|
|
55
|
+
if result.write_paths:
|
|
56
|
+
d["write_paths"] = result.write_paths
|
|
57
|
+
|
|
53
58
|
d["inner_commands"] = [_inner_command_to_dict(ic) for ic in result.inner_commands]
|
|
54
59
|
|
|
55
60
|
return d
|
|
@@ -77,6 +82,8 @@ def _command_to_dict(result: CommandResult) -> dict:
|
|
|
77
82
|
if result.overriding_option is not None:
|
|
78
83
|
d["overriding_option"] = result.overriding_option
|
|
79
84
|
|
|
85
|
+
if result.directories:
|
|
86
|
+
d["directories"] = result.directories
|
|
80
87
|
if result.write_paths:
|
|
81
88
|
d["write_paths"] = result.write_paths
|
|
82
89
|
if result.read_paths:
|
|
@@ -6,8 +6,8 @@ strict: false
|
|
|
6
6
|
global_options:
|
|
7
7
|
--help: {overrides: READONLY}
|
|
8
8
|
options:
|
|
9
|
-
-o: {takes_value: true, overrides: EXTERNAL_EFFECTS}
|
|
10
|
-
--output: {takes_value: true, overrides: EXTERNAL_EFFECTS, aliases: [-o]}
|
|
9
|
+
-o: {takes_value: true, overrides: EXTERNAL_EFFECTS, names_output_path: true}
|
|
10
|
+
--output: {takes_value: true, overrides: EXTERNAL_EFFECTS, aliases: [-o], names_output_path: true}
|
|
11
11
|
-O: {overrides: EXTERNAL_EFFECTS}
|
|
12
12
|
--remote-name: {overrides: EXTERNAL_EFFECTS, aliases: [-O]}
|
|
13
13
|
-T: {takes_value: true, overrides: EXTERNAL_EFFECTS}
|
|
@@ -6,5 +6,5 @@ strict: false
|
|
|
6
6
|
global_options:
|
|
7
7
|
--help: {overrides: READONLY}
|
|
8
8
|
options:
|
|
9
|
-
-o: {takes_value: true, overrides: LOCAL_EFFECTS}
|
|
10
|
-
--output: {takes_value: true, overrides: LOCAL_EFFECTS, aliases: [-o]}
|
|
9
|
+
-o: {takes_value: true, overrides: LOCAL_EFFECTS, names_output_path: true}
|
|
10
|
+
--output: {takes_value: true, overrides: LOCAL_EFFECTS, aliases: [-o], names_output_path: true}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# $schema: ../../../schemas/command.schema.json
|
|
2
|
+
command: wget
|
|
3
|
+
description: "Non-interactive network file downloader"
|
|
4
|
+
classification: EXTERNAL_EFFECTS
|
|
5
|
+
strict: false
|
|
6
|
+
global_options:
|
|
7
|
+
--help: {overrides: READONLY}
|
|
8
|
+
options:
|
|
9
|
+
-O: {takes_value: true, names_output_path: true}
|
|
10
|
+
--output-document: {takes_value: true, aliases: [-O], names_output_path: true}
|
|
11
|
+
-P: {takes_value: true, captures_directory: true}
|
|
12
|
+
--directory-prefix: {takes_value: true, aliases: [-P], captures_directory: true}
|
|
@@ -266,6 +266,7 @@ def _parse_options(raw: dict | None) -> dict[str, OptionDef]:
|
|
|
266
266
|
overrides=_parse_classification(props.get("overrides")),
|
|
267
267
|
risk=_parse_risk(props.get("risk")),
|
|
268
268
|
captures_directory=props.get("captures_directory", False),
|
|
269
|
+
names_output_path=props.get("names_output_path", False),
|
|
269
270
|
delegates_to=_parse_delegation_config(props.get("delegates_to")),
|
|
270
271
|
)
|
|
271
272
|
|