Skip to content

v0.2.0 — Security & Adversarial Hardening

Choose a tag to compare

@selfradiance selfradiance released this 12 Mar 19:47
· 110 commits to main since this release

Security hardening release with structured red team testing, replay protection, identity governance, prediction markets, and remote deployment.

What's new since v0.1.0:

Security & Hardening:

  • Nonce store for replay protection (x-nonce header on all POST routes, duplicate rejection per identity)
  • MCP endpoint authentication (shared-secret x-agentgate-key header)
  • REST API & dashboard authentication (x-agentgate-key + HTTP Basic Auth)
  • Identity governance: admin ban/unban endpoints, auto-ban after 3 malicious resolutions
  • Structured security event logging (auth_failed, duplicate_nonce, signature_failed, bond_slashed, identity_auto_banned, outbound_blocked)
  • Auto-slash sweeper: expired bonds automatically slashed every 60 seconds

Red Team (20 attack scenarios, 5 phases):

  • Phase 1: Bond/exposure math (6 tests) — fixed slashed_cents persistence bug, negative exposure gap
  • Phase 2: Sweeper edge cases (3 tests) — confirmed race-safe
  • Phase 3: Replay attacks (4 tests) — nonce check catches all replays
  • Phase 4: SQLite concurrency (2 tests) — serialization confirmed sound
  • Phase 5: Outbound HTTP (9 tests) — fixed redirect bypass SSRF, IPv6 bracket bug
  • Invariant validator: 8 SQL assertions run after every attack test

Features:

  • Prediction market demo (create/resolve markets, auto-settle positions)
  • MCP Streamable HTTP transport (port 3001, session management)
  • 2 new MCP tools: create_market, resolve_market (7 total)

Infrastructure:

  • Remote deployment on DigitalOcean with Caddy reverse proxy and auto-managed TLS
  • UFW firewall (ports 22, 80, 443 only)
  • pm2 process manager (auto-restart, survives SSH disconnect)
  • Health endpoint for uptime monitoring
  • GitHub Actions CI
  • MIT License

Total: 56 tests passing. 3 bugs fixed, 1 SSRF vulnerability closed.