Skip to content

Aphrodite v1.2.2 - Security & Correctness Hardening Sweep

Choose a tag to compare

@github-actions github-actions released this 13 Jul 08:52
· 962 commits to Current since this release
Aphrodite/v1.2.2
774d49d

Compare Aphrodite/v1.2.1...Aphrodite/v1.2.2

Aphrodite v1.2.2 💋 Plugin v2.0.5

Summary

The largest patch release to date: a ~60-commit security-and-correctness hardening sweep driven by systematic bug-triage reports across the FFI layer, proxy runtime, CCR pipeline, and config resolution - plus the toolchain/CI modernization and packaging groundwork that enabled the first crates.io publish of all three crates (aphrodite-headroom-core 0.1.1, aphrodite 1.2.2, aphrodite-hermes 1.2.2) immediately after this tag.

Changes

  • Fix (security): proxies now bind loopback only and reject DNS rebinding (crates/aphrodite/src/proxy.rs) - the cache (:9797) and token (:9798) listeners previously bound 0.0.0.0, exposing unauthenticated /retrieve, /history, and /ccr/* endpoints to the local network; the loopback_only middleware only checked the TCP peer IP, so a hostile webpage could reach the proxy via DNS rebinding. The default bind is now 127.0.0.1, the middleware additionally validates the Host header against known loopback hostnames, and CorsLayer::permissive() was removed outright (the proxy has no legitimate browser consumer).
  • Fix: FFI/proxy correctness overhaul (crates/aphrodite/src/{config,config_loader,proxy,hooks,session}.rs, crates/aphrodite-hermes/src/lib.rs) - 20+ interconnected issues from triage reports 06/07: per-handle locking replaces the single global mutex (two agent sessions can now compress concurrently); post_llm_call finally calls session::archive_turn (previously aphrodite_diff always returned zero turns in real Hermes usage); env-var overrides (APHRODITE_API_URL, APHRODITE_MODEL, APHRODITE_DB, ...) now actually pierce the TOML as documented; the response cache gained TTL enforcement, a complete cache key (tools/temperature/top_p/...), 2xx-only caching, and a 1 MB body cap; CCR store write failures now leave content uncompressed instead of minting unresolvable markers; upstream response headers (Retry-After, x-ratelimit-*) and query strings are forwarded; and the setup shim is generated from the live plugin source instead of a drifted hand-copied template.
  • Fix: proxy server startup and limits (crates/aphrodite/src/proxy.rs) - all TCP listeners are bound up front so a port conflict aborts hard instead of leaving a silent half-alive process; the Prometheus latency histogram's unbounded bucket is relabeled +Inf; the catch-all proxy route gets its own 64 MB body limit (agent chats over ~200k tokens were rejected with 413 under the old blanket 1 MB limit).
  • Fix: CCR pipeline hardening (crates/aphrodite/src/{marker,resolve,retrieve,catalog,hooks}.rs) - normalize_hash() at every retrieval boundary tolerates the LLM echoing a full marker body back as the hash argument; toc/search JSON emits full 40-char hashes (12-char truncations were unresolvable); savings accounting made internally consistent; read_file references are tracked before the essential-tool early return (the most common file-reference source was silently never recorded); dead stage-2 shadowing lookup removed.
  • Fix: panic-safety across the C ABI (crates/aphrodite-hermes/src/lib.rs) - every extern "C" export now routes through a guarded() catch_unwind wrapper (a panic previously unwound across the FFI boundary - UB that aborts the host Hermes process), and _ccr_center is threaded through compression as documented.
  • Feature: dynamic hook adapter and effect runtime for Python integration; PowerShell installation script for Windows; example Hermes Agent profile (profiles/); SSE streaming - text/event-stream responses forwarded chunk-by-chunk with a 64 MB cap for non-streaming bodies.
  • Chore (refactor): proxy modules feature-gated behind cfg(feature = "proxy") so the cdylib no longer links axum/tokio/reqwest; 7 unused dependencies removed; preview.rs extracted from lib.rs; inline catalog JSON replaced with catalog::build_catalog; SetupError converted to thiserror; duplicate proxy functions renamed.
  • Chore (toolchain/CI): MSRV bumped to 1.88 on the stable toolchain with cargo-deny strict-allowlist mode; GitHub Actions pinned to commit SHAs with new Rust test/deny jobs and split build/release orchestration; release scripts consolidated with version-sync and push-failure tracking; git hooks now guard against silent submodule data loss and pin submodules to the superproject index; ggshield secret-scanning pre-commit hook added.
  • Chore (tests/docs): pytest suites replace the old smoke tests (handle-based C-ABI, plugin shim config surface); documentation tree rewritten (env-var reference consolidated into a single source of truth annotating live vs. unwired vars, CCR threshold/lifecycle/marker-format docs corrected, stale numeric claims fixed).

Infrastructure

  • Tests: cargo test --workspace ✅ (1,089+ passed, 0 failed - 849 headroom-core + 240 aphrodite crates, as recorded in Maintain/CHANGELOG.md)
  • Build: cargo build --release -p aphrodite -p aphrodite-hermes ✅ clean (10.8s, per CHANGELOG)
  • crates.io: all three crates published in dependency order right after this tag - aphrodite-headroom-core 0.1.1 → aphrodite 1.2.2 → aphrodite-hermes 1.2.2 (the two packaging fixes this required - moving the plugin shim into templates/ for include_str!, and the headroom-core pin bump 0.1.0 → 0.1.1 - landed immediately after the tag and are documented under v1.2.2 in the CHANGELOG)

What Ships

9 artifacts across 3 targets. No Windows binary on this tag - CI shipped the
three Unix targets plus their dylibs and checksums. The plugin submodule at this
tag is v2.0.5; the v2.0.6 sync landed immediately after tagging.

# Artifact Platform Kind Size
1 aphrodite-aarch64-apple-darwin macOS ARM64 (Apple Silicon) Proxy binary + CLI 11.7 MB
2 aphrodite-x86_64-apple-darwin macOS Intel (x86_64) Proxy binary + CLI 12.6 MB
3 aphrodite-x86_64-unknown-linux-gnu Linux x86_64 (glibc) Proxy binary + CLI 38.3 MB
4 libaphrodite_hermes-aarch64-apple-darwin.dylib macOS ARM64 (Apple Silicon) Hermes plugin (cdylib) 29.4 MB
5 libaphrodite_hermes-x86_64-apple-darwin.dylib macOS Intel (x86_64) Hermes plugin (cdylib) 8.2 MB
6 libaphrodite_hermes-x86_64-unknown-linux-gnu.so Linux x86_64 (glibc) Hermes plugin (cdylib) 31.6 MB
7 SHA256SUMS-aarch64-apple-darwin.txt macOS ARM64 (Apple Silicon) Checksums 210 B
8 SHA256SUMS-x86_64-apple-darwin.txt macOS Intel (x86_64) Checksums 208 B
9 SHA256SUMS-x86_64-unknown-linux-gnu.txt Linux x86_64 (glibc) Checksums 215 B

Missing target on this tag: x86_64-pc-windows-msvc. Plugin v2.0.5 ships from
the standalone repo, not as an asset here.

Links