Skip to content

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 02:16
· 67 commits to main since this release
f12a458

IESC001 now applies the mount checks that inspect_ai's Docker sandbox enforces in releases after 0.3.279, so a Compose file the sandbox would refuse fails the lint first. This can fail a package that passed 0.11.0. Any writable host bind mount fails, even an allowlisted one, and so does any volumes_from. Before moving a pin, add :ro to bind mounts the sandbox only reads, or set the x-inspect_docker_sandbox.unsafe_allow_writable_host_mounts opt-out and allowlist it after review. The JSON report schema is unchanged. IETS008 now also accepts the packaged pytest_inspect_evals.metrics helper, and --explain works from a wheel without mdformat.

Changed

  • custom_metric_tests (IETS008) now accepts the packaged epoch helper by default. A test counts when it imports pytest_inspect_evals.metrics or the deprecated tests/utils/metric_epochs.py shim. Before, only metric_epochs counted, so a test written the recommended way was still warned about. helper-module now takes a list as well as one name. A dotted name must appear as consecutive parts of the import path: pytest_inspect_evals.metrics matches from pytest_inspect_evals import metrics but not from inspect_evals.foo import metrics. Before, a dotted name matched by its last part alone.
  • sandbox_privileges (IESC001) now also reports the mounts that inspect_ai's Docker sandbox refuses by default in releases after 0.3.279: writable host bind mounts, read-only binds, configs or secrets in a service that could remount them writable, shared bind propagation, writable submounts, any volumes_from, and named volumes or mount types whose host access cannot be verified. These findings have no allowlist key, because an allowlist entry cannot make inspect_ai accept the mount. Upgrading can fail a package that passed before, including one whose writable bind mount or volumes_from is allowlisted. Fix the mount, usually by adding :ro, or set the top-level x-inspect_docker_sandbox.unsafe_allow_writable_host_mounts: true opt-out. The rule reports the opt-out for review under that key. A non-boolean opt-out value is an error, since inspect_ai refuses it too.

Fixed

  • --explain no longer fails with ModuleNotFoundError: No module named 'mdformat' when the package is installed from a wheel. It ran the rule's page through mdformat, which is only a docs dependency. The page is now printed as written, which renders the same in the terminal; the doc field of --output-format json can differ from docs/rules/<code>.md in whitespace and table rules.