Repository navigation
v0.10.0
New checks for model-controlled input run on the host (IESC002) and for unseeded shuffles (IEBP010, IEBP011), and IEBP003 now also checks FieldSpec-built samples. Each can fail a package that passed 0.9.0. Suppression comments should now give a reason, and suppressed findings count as met. Before moving a pin: JSON reports are now schema_version: 3, because suppressed rules count as passing. A consumer that recomputes or checks scores must accept version 3. The inspect_evals docs dashboard and the inspect-evals-actions register publisher already do.
Added
host_code_execution(IESC002) reports model-controlled input that reaches code execution on the host instead of in the sandbox. The sources are tool arguments, model output (.completion,.messages,.tool_calls,.arguments,.output.message,.output.choices,state.output,.generate(...)results,ModelOutputparameters) andsandbox()read_file()/exec()results. The sinks are code execution (exec,eval,compile,__import__,runpy.run_path,runpy.run_module), shell commands, processes with a tainted program (subprocess,asyncio.create_subprocess_exec,os.exec*,os.spawn*,os.posix_spawn,pty.spawn), unsafe deserialisation (pickle,marshal,dillandcloudpickleloads,joblib.load,pandas.read_pickle,numpy.loadwithallow_pickle, unsafeyamlloads,torch.loadwithoutweights_only=True) and a taintedimportlib.import_module.inspect_ai.util.subprocessis a shell command when its payload is written as a string and a process when it is a list or tuple literal; any other payload is judged likesubprocess.run(cmd). Taint is traced within a file, through one level of same-file calls. A traced flow is an error, allowlisted aspath/within/package.py:sink. Every other shell, code or deserialisation sink in host code is a warning, so a reviewer sees each one once. Imports resolve per scope, so importingevalfrominspect_aiexempts onlyeval, and only where the import is in force. Files matched byexcludecount as sandbox code and are not read (#12).- The
excludedocumentation now defines host code: every Python file outside its globs. - Suppression comments take a reason after
--:# inspect-evals-lint: ignore[sample_ids] -- ids are row numbers.suppression_syntax(IECQ005) warns about a comment that suppresses something without one. The suppression still applies, and a warning counts as passing, so no score changes. The reason runs to the end of the line and is never read for other markers.--followed by another tool's comment, a second--, or an unfilled<reason>placeholder does not count as a reason. The rule's pass message now says every comment has a reason. shuffle_choices_seeded(IEBP010) fails eachshuffle_choices=that resolves toTrue, which shuffles the answer choices without a seed and so changes each sample's option order and target letter between builds. An int is a seed and is accepted.shuffle_seeded(IEBP011) warns on eachshuffle=that resolves to true with noseed=, or aseed=that resolves toNone, since the order decides which samples--limitpicks. It asks for a seed, not for the shuffle to go: a dataset whose records come grouped by category or subject needs a shuffle for a--limitrun to span it. A call to inspect_evals'shuffle_and_seed(shuffle)is read asshuffle_choicesis, soshuffle: bool | int = 42passes and= Truewarns. Both rules also read a dataset's.shuffle()and.shuffle_choices()methods, and skip a call inside anifthat the defaults never enter, such asif shuffle:withshuffle=False. A dataset helper passedshuffle_choices=Truewith aseed=is taken to be seeded, but a known loader is not, since itsseed=orders the samples, not the choices. Both read any call passing the argument by keyword, so a task's call to its own dataset helper counts, andshuffleandseedpassed positionally to the known loaders. A value is read literally, through the enclosing function's parameter default, or through a module constant the file binds once. A value that can't be resolved, including a parameter the function body reassigns, is not flagged. When the value comes from a parameter default the diagnostic points at the default, and calls reading one default report it once. On inspect_evals main IEBP010 fails 6 sites inlab_bench,sadandtruthfulqa. IEBP011 warns at 41 sites in 30 evaluations; 3 of them (mmlutwice,scbench) call a helper that seeds internally (#53).- A comment can no longer suppress
suppression_syntaxfindings, which are about the comments themselves.per-file-ignoresstill can. - Every suppression the tool suggests now includes
-- <reason>: the CLI's failure summary, the footer on each rule page, thellms.txtintro, and the hints for legacy, malformed and past-header markers.
Changed
sample_ids(IEBP003) also checks samples built from aFieldSpec. AFieldSpec(...)withoutid=fails unless every loader it is passed to assample_fields=setsauto_id=True. A name passed assample_fieldsis resolved by Python's scoping rules, andsample_fieldsandauto_idpassed positionally to Inspect's and inspect_evals' loaders are read. An evaluation whose samples all come fromFieldSpecnow passes or fails instead of skipping. On inspect_evals main this fails at four sites:air_bench,lingolyand both SimpleQA tasks (#52).- Suppressed findings count as met. A suppression is a decision recorded in the repository, and pylint, ruff, mypy, Biome and ESLint all leave suppressed findings out of their counts. In
Score,passingis nowpass+warn+suppressed. Thesuppressedcount is shown beside the score, e.g.**16/17 checks met** (2 by suppression)in the Markdown headline. A package whose only unmet rules were suppressed now scores 100%, where it scored less on 0.9.0. - JSON reports use
schema_version: 3, becausepassingandscoreadd up differently. Fields and statuses are unchanged. A consumer that recomputes or checks the score must countsuppressedas passing for version 3, and must be updated before any pin moves to this release. There are two: the register publisher in inspect-evals-actions, and the inspect_evals docs dashboard (docs/_scripts/register-lint.mjs), which checkspassingagainst its parts. - The Markdown list's summary line counts the rules it holds by kind, e.g.
1 not met · 1 with warnings · 2 met by suppression.by_suppression(score)is exported for consumers that build their own headline. - The package builds with
uv_buildinstead of hatchling, and its version is set once inpyproject.toml;inspect_evals_lint.__version__reads it from the installed metadata. The wheel holds the same files and metadata as before, apart from__init__.py's version lookup. The sdist now holds only the package source,README.md,LICENSEandpyproject.toml, not the whole repository.
Fixed
- The console's "Failures by check" and "Warnings by check" tables no longer read messages, hints and locations as Rich markup, which dropped bracketed text such as
ignore[<rule>]in a hint. - A second marker on the same line, before any reason, is now read. Before, only the first marker on a line took effect.