Skip to content

v0.3.7 — Security hardening, legacy separation, crash prevention#56

Merged
ApiliumDevTeam merged 12 commits intomainfrom
dev
Mar 7, 2026
Merged

v0.3.7 — Security hardening, legacy separation, crash prevention#56
ApiliumDevTeam merged 12 commits intomainfrom
dev

Conversation

@ApiliumDevTeam
Copy link
Contributor

Release v0.3.7

Production release merging all changes from dev since v0.3.4.

Breaking changes

  • AINGLE_JWT_SECRET env var now required (feature auth)
  • AINGLE_ADMIN_PASSWORD env var now required (min 12 chars)
  • CortexConfig::cors_enabled: boolcors_allowed_origins: Vec<String>
  • GraphQL playground disabled by default
  • Refresh tokens are now single-use (JTI revocation)

Security (17 fixes)

Area Fix
JWT Secret from env var, single-use refresh tokens with JTI revocation
CORS Explicit origin whitelist (disabled by default)
API Body size limit 1MB, query cap 10K, ReDoS prevention
Crypto Real Ed25519 signatures, constant-time ZK comparisons (subtle)
QUIC TLS certificate signature verification, 1MB message limit
Contracts Per-byte gas metering, 64KB storage value cap
Admin Password from env var with minimum length enforcement

Crash prevention (3 fixes)

  • Index out-of-bounds in batch proof verification → safe .zip() iteration
  • Deadlock risk in reputation + proof store → sequential single-lock scoping
  • Atomic underflow in WebSocket client counter → fetch_update with checked_sub

Infrastructure

  • 20+ legacy Holochain crates moved to workspace exclude
  • Cargo.lock reduced by ~4400 lines
  • cargo audit — 0 vulnerabilities
  • All 10 product crates + 3 executables aligned to 0.3.7

Verified

  • cargo check --workspace — clean
  • cargo test --workspace — 1321 passed, 0 failed
  • cargo audit — 0 advisories

🤖 Generated with Claude Code

ApiliumDevTeam and others added 12 commits March 7, 2026 13:30
Axum 0.8 changed route path parameters from `:param` to `{param}`.
The old syntax causes a runtime panic on router construction.

Affected routers: cortex REST (mod, memory, skill_verification), viz API.
- Fix :id → {id} in observability and reputation routers
- Add rust_crypto feature to jsonwebtoken 10 (prevents panic on JWT ops)
1. Mutex lock: recover from poisoned mutex instead of panic (main.rs)
2. RocksDB: cf() returns Result instead of expect/panic (rocks_storage.rs)
3. DecompositionRule: remove panic in Clone impl, type is not Clone (goal_solver.rs)
4. GraphQL test: fix add_triple → insert + Predicate type (graphql_subscriptions_test.rs)
5. aingle_zk: remove unused bincode dependency (Cargo.toml)
6. deep_context example: migrate bincode 1.x → 2.x API (semantic_index.rs)
- Upgrade rusqlite from 0.25 to 0.32 in all workspace crates
  (fixes libsqlite3-sys CVE-2022-35737, severity: high)
- Upgrade r2d2_sqlite 0.18 → 0.25 for compatibility
- Add .cargo/audit.toml to acknowledge legacy holochain advisories
  that cannot be fixed without major infrastructure replacement
- cargo audit now passes clean (0 vulnerabilities, 0 warnings)
Move 20+ legacy crates to workspace exclude, remove patch overrides,
and inline wasm_types into aingle_cortex to break the last dependency
chain (cortex → zome_types → middleware_bytes → rmp-serde 0.14.4).
Cargo.lock shrank ~4400 lines; cargo audit now returns zero advisories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- JWT secret from AINGLE_JWT_SECRET env var (no hardcoded defaults)
- Single-use refresh tokens with JTI revocation
- CORS explicit origin whitelist (default: disabled)
- Request body size limit (default: 1MB)
- GraphQL playground disabled by default
- ReDoS prevention: regex pattern length + compiled size limits
- Query result hard cap (10K) to prevent OOM
- Admin password from AINGLE_ADMIN_PASSWORD (min 12 chars)
- Fix index-out-of-bounds crash in batch proof verification
- Eliminate deadlock risk: never hold multiple RwLocks simultaneously
- Saturating atomic counter to prevent usize underflow
- Replace Blake3 HMAC stub with ed25519-dalek real signatures
- QUIC: verify TLS certificate signatures (replace SkipServerVerification)
- QUIC: enforce 1MB max message size before buffer allocation
- Wallet: bounds-check serialization to prevent data corruption
- RocksDB: safe slice bounds check instead of panic on short values
Use subtle::ConstantTimeEq for all cryptographic comparisons in
Pedersen commitments and hash opening proofs to prevent timing
side-channel attacks.
- Per-byte input gas charging at function entry
- Storage write gas proportional to value size (max 64KB)
- Address::derive() restricted to #[cfg(test)]
- deploy_address() with random nonce for production use
- InvalidInput error variant for proper error handling
- Add missing Agent trait import in hope_agents doc-tests
- Export DagEvent from aingle_viz lib.rs
- Fix infinite loop in EventBroadcaster doc-test
Aligns all 10 product crates (libraries + executables) for the
v0.3.7 release. Inter-crate refs use semver "0.3" ranges which
remain compatible.

Crates: aingle_graph, aingle_zk, titans_memory, aingle_ai,
aingle_logic, hope_agents, aingle_cortex, aingle_minimal,
aingle_contracts, aingle_viz
Release v0.3.7 — Security hardening + legacy separation
@ApiliumDevTeam ApiliumDevTeam merged commit a57e174 into main Mar 7, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant