Skip to content

Release v0.3.7 — Security hardening + legacy separation#55

Merged
ApiliumDevTeam merged 11 commits intodevfrom
fix/axum-path-params
Mar 7, 2026
Merged

Release v0.3.7 — Security hardening + legacy separation#55
ApiliumDevTeam merged 11 commits intodevfrom
fix/axum-path-params

Conversation

@ApiliumDevTeam
Copy link
Copy Markdown
Contributor

Summary

  • Decouple from legacy Holochain — 20+ crates moved to exclude, Cargo.lock -4400 lines
  • 17 security fixes across cortex, minimal, contracts, zk (6 critical, 11 moderate)
  • 3 crash-prevention fixes — index OOB, deadlock elimination, atomic underflow
  • Doc-test fixes in hope_agents and aingle_viz
  • Version bump — all 10 product crates aligned to 0.3.7
  • cargo audit — 0 vulnerabilities

Security highlights

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
QUIC TLS certificate signature verification, 1MB message limit
Contracts Per-byte gas metering, 64KB storage value cap

Executables verified at 0.3.7

  • aingle-cortex (REST/GraphQL/SPARQL API)
  • aingle-minimal (IoT node)
  • aingle-viz (DAG visualization)

Test plan

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

🤖 Generated with Claude Code

ApiliumDevTeam and others added 11 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
@ApiliumDevTeam ApiliumDevTeam merged commit c4e36a3 into dev Mar 7, 2026
4 checks passed
@ApiliumDevTeam ApiliumDevTeam deleted the fix/axum-path-params branch March 9, 2026 09:09
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