Skip to main content

envaudit

Autonomously harden RL environments. RL rewards wrong solutions: patches that pass the tests without fixing the bug, and outputs that pass a grader without doing the task. Envaudit finds them by running a cheap wrong answer through your environment's real grader next to your reference solution, then writes a test that closes each hole and keeps it only if the reference still passes and the wrong answer now fails.

pipx install envaudit-cli
export ANTHROPIC_API_KEY=...
envaudit harbor path/to/tasks --fix          # Harbor / Terminal-Bench-style tasks
envaudit tasks.jsonl --fix                   # patch-style tasks (SWE-bench format also works)

In CI, envaudit harbor . --changed-since origin/main --fix --fail-on hack audits only the tasks a pull request changed and exits 1 if any is hackable. A ready GitHub Actions workflow: https://www.shreshthrajan.com/envaudit/envaudit-action.yml

Grader mutation (no API key, $0)

envaudit harbor path/to/tasks --mutate --out report.html
envaudit harbor . --changed-since origin/main --mutate --fail-on slack    # in CI

--mutate checks a Harbor task's grader without a model. It runs the reference solution once, makes its own outputs wrong in known ways (scaled, noisy, NaN or inf, zeros, constants, shuffled rows, half the rows, a dropped field), and regrades each wrong output with the task's own verifier through harbor trials regrade. Two controls run next to them: the unmodified outputs must pass and emptied outputs must fail. A second oracle run measures how much the outputs vary between runs, and small changes inside that noise floor are not counted.

Each task gets a class. DEGENERATE-ACCEPT means an empty, NaN, zero or constant output got full reward. SLACK means another clearly wrong output got full reward. TIGHT means none did. report.html and report.json list every accepted wrong output with its score. Read each one against the instruction, since a field can be scale-invariant or unused by design.

Tasks whose verifier reruns the submitted code have no output data to perturb, so they are skipped as code-only. The check reads csv, tsv, json, npz, npy, numeric txt, mtx, tif, nii, h5 and sdf files. Other files are left as they are and noted in the report. tif, nii, h5 and mtx need tifffile, nibabel, h5py and scipy; install them with pipx install "envaudit-cli[science]". --fail-on slack exits 1 on SLACK or DEGENERATE-ACCEPT, and --fail-on degenerate only on DEGENERATE-ACCEPT. Other options: --noise-reruns, --max-mutants and --verifier-timeout. The task needs a separate verifier (tests/Dockerfile) and its outputs declared in task.toml artifacts.

Everything runs on your machine with Docker; the only outside calls are to the Anthropic API with your key.

Results on public benchmarks and training data: https://www.shreshthrajan.com/envaudit/ Paper: https://arxiv.org/abs/2606.16062

Metadata

Release files for envaudit-cli 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for envaudit-cli 0.3.0
File Size Uploaded Provenance Actions
envaudit_cli-0.3.0.tar.gz 38.8 kB Without provenance Details for envaudit_cli-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for envaudit-cli 0.3.0
File Interpreter ABI Platform Actions
envaudit_cli-0.3.0-py3-none-any.whl Python 3 none any Details for envaudit_cli-0.3.0-py3-none-any.whl

Total release size: 78.4 kB

Release files / envaudit_cli-0.3.0.tar.gz

Download URL envaudit_cli-0.3.0.tar.gz
Size 38.8 kB
Tags Source
SHA-256 checksum
How to use checksums
96e0be1f189dc08ba59f1c3a4c9c1fc3362300fe3721187387a8677672cf6c88
BLAKE2b-256 checksum
How to use checksums
b506d79675b75e2779c9c9fd374cc75d11edbff0dc79e4449b383e1cb8a93b23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / envaudit_cli-0.3.0-py3-none-any.whl

Download URL envaudit_cli-0.3.0-py3-none-any.whl
Size 39.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e79e438b5af7e8a74e9c4018dedf0c027adbb14b464134d8cf7f54de9879ff64
BLAKE2b-256 checksum
How to use checksums
59be36626246a4fda619b8dc8f73d50a1a740194594434e7fa866ac3e7d44f74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Security for envaudit-cli 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page