v0.5.0-beta
π codebadger β v0.5.0-beta
v0.5.0-beta β high-scale stability hardening + a CPG-only refactor. This is a breaking release: six file/source-dependent MCP tools and all built-in prompts are removed, and source snapshots are now ephemeral. Driven by a postmortem of a ~300-CVE batch that surfaced load-tier fragility, host-OOM, and a connection-refused storm.
β οΈ Breaking changes
- Removed 6 MCP tools.
list_files,get_method_source,get_code_snippet,get_macro_expansion,get_codebase_summary, anddiscover_fixed_vulnerabilitiesare gone. codebadger is now CPG-only β it analyzes the Code Property Graph, not files on disk. Read raw source from your own checkout (agents already have grep), userun_cpgql_queryfor graph-level code access (node.code), and run git-history recon on demand in your own clone. The 9 pure-CPG browsing tools (list_methods,list_calls,get_call_graph,list_parameters,run_cpgql_query,find_bounds_checks,get_cpgql_syntax_help,get_cfg,get_type_definition) plus the taint and detector tools are unchanged. - Removed all built-in MCP prompts. Methodology now lives with the calling agent; the server ships tools only.
- Ephemeral source. After a CPG is built, the source snapshot (
playground/codebases/<hash>, incl. any GitHub clone) is deleted β the CPG is the sole persisted artifact. A later regenerate re-fetches source. SetCPG_EPHEMERAL_SOURCE=falseto keep snapshots for build debugging.
π©Ή Stability & performance (load tier)
- Verify-probe timeout no longer condemns valid CPGs. The post-import readiness probe used a hard-coded 15 s timeout that, under host pressure, marked perfectly valid CPGs as failed/empty mid-load. It's now configurable (
JOERN_VERIFY_TIMEOUT_SECONDS, default 60) and bounded by the load budget; a query that times out while a CPG is still loading no longer terminates the server. - Transient load failures are retried, not fatal. A momentary stall during reactivation used to permanently mark a codebase
failedeven though itscpg.binwas valid on disk. Reloads now retry up toJOERN_LOAD_MAX_ATTEMPTS(default 3) for transient causes; a genuinely empty/broken build is still failed fast. - Build memory is bounded against the container cap.
build_workersis auto-clamped at startup sobuild_workers Γ build_heapfits the build container's memory limit, eliminating OOM-killed builds (exit 137) and the host-memory exhaustion they caused. - No more connection-refused storm. Stale cached Joern clients (pointing at a re-spawned worker's old port) are now rebuilt against the live registry; queries are no longer dispatched into a loading/generating server, and a
READYcodebase whose worker was reaped is transparently reactivated.
π Concurrency
- Generation single-flight. Concurrent
generate_cpgcalls for the same source no longer race: the source copy is atomic (build-in-temp βos.replace, so a half-merged tree can't produce a spurious empty/parse-failed CPG), and a per-hash Rediscodebase_generation_lockdeduplicates the staging+enqueue so identical concurrent requests don't repeat the work.
βοΈ New configuration
| Env | Default | Purpose |
|---|---|---|
JOERN_VERIFY_TIMEOUT_SECONDS |
60 |
Per-poll readiness-probe timeout (bounded by load timeout). |
JOERN_LOAD_MAX_ATTEMPTS |
3 |
Reload-from-disk retries for a transient load failure. |
CPG_EPHEMERAL_SOURCE |
true |
Delete the source snapshot once the CPG is built. |
CPG_BUILD_WORKERS is now auto-clamped to the build container's memory cap. See docs/configuration.md.