AAK-INTERNAL-SCANNER-FAIL: A scanner did not finish every file
- Severity
- INFO
- Category
- Agent Config (
agent-config) - Scanner
- No scanner module. The rule id is named in code by
agent_audit_kit/engine.py,agent_audit_kit/models.py. - Auto-fixable
- No.
- SARIF name
InternalScannerFail
What it detects
A scanner did not finish its work on every file, so the rules it owns were not evaluated where it stopped, and the results are incomplete. Either the scanner crashed, which is a bug in agent-audit-kit itself and costs its findings on every file (please file an issue with the evidence string), or it refused one file it could not read or parse safely, which costs that file alone. Either way the scan went on with every other scanner. The pin-drift scanner reports here, against the file, when .agent-audit-kit/tool-pins.json exists but cannot be read: a rug-pull check with no readable baseline has checked nothing, and the evidence says why the file could not be used. Any scanner reports here, against one file, when it refuses that file: a JSON or JSONC file nested past 500 levels (Python's own parser stops at a depth that differs by version, and every version refuses past this; real configs nest under 20), one nested deeper than Python's TOML or Python parser takes (before Python 3.11, whose parser has no depth check, a Python source a linear screen bounds past 10,000 levels is refused before it is parsed; the screen counts each operand of an and or or chain, and of a comparison chain such as a < b < c, as a level, though Python builds such a chain one level deep, so on 3.9 and 3.10 a flat x = a and b and ... of about 10,000 names is refused and reported here, while 3.11 and later parse it; one under that bound is parsed, and costs what a source of its size does: up to about 40 s of CPU for 500 KB on 3.9, deep or not), a TOML key of more than 64 dotted parts (tomllib builds a dotted key one part at a time, at a cost that grows with the square of the parts, so the file is refused before it is parsed), a TOML file holding an integer Python cannot convert (one past 4,300 digits, the limit int() has had since 3.9.14, 3.10.7 and 3.11; a JSON file reads such an integer as the nearest float and a YAML file as its text, so neither is refused), a Python syntax tree deeper than the scanner's walk takes (a walk runs with a recursion limit of 10,000 frames, about 3,300 levels for the walk that takes the most frames a level; the deepest of 100,303 real files has 569), or YAML nested past 100 levels, or past 64 levels of [ ] or { }, or grown by its aliases past their bound, or a file the scanner's size-capped read finds over its cap although the file's size, read just before, said it was not (one that grew in between, or a filesystem that misreports sizes; a file whose size puts it over the cap is skipped, as the owning rule states), or a pom.xml that declares a DOCTYPE (no Maven POM needs one, and the entities it can declare grow a small file past any cap as they are expanded). The scanner went on with every other file, and the evidence names the scanner, the file and the reason.
How to fix
If the evidence names an input file, repair it. For the tool-pin file, restore it from version control, or review the current tool definitions and re-pin with agent-audit-kit pin; re-pinning accepts whatever the config declares now, so review first. Otherwise file an issue at https://github.com/sattyamjjain/agent-audit-kit/issues with the scanner name, exception class, and (if safe) the project shape.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-INTERNAL-SCANNER-FAIL
Limitations
None stated. The registry records no limitations for this rule; that is not a claim that it has none.
References
No external references are recorded for this rule.
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-INTERNAL-SCANNER-FAIL.md: the page then shows that text, with the registry reference appended under it.