Skip to content

Releases

v0.5.0 — trust foundation and finding identity

Choose a tag to compare

@Yash-1511 Yash-1511 released this 06 Sep 12:00

An audit of KAVACH itself found twelve ways it overstated its own work. None of them was a detection bug — each was the engine asserting something it had not established, in a place nothing checked. This release closes all twelve and rebuilds finding identity underneath them.

Version note: 0.4.0 in the changelog is the R0 milestone. It was never separately tagged; this tag is the first release carrying either body of work.

R0 — the report can only claim what the run established

  • A scanner that could not run no longer reads as a scanner that found nothing. Every adapter declares an ExecutionContract — the exit statuses that mean it ran, and the shape its output must take — validated before normalize() sees a byte. ok means the tool executed and its output validated; it never means the target is clean.
  • Dependency scanning is bound to the target. pip-audit was auditing the host interpreter's own environment, so a clean target inherited the auditing machine's vulnerable packages. It now resolves manifests inside the target and refuses inputs that would make pip fetch and build the audited repo's requirements.
  • A detector match is not a confirmation. detector_facts, review_state and reproduction_state are three separate fields. A regex match no longer claims a line of code was read.
  • Promotion validates. Source locations, CVSS vectors and scores, narratives and evidence references are all checked before publishing, and rejected candidates are preserved with their diagnostic rather than dropped.
  • Two conclusions, not one verdict. score.assess answers did this assessment finish? and did the risk policy pass? separately, and refuses the second while the first is unresolved.
  • Evidence outlives the run. Durable, content-addressed, redacted before serialisation. The reproduction annex prints the invocation that was recorded, or says it was not recorded.
  • No report names a human who did not read the target, and no report says PRODUCTION-READY.

R1 — one finding per root cause, and no way to lose one

  • Records replace the overloaded Finding: Assessment, Observation, Occurrence, FindingRecord, Evidence, Verification, ReportSnapshot, DedupDecision.
  • Identity is assigned, not derived. A title edit no longer creates a new finding and retires the old one; two independent sinks in one file stay two findings.
  • A transactional SQLite registry with exactly one authoritative writer. Migration reconciles as arithmetic the caller can check, snapshots first, and rolls back by sealing rather than leaving both sides writable.
  • Merges move things; they do not remove them. A merge into a keep that does not exist is refused. Cycles and cross-project merges are rejected. Every merge is reversible.
  • Absence is not a fix. fixed requires a retest at the assessed revision, covering every affected occurrence, with a control case. Absence otherwise resolves to not_observed, untested or out_of_scope.
  • Roots, occurrences and observations are three numbers. Three scanners finding one flaw is one root cause.

Breaking

  • Python floor is now 3.12. 3.9 reaches end of life before this platform's first release.
  • An in-progress audit directory from 0.3.x/0.4.x will not resume — which artifact closes a gate changed. Finished audits are unaffected.
  • diffing.changed_files and scope_guard now take and return DiffResult; dispatch.ingest returns a 3-tuple.
  • A PoC now needs a typed poc.manifest.json (kavach poc-manifest writes it).
  • New verb: kavach registry status | plan | migrate | cutover | rollback. The registry is opt-in per audit directory.

What this release does not claim

662 tests → 1180, passing on CPython 3.9.6 and 3.13.5. Those establish that the engine's own contracts hold. They say nothing about whether KAVACH is good at finding vulnerabilities — detection accuracy is unmeasured, and no evaluation corpus exists yet.

Also absent: live testing against a running target, semantic deduplication, and the audience-specific report variants. 14 of 64 planned work packages are complete.

Dependency and reuse provenance: docs/upstream-components.json.

v0.3.0 — eight modes become three presets over one pipeline

Choose a tag to compare

@Yash-1511 Yash-1511 released this 05 Sep 18:47

Eight modes collapse into three intensity presets over one pipeline. This is a breaking release: phase ids changed, gate filenames changed, and five modes are gone. Finished audits are unaffected — findings/ and reports/ are exactly what they were.

An in-progress audit dir does not carry across, and kavach resume refuses one rather than guessing. On 0.x the minor is the breaking axis state.version_compatible checks, because what breaks across one is exactly what resume depends on — the phase list, the prereq graph, and which artifact closes a gate. All three moved here, so the engine version moves with them: a dir written by any 0.2.x exits 4 naming the engine that made it. Start a fresh audit dir, or install the release that made the old one to finish it.

Eight modes, six advertised, and nobody could tell which was which

karya-module.json listed six. The engine had eight. merge and confirm were dispatchable from any harness that read the registry and named in no manifest. Underneath, each mode carried its own hand-maintained phase list, its own prereq table and its own gate filenames — which is how LT2, BL3, DP4, DF1 and RV7 ended up being five ids for one job, closing between them on four different artifacts.

There is now one 26-phase PIPELINE with one id namespace, and a mode is a subset of it:

Preset Phases Default dispatch ceiling
lite 6 15
balanced 13 60
deep 20 120
--live +6 +30 on top of the preset

The three nest — lite ⊂ balanced ⊂ deep — so moving up a preset only ever adds phases, and a phase id means the same work whichever preset scheduled it. Prerequisites are declared once in PREREQ_EDGES against the whole pipeline; a preset takes the induced subgraph, rerouting an edge into a dropped phase onto that phase's own prereqs, transitively. Under lite, poc's declared crosscheck resolves to ['recon', 'hunt'] that way — nothing unsatisfiable, and nothing running before its real inputs exist.

core/tests/test_manifest_modes.py asserts the manifest's ids are exactly modes.MODES, so the manifest and the registry cannot drift apart again.

Five modes removed, each naming its replacement

Removed Replacement
diff the kavach diff verb
confirm --live on any preset
revisit re-run any preset against the existing audit dir
merge the kavach merge-run verb
longshot removed

Passing one to a mode-taking verb exits non-zero with that replacement named, rather than reporting an unknown mode — a muscle-memory command deserves better than a shrug. kavach render --mode now runs the same check; it did not, so kavach render --mode longshot printed longshot on the cover of a signed report.

--live replaces confirm mode

Live PoC validation was a mode, which made it a choice against depth: you could have deep, or you could have execution against a running instance, and getting both meant two audits over one tree. It is now a flag. --live appends inventory, envscan, provision, exploit, testgen and certify to whichever preset is running, and adds 30 to its ceiling, because provisioning an environment and executing per finding is a cost orthogonal to audit depth. Every rail is unchanged: static-only remains the permanent default, and the charter in persona.md still governs absolutely.

A plain deep run no longer writes reports/confirmation-report.md. certify owns that artifact and certify is a --live phase — under 0.2.x deep ended on a DP16 that wrote one anyway, and a confirmation report is a claim about execution, which deep does none of.

Semantic ids, and one gate artifact per phase

BL3 is hunt. DP12 is variant. CF1_5 is crosscheck. An id now says what the phase does, and runs/<phase>/ reads as English.

One phase shared by three presets cannot gate on a filename that varies with the preset, so the prefixes are gone: deep-chamber-summary.md and balanced-chamber-summary.md are one chamber-summary.md, every confirm-* gate dropped its prefix, and <mode>-cleanup-summary.json is cleanup-summary.json. The result is 26 phases and 26 distinct gate artifacts, one apiece — no phase can be closed by another phase's output, which four revisit phases sharing a findings/ gate used to allow.

The prefix was quietly doing a second job: it was also what re-opened cleanup for a second pass over the same audit dir. That job now belongs to the gate rule instead of the filename — cleanup is satisfied by its summary and an audit dir with no tmp/, findings-draft/ or live-workspace/ left in it. So a --live tail over a finished audit, or a heavier preset re-run over one, gets its own cleanup pass rather than inheriting the first run's summary and leaving its own transient state, seeded credentials included, on disk.

lite produces a report

lite now schedules render, so it ends in reports/final-audit-report.md instead of a bare findings tree — a fast triage pass that produced no readable deliverable was a strange thing to offer. It deliberately does not schedule report, the per-finding drafting phase: that costs one kavach-reporter dispatch per promoted finding, which is most of a 15-dispatch ceiling.

Removed

modes.missing_prerequisites() and PREREQ_ARTIFACTS, and with them kavach plan --json's "prerequisites" key. They existed because five modes scheduled neither recon nor sweep while everything downstream read what those two write, so a harness had to know to run them by hand. Every preset now schedules both as phases of its own.

The codegraph integration — kavach graph, core/kavach/graphindex.py, the manifest's codegraph requirement, and the graph passages across the docs. It was optional from the day it shipped, every hunter already had a grep fallback, and 0.2.5 had to special-case its telemetry to stop it phoning home about a private repository's symbol graph.

The kavach enumerate verb, KAVACH_LONGSHOT_LIMIT, kb.update_target_status, and the kavach-longshot-hunter, kavach-longshot-aggregator and kavach-wave agents.

Both gates green on the merge commit: 662 tests, corpus exit 0.

v0.2.5 — a corrupted findings tree, a manifest full of tool state, and telemetry nobody asked for

Choose a tag to compare

@dev-adhuniklabs dev-adhuniklabs released this 25 Aug 17:34
1aff7a2

A patch, and it holds: an audit written by any 0.2.x still resumes here. No phase id, no prereq edge, no gate artifact and no CLI output shape moves. All three defects were found by driving the engine from a real harness against real trees.

consolidate numbered from scratch, so the tree grew on its own

Display ids were reassigned in severity order on every pass, so a second pass slid every id down a place and wrote a fresh directory beside each old one — for findings that had not changed. Measured on a balanced audit: 35 finding directories for 24 promoted findings, with C1-C8 and H1-H3 each doubled, and render built the deliverable over the duplicates.

--prune-stale is the wrong fix: a renumber landing between a proof of concept being written and the next promote carries that PoC away with the directory. Losing evidence a run paid for is worse than a duplicated directory. So the numbering is stable instead — ids are assigned from what is on disk, a new id is issued above every id on disk rather than into a gap, a severity crossing bands renames its directory rather than orphaning it, and a tree an earlier engine already doubled is adopted by whichever copy holds the evidence.

render now reads through findings_tree.scope_promoted, the reader coverage already used, so the gate and the deliverable describe one set.

recon walked dot-directories

A 23 MB .codegraph/codegraph.db reached a file manifest. Dot-directories are skipped as a class now, behind an allowlist for the ones an audit genuinely wants — .github and .husky are real attack surface, and .aws, .ssh, .gnupg are exactly what a secret scanner is for.

graph index did not disable codegraph telemetry

codegraph telemetry is on by default, so an audit could phone home about a private repository's symbol graph. Every spawn now carries CODEGRAPH_TELEMETRY=0.

Both gates green on the merge commit: 659 tests, corpus exit 0.

v0.2.4 — longshot and revisit, published in the manifest

Choose a tag to compare

@dev-adhuniklabs dev-adhuniklabs released this 25 Aug 15:38
adbaf2c

A patch, and deliberately so: an audit written by any 0.2.x still resumes here. Nothing in the engine changes — the only edit is what the module tells a harness it offers.

longshot and revisit were drivable and not advertised

modes.MODE_PHASES has carried all eight modes since 0.1; karya-module.json declared four. A harness that validates a requested mode against the manifest — which is the right thing for it to do, since the manifest is what a module publishes — refused two modes the engine plans cleanly and a driver walks end to end.

  • longshot — LS1 core:enumerate, LS2 the per-file hail-mary hunt, LS3 aggregation.
  • revisit — RV0 intent cartography through RV11c, over a finished audit.

confirm and merge stay undeclared on purpose. confirm runs live proof-of-concept code against a running service, which every sandbox a harness is likely to impose refuses by design; merge needs a multi-audit driver (merge-run, core:merge --extra) that does not exist yet.

Both gates green on the merge commit: 647 tests, corpus exit 0.

v0.2.3 — two ways an audit silently threw away work it had paid for

Choose a tag to compare

@dev-adhuniklabs dev-adhuniklabs released this 25 Aug 05:16
c4bf18e

A patch, not a contract change: an audit written by 0.2.0, 0.2.1 or 0.2.2 still resumes here.

Both bugs below lose work a run has already paid for. Both were found by driving balanced against real trees, and neither is reachable from a stub.

A fan-out's gate artifact is not proof the fan-out finished

BL3 hands all eight domain hunters the same assigned output path, so the first one home writes the gate artifact and gate_satisfied answers true for the whole phase. Within one process a harness can carry its own roster ledger — that ledger dies with the process.

Measured on a resumed audit of a 25,083-file tree: four hunters failed on a provider 402, one of the four that succeeded wrote the gate, and on resume plan never offered BL3 again. The audit advanced to BL4 permanently missing half its static analysis, including kavach-supply, whose slice held 62 of the audit's 158 leads. Nothing reported the gap.

  • runner.fanout_pending() diffs the roster against runs/<phase>/*.json; next_actionable keeps a phase open while any member has no result.
  • Deliberately not consulted by phase_status — an incomplete fan-out is re-planned without blocking what follows, because a hunter that can never succeed would otherwise wedge the audit. This engine reports rather than blocks, and coverage is where the shortfall belongs.
  • dispatch.result_path_for() is result_path without the mkdir.
  • cleanup keeps runs (it is in DURABLE), so a completed audit stays complete.

merge --extra is a sub-agent result, so it is read like one

merge read every --extra with the strict findings.json reader, which requires a findings key and attributes nothing. BL4's probe and BL5's chamber answer with {agent, status, summary, outputs} — so the strict read raised KeyError and a harness passing a phase's results wholesale lost the entire call.

load_agent_findings is the reader for that shape. Its own docstring already drew the line: agent results get the tolerant read, findings.json keeps the strict one.

Measured on a full balanced audit of leaky-node — 13 dispatches, $1.0910. The agents found all six of the fixture's vulnerabilities with correct line numbers: the hardcoded Anthropic, Stripe and Postgres credentials at server.js:7-9, the unauthenticated LLM proxy at 15-19, the IDOR at 25-26, the client-trusted price at 30-31.

The 38 KB report named the three secrets and none of the three logic flaws. Every finding it shipped came from a scanner.

On the same result files, with the tolerant read: findings.json 11 → 35, consolidate 11 → 24 finding dirs, the report 38 KB → 86.7 KB.

Tests

647 (was 643), corpus gate green. Six of the nine new cases were verified to fail on main before the fix.

test_mode_smoke advanced the whole balanced chain by writing gate artifacts alone, never banking a hunter's result — that test was encoding the first bug. It now banks BL3's roster, which is what completing that phase has always required.

v0.2.2 — the two bugs only a real harness could find

Choose a tag to compare

@dev-adhuniklabs dev-adhuniklabs released this 23 Aug 19:04
4d18559

A patch. An audit written by 0.2.0 or 0.2.1 still resumes here.

Both of these were found by driving the engine from a real harness against a real 25k-file tree, not from fixtures — and neither was reachable from a stub.

balanced was not runnable from a fresh audit directory

recon writes recon.json and file-manifest.txt. sweep is the only verb that writes findings.json. scope, slice, triage and render all read one of those.

lite opens with core:recon and core:sweep, so it prepares itself. balanced, deep, diff, longshot and revisit schedule neither — and nothing said so anywhere a harness could read it. A real run sent all eight BL3 hunters an empty slice, spent the money, and died nine phases later in its report tail on a findings.json nothing had written.

plan --json reports it now:

"prerequisites": [ {"verb": "recon", "artifact": "recon.json"},
                   {"verb": "sweep", "artifact": "findings.json"} ]   // empty for lite

Keyed on the artifacts rather than the mode, so it empties as they appear and a resume re-walks nothing. The part that generalises is the invariant test: across every mode in MODE_PHASES, each one either schedules a deterministic pass or declares it. No mode can silently need an artifact again.

SKILL.md had stated this for longshot and revisit only, and only for recon — findings.json was the half that actually broke balanced.

The code graph was never available on a repository nobody had indexed by hand

codegraph index <target> refreshes an existing index and refuses to create the first one, exiting 1 with "Run codegraph init first". graph index called it unconditionally, so it recorded available: false for every unindexed target — a silent fall back to grep on exactly the trees where a graph pays for itself. One hunter without a graph on a 25k-file tree measured $0.199 and 37 turns.

status --json reports initialized, so that picks the verb: init to build, index to refresh. An unreadable status falls back to init, because guessing that way costs a rebuild and guessing the other way costs the graph. --quiet is index's alone; init rejects it.

Verified against the real codegraph 1.5.0 — init builds 428 files / 8,389 nodes / 20,440 edges in 1.3s, and graph index then writes available: true.

Also

Releases #6, which declared kavach as a karya module and was never tagged.

Gates

There are no CI workflows in this repo, so both were run locally on merged main:

core $ python -m unittest discover -s tests     638 tests, OK (skipped=10)
core $ PYTHONPATH=. python -m kavach corpus     corpus gate PASSED (exit 0)

End to end: with a harness running the prerequisites up front, balanced completes all nine phases — 11 dispatches, 20 drafts, and a 179 KB signed report carrying a production-readiness verdict.

Full changelog: v0.2.0…v0.2.2

v0.2.0 — harness-agnostic engine

Choose a tag to compare

@dev-adhuniklabs dev-adhuniklabs released this 22 Aug 23:36
16103b0

Breaking for anything driving the engine. dispatch.ingest returns (written, skipped) instead of a count, phase-prompt emits a complete prompt rather than a one-line body, and a 0.1.x audit cannot be resumed by 0.2.x — kavach resume refuses across the minor and says so rather than producing an incoherent report.

The engine owns the dispatch contract

phase-prompt used to emit one line and leave the real instruction in SKILL.md prose, which made SKILL.md the spec rather than a client of it — every other harness had to re-read that prose and drift from it silently.

  • modes.PHASE_SPECS — per-phase task, references, fan-out roster, sequential flag. dispatch.phase_prompt renders a complete, dispatchable prompt; a reference the machine lacks is named as missing rather than dropped.
  • kavach plan --json — roster, 1-based index, result path, references, gate, prereqs, per actionable phase.
  • kavach agents [--json] — the roster as data, with a provider-neutral tier: (reasoning / mechanical / triage) beside model:. A test fails if the two spellings drift.
  • kavach slice — per-domain lead lists. The eight BL3/DP4 hunters were each sent the whole finding set.
  • kavach inventory (CF1) and kavach enumerate (LS1) — the two phases whose core: verb did not exist.

Discovery cost

  • kavach graph index — optional codegraph adapter. The engine never queries the graph; it establishes whether one exists so every dispatch prompt can say graph before grep, or say plainly that there is none. Missing binary, failed index and timeout all exit 0: this is a scanner, not a prerequisite.
  • kavach scope [--agent A] — ranks file-manifest.txt by security relevance, deterministically from path shape. A high rank is "look here first", never "the bug is here".

Observability and spend

  • .kavach/events.jsonl — one JSON object per engine decision, durable across cleanup.
  • budget charge --tokens-in/--tokens-out/--cost-usd, and --max-cost-usd as a third ceiling that sheds like wall clock.

Versioning and the audited tree

  • One version: kavach.__version__, with pyproject.toml reading it via dynamic.
  • Audits record engine_version and the commit / branch / dirty they were pointed at, both at state init. Resume refuses an incompatible engine and reports tree drift.
  • state.handle() — short, git-sha-shaped audit ids. kavach resume <handle>.
  • kavach since — what changed since the last completed audit, and whether it is narrow enough for diff mode.

Fixed

  • ingest is idempotent. It numbered drafts sequentially and skipped nothing, so every resume wrote a second copy of every finding — and the duplicates reached the report as inflated counts.
  • A truncated result no longer fails the phase. One dispatch killed mid-write took its seven valid siblings down with it, on every resume. Unreadable results move to runs/<phase>/corrupt/; the rest fold in.
  • Scoping signals match path tokens, not substrings (ci was matching inside "dependencies").
  • Ranking is domain-first, then score — a generic hot file was outranking every hunter's own domain.
  • paths.py resolves references/ and agents/ across all three install shapes.

622 tests (was 518 at 0.1.0), corpus gate passes.

Full changelog: https://github.com/adhuniklabs/kavach/blob/main/CHANGELOG.md

v0.1.0 - First public release

Choose a tag to compare

@dev-adhuniklabs dev-adhuniklabs released this 22 Aug 15:31

[0.1.0] - 2026-08-21

First public release.

The audit

  • Eight modes over one data flow (recon → sweep → drafts → chamber → promote → report):
    lite, balanced (default), deep, diff, confirm, revisit, merge, longshot.
  • Zero-input recon fingerprints the stack, then selects the scanners that stack earns.
  • 14 scanner adapters, Docker-first with a native fallback and graceful degradation: a
    dependency-free secret scanner and a bundled offline SAST ruleset run even with no Docker.
  • 8 domain subagents (sast, api, llm, billing, crypto, supply, config, logic) plus the
    specialist, reasoning, review-chamber, validation, and confirm rosters.
  • Six kill chains with attack trees, CVSS severity chaining, and a fail-closed certification
    gate over eight production-readiness controls.
  • 7 companion skills shipped alongside: codeql, threat-model, spec-compliance,
    variant-analysis, zeroize-audit, ci-agent-actions, semgrep-rule-creator.

Triage and cost control

  • Finding classes (reasoned, code, secret, dependency, iac), assigned
    deterministically from the finding's source, category, and rule id. Promotion keys on class
    and severity, so dependency and IaC rows roll up into aggregate directories instead of each
    getting a hand-written write-up. Nothing is dropped: every row stays in findings.json and the
    SARIF.
  • A dispatch ledger per audit, with a per-mode default ceiling and a wall-clock ceiling
    (--budget, --max-wall-seconds; 0 for unlimited). Work a ceiling drops is recorded and
    printed in the report.
  • Per-agent model tiering so mechanical single-artifact agents do not run on the most
    expensive model available.

Gates and resumability

  • Gate-driven phases. A phase is complete only when its artifact exists on disk, so an
    interrupted run resumes from real progress rather than from remembered state.
  • Coverage gates for the per-finding phases: kavach coverage --phase poc|report walks the
    promoted tree and names every directory still missing its artifact, so a run cannot report
    success with zero proofs of concept.
  • Stale-directory scoping. consolidate records what it wrote to a promoted-index manifest;
    coverage counts only those directories and reports the rest as stale with a reason.
    consolidate --prune-stale relocates them to findings-stale/ and never deletes.
  • Resumable run state in audit-state.json: atomic writes under a lock, retry/backoff
    bookkeeping, and commit-keyed diff baselines.

Reports

  • One report model behind every format, so markdown, HTML, PDF, JSON, and SARIF cannot
    disagree about a number.
  • A paged PDF with a real table of contents, running headers, a six-axis scorecard,
    ASVS/CWE/OWASP/GDPR mapping, per-axis chapters, a three-horizon remediation plan, and an annex
    giving the command behind every figure. reportlab is an optional extra
    (pip install 'kavach-audit[report]'); without it every text format still renders and the PDF
    path exits with the install command rather than a traceback.
  • A fail-closed scorecard. An axis or sub-characteristic with no findings and no proving
    control reads not assessed and is excluded from the headline figure, never scored as a pass.
  • A Limits of this run section built from shed work, coverage gaps, and every finding still
    marked suspected. A budget-constrained audit reads as one.

Integration

  • Tracker export to GitHub via the gh CLI, in two phases: kavach issues plan writes a
    reviewable manifest, and kavach issues push creates nothing without an explicit --yes.
    Idempotent on the stable finding fingerprint, so a re-audit comments on the existing issue
    instead of filing a duplicate. secret-class findings export redacted, with the matched value
    withheld and left in the local audit tree.
  • CI contract: SARIF 2.1.0 output and a stable exit-code contract (0 clean, 2 open
    Critical, 3 open High, 4 controls unmet, 5 tooling error, 6 corpus fail, 7 policy not
    met).
  • Engine-owned result paths. The engine names the file each sub-agent writes, so dispatch
    results land under runs/<phase>/ instead of accumulating invented filenames at the audit root.

Notes

  • The deterministic core never talks to a model and never dispatches a sub-agent; skill/SKILL.md
    is the only thing that issues Task calls. That seam is what keeps KAVACH model-agnostic.
  • Requires python3 and pip (PyYAML, filelock). Docker unlocks the full scanner suite.
  • 518 unit tests plus a corpus self-validation gate over deliberately-vulnerable fixtures.
  • Portions adapted from piolium (MIT, © j3ssie); see
    NOTICE for the itemized attribution.