Repository navigation
v4.22.2
Closes the findings an audit of 4.22.0 left open in 4.22.1, and the further findings two audit passes made on this
release before it was tagged; each was reproduced on invented projects and is now covered by a test. Two changes of
policy: no findings are capped by default, and no check stops at a fixed count, so every finding reaches JSON and
SARIF. Measured before release on the full scan of the same 1,840 repositories, in locked-down containers: 139,422
findings became 269,132, almost all findings the old per-file and per-rule caps used to hold back (most of them
JH306 suppression comments, JH156 open n8n triggers, JH104 dynamic SQL, JH502 and JH501 test-quality and
JH101 secrets). Scores read the same bounded budget as before: 1,815 repositories kept their score, 25 rose and
none fell, and 4 changed grade (two B to C, one C to D, one D to E), where the old caps had kept the first minor
findings in a file and hidden a more serious one.
Changed
- Agent-sized output.
scan --summaryandreview --summaryprint a bounded overview (counts, top rules, the most serious findings, what was set aside: a few dozen lines on any repository), and--out FILEwrites the full JSON report to a file to be read selectively. On a large repository the default scan printed about 190 KB; the summary is about 2 KB. The skill now tells the agent to use them and never to print a full JSON report into the conversation, where it is paid for on every later turn. A.jankhunt42folder (where--outreports go) is never scanned. - Listing every finding does not by itself change the score. The Jank Score reads the same bounded budget as before (per rule, the 200 highest-point findings, at most 5 per file), now chosen most serious first. Other fixes in this release do change scores where they change findings: on the 1,840 repositories measured, 25 scores rose and 4 grades changed, all where the old caps had hidden a more serious finding.
- No findings are capped by default. Scan and review used to keep 5 findings per rule in one file and 200 per rule, and count the rest; every finding now reaches JSON and SARIF. Human-readable output keeps its own display limit (
--max-findings), and the score already counts a rule's findings past its first ten at 10%.--max-per-file-ruleand--max-per-ruleremain as limits you can set; what they hold back is counted and still fails--fail-on. - The README explains the two ways to use jankhunt42: ask an AI coding agent that has it installed as a skill, or run the command-line tool yourself.
- The mass-testing page (
references/soak.md) says how the evaluation corpus is pinned (tree hash, and for 17,013 snapshots the commit holding that content) and how each release is measured on 1,840 of its repositories before it ships.
Fixed
- A virtual-environment marker deleted in the index no longer hides its folder from a staged review. Revision maps and passports of a subfolder whose path holds a backslash keep their paths relative to that subfolder.
- No check stops at a fixed count any more: 22 checks used to return at most 3, 5 or 10 findings per file without counting the rest (a sixth unpinned base image went unreported); one safety bound now applies to every check and counts what it holds back. The terminal review and the review brief say what the review set aside, and a review counts findings the engine held back.
- A name holding a raw byte has every backslash doubled when shown, so no two files can share a displayed name; an excluded file with such a name no longer breaks the JSON or the map. A link is read under its own name when a rule selects files by that name, and a link the operator excluded stays excluded whatever order the files are listed in.
- A PHP one-line comment (
#or//) ends at the closing?>tag, so code after it on the same line is read. A finding in a git-ignored file is capped at minor as part of its rating, before the limits and the gate, so a limit can no longer make--fail-onact on a rating no finding carries. Findings past a check's safety bound are counted only when the run selected that rule, at the rating the run gives it. - A connection to an international host name in an agent sandbox's log (
café.example.com) is compared in its ASCII (punycode) form, so it is listed by name and reaches the undeclared-destination check instead of being counted as a connection with no destination. - A file that could not be read and has a name byte that is not UTF-8 no longer makes the JSON invalid. In a scan's SARIF, two debug calls (or two weak-hash or inner-HTML findings) on one line are two alerts; every other rule's alert identity is unchanged.
- Review and passport report a supported file a structured check could not parse, as the scan does. A review's SARIF says what the review held back and which changed files it skipped, even when it has no alerts, and names the right project. The working-tree map records the folders and files it set aside, as a revision map does.
- A staged or revision review decides whether a folder is an installed environment from the tree it reviews, not the working folder. Raised limits reach every debug call; past a check's own safety bound (100,000 per file) findings are counted as capped. Untracked names keep their backslashes. A name whose text holds a backslash before
xNNis shown with its backslashes doubled, so it can never look like another file's escaped byte. - The per-file and per-rule limits keep the most serious findings, not the first ones found, and
--fail-onalso counts findings the limits held back: a project-rated major in a later file can no longer be pushed out of the report, and out of the gate, by minor findings found earlier. - PHP
#line comments are read as comments (a#[...]attribute stays code): code rules no longer match text inside them, and a# jankhunt42: ignorecomment in PHP counts as the ignore comments of other languages do. map --basereads each compared revision's own committed config (its ignore globs and declarations, found from the scanned folder up to the repository top), aspassport --basedoes: an uncommitted policy edit no longer changes a comparison of two commits,--no-configis honoured, and a parent folder's declarations apply to a subfolder.- Revision comparisons (
map --base,passport --base,review) apply the same folder rule as a scan: a virtual environment (anenvfolder holdingpyvenv.cfg) and an installed plugin's bundle are set aside, so switching to a revision comparison no longer brings installed code back into the assessment. Map evidence keeps a backslash that is part of a file name instead of pointing at a different file. - In a review, a new file's final newline no longer counts as an extra changed line (which lowered the score); a review's SARIF alert keeps its identity when unrelated files change, using the same finding identity baselines compare; the scorecard names the rulesets behind a changed rating, as the full scan does.
- A review's rule-pack digest covers every field that changes what a rule reports (files, languages, target, exclusions), and its scan id includes the rulesets, rules switched off and changed ratings, so two reviews under different policies no longer share an identity. The review names each ruleset with its digest, and a receipt's reproduction command carries the
--rulesetarguments it needs. - A site rule is matched against every real line as written, spaces-only lines included, the same way its examples are checked when the policy loads; before, a rule could pass its example and miss the same line in a file.
- Review lists every changed path, a staged binary included (recorded as binary), from git's exact name list; accented names, spaces and quotes in staged names are kept as written instead of becoming unreadable paths. A file name byte that is not valid UTF-8 no longer hides the file in a git project or crashes map and passport: reports write it as
\xNNand stay valid UTF-8. The map claims the file limit only when a file was turned away. - A folder link is never followed and is now listed, as a link inside the scanned folder or one leading outside it, instead of vanishing. A stored password hash gets guidance about the verifier (no "rotate now", not tagged as a secret), since nothing shows the password itself was disclosed.
- A ruleset field that is present is checked as written:
"rules": false,"ignore": nullor"severity": ""is refused with the field named (exit 2), while a field left out still takes its default. - Folders and files set aside are recorded relative to the report's root, so two projects scanned together no longer collapse into one path. Version-control folders other than the repository's own
.git(.hg,.svn, a nested.git) are listed, as 4.22.0 promised. An installed plugin's bundle is counted as a file, so its folder is no longer called unread when its settings were read. Findings are ordered once more after every severity change, so the first detailed finding is the most serious. - The file-limit notice appears only when the limit turned an eligible file away (a folder holding exactly as many files as the limit no longer claims later files were skipped); files named on the command line count toward the limit;
--max-filesmust be at least 1. - A run narrowed with
--ruleor--categorysays so (JSONset_aside.selection, a scope line in the report), and what it holds back is counted only among findings it could have shown, so--min-severity inforeally reveals the count it gives. An ignore comment can name a site rule, hyphens included. Review lists the rules--ignore-cior--ignore-ruleswitched off. - JH204 reports every debug call: two on one line are two findings, and its own five-per-file stop is gone, so
--max-per-file-rulereveals them all (what the cap holds back is counted). An ignore directive counts only in a comment: a quoted example such as"jankhunt42: ignore JH204"in a string no longer suppresses the next line or counts as an author's suppression. - A submodule or a nested repository inside a scanned repository is listed as a folder not read (its own project), instead of vanishing from the scan. When a link and the file it points to are both listed, the real file is kept, so a link named
a.txtno longer stops the Python checks of the.pyfile it points to. A link whose own name gives the file something its real name lacks (a role such as an agent command, settings, MCP config or CI workflow, or a language with its own checks, such asa.pypointing at a text file) is read under that name too, whatever order the files are listed in. - A file named on the command line is governed by its own folder's config, never by the folder the command runs from; several inputs start the search from the folder they share. Before,
scan ../target/sample.pyfrom a folder whose config disabled a rule applied that config to the file. - A supported structured file that could not be parsed (a malformed MCP or agent settings file) is reported as not parsed, so its structured checks are known not to have run; before, it counted as scanned with no warning.
What's Changed
- 4.22.2: close the remaining findings of the 4.22.0 audit by @cloudbustinguk in #47
Full Changelog: v4.22.1...v4.22.2