Skip to content

v4.23.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 23:12
· 20 commits to main since this release

Agent hooks: jankhunt42 now works inside an AI coding agent's own loop.

Added

  • jankhunt42 hook stop: at the end of each turn, reviews what the agent changed and keeps it working while it has
    left a problem at or above --fail-on (default major). Claude Code and Codex receive {"decision": "block", "reason": ...} listing the problems. Each problem stops the agent until it is answered, once per session: an
    agent that changes nothing after a block has given its reasons, so it may stop at once; one whose fixes keep
    failing may stop after three blocked stops in a turn (--rounds). Either way the user sees a warning with what is
    still open (systemMessage), and that problem does not stop the agent again in the session (later turns show a
    one-line reminder; a problem fixed and later brought back is raised again). A clean change prints an empty
    decision. "What the agent changed" is
    everything since the session began (the start hook records that commit), committed or not, so an agent that
    commits before it stops is reviewed all the same; each commit of the session is also checked for secrets, since
    a secret committed and removed later stays in the history. Ignore comments, or changes to jankhunt42's
    configuration, rulesets or policy, that the agent added this session keep it working too: they hide a finding,
    they do not fix it. Outside a git repository nothing is reviewed or written; its state stays in the user's cache,
    never in the repository.
  • jankhunt42 hook start: a session-start briefing under 2,500 characters, from the map (seconds even on large
    projects): the exposure class, the credentials, data stores, outside hosts and AI services in reach (names only,
    never values), what the agent must not widen, and, when a saved scan exists (.jankhunt42/scan.json), the
    repository's most frequent problems. Every name from the repository is reduced to plain characters, shortened and
    marked as data, not instructions. Nothing is written into the project.
  • jankhunt42 hook install --agent claude-code|codex|opencode: prints the hook entries; --write adds them to
    .claude/settings.local.json (or --scope user), or Codex's ~/.codex/hooks.json, idempotently and never to the
    committed project settings (a committed hook that runs commands is what JH704 reports). OpenCode gets
    instructions for calling the hooks from a plugin.
  • The skill offers the hooks to people working with an AI coding agent.

Security

  • A scanned repository can no longer get jankhunt42 to overwrite a file outside the places it was asked to write.
    A repository could ship a link named like a report (.jankhunt42 -> ~, .jankhunt42/scan.json -> ~/.bashrc);
    --out, which the skill points inside the project, followed it (4.22.4 by writing through it, 4.22.5 by
    writing at the link's target), and a report carries text the repository controls. Now --out on scan,
    review, map, passport and passport --compare refuses any link inside the scanned folder and exits 2 with
    the link's name; a link outside the scanned folder (an operator's own daily.json -> run.json) is still
    followed. The new hooks keep their state in the user's cache (~/.cache/jankhunt42/hooks/), never in the
    repository, hook install --write refuses a settings path that runs through a link inside the project, and the
    session briefing ignores a saved scan report that is a link or that git tracks (one shipped with the code).
  • A repository can no longer stall jankhunt42 by making a file git reads into a named pipe, a link or a device: a
    .gitignore or .gitattributes anywhere in the tree, .git/info/exclude, or an excludes file its own config
    names. git opens these while it lists and diffs and waits on a pipe forever; each command stalled for 25 s per git
    call. Now scan, map and passport walk the folder instead (the walk never opens special files) and say why,
    and review refuses with the reason. The check reads directory entries only: 0.3 s on a 53,651-file repository.
    Found by adversarial fuzzing (named pipes at the files jankhunt42 and git read by name).
  • A repository can no longer rewrite the reader's terminal, or hide its own findings, with control or bidi
    characters in its file names or contents. File names in every report now write each control, invisible or
    bidi-reordering character as the \xNN bytes of its UTF-8 form (as non-UTF-8 bytes already were; SARIF links
    still lead to the real file), and the HTML report replaces such characters in any repository text with U+FFFD.
    Before, scan and review printed ESC sequences, carriage returns and backspaces from file names as they were,
    so a name could clear the screen or overwrite the line that reported it.

What's Changed

  • 4.23.0: agent hooks; security hardening (link writes, stalled git, terminal injection) by @cloudbustinguk in #52

Full Changelog: v4.22.5...v4.23.0