safe-chains 0.243.5

Auto-allow safe bash commands in agentic coding tools
Documentation
[[command]]
name = "pytest"
description = "Python testing framework that discovers and executes arbitrary user-authored test code. Tests can perform any operation the Python process has access to, including filesystem writes, network requests, and subprocess spawning. --collect-only and --co perform test discovery without execution. conftest.py and plugin code loaded via --override-ini or -p runs arbitrary Python. --junitxml writes a report file. --basetemp controls the location of temporary test directories. Mature, stable project with regular releases."
url = "https://docs.pytest.org/"
examples_safe = ["pytest tests", "pytest -c ./pytest.ini --junitxml ./junit.xml tests"]
level = "SafeRead"
standalone = [
    "--cache-clear", "--cache-show", "--co", "--collect-only",
    "--doctest-modules", "--help", "--last-failed", "--lf",
    "--markers", "--new-first", "--nf", "--no-header",
    "--quiet", "--showlocals", "--stepwise", "--strict-markers",
    "--verbose", "--version",
    "-h", "-l", "-q", "-v", "-x",
]
valued = [
    "--basetemp", "--color", "--confcutdir", "--deselect",
    "--durations", "--ignore", "--import-mode", "--junitxml",
    "--log-cli-level", "--maxfail",
    "--rootdir", "--timeout",
    "-c", "-k", "-m", "-p", "-r", "-W",
]

# Test paths are imported and run with their conftest.py files; `--rootdir` and `-c` choose the
# ini whose settings (pythonpath, plugins) decide what else is imported. `-o`/`--override-ini` are
# left out: `-o pythonpath=DIR` puts DIR on the import path, as PYTHONPATH=DIR would.
[command.path_gate]
positional = "exec"
flags = { "--rootdir" = "exec", "-c" = "exec", "--basetemp" = "write", "--junitxml" = "write", "--confcutdir" = "read", "--color" = "ignore", "--deselect" = "ignore", "--durations" = "ignore", "--ignore" = "ignore", "--import-mode" = "ignore", "--log-cli-level" = "ignore", "--maxfail" = "ignore", "--timeout" = "ignore", "-k" = "ignore", "-m" = "ignore", "-p" = "ignore", "-r" = "ignore", "-W" = "ignore" }