Skip to content

v3.4.0

Choose a tag to compare

@eniz1806 eniz1806 released this 06 Jun 08:32

A full-codebase audit fix batch.

Fixed

  • Auto-compact death spiral β€” _estimate_tokens used the cumulative lifetime input-token sum, so after enough turns auto-compact fired on every message, repeatedly nuking the conversation. Now uses the most recent request's prompt size and resets after compaction.
  • Command injection in git_diff β€” the auto-approved tool interpolated args into a shell=True string (RCE via prompt injection). Now runs git diff via argv with shlex, no shell.
  • /team crashed with NameError β€” re was used but never imported at module level.
  • Unbounded agentic loops β€” max_iterations was defined but never enforced; now capped (default 15, configurable).
  • API keys world-readable β€” ~/.kodiqa/settings.json now written with 0600 perms (dir 0700).

Changed

  • Non-blocking startup β€” the model update/discovery check (which ran ollama pull on every installed model + scraped ollama.com every launch) is throttled to once per update_check_interval_hours (default 24) and skippable via --no-update / check_updates: false.

Added

  • --no-update CLI flag; check_updates / update_check_interval_hours config options.
  • ruff linting + CI lint step; dead-code/unused-import cleanup.
  • Regression tests for the git_diff-injection and auto-compact fixes (290 tests total).