argenis de la rosa
|
b2aff60722
|
security: pass all 4 checklist items — gateway not public, pairing required, filesystem scoped, tunnel access
Security checklist from @anshnanda / @ledger_eth:
✅ Gateway not public — default bind 127.0.0.1, refuses 0.0.0.0 without
tunnel or explicit allow_public_bind=true in config
✅ Pairing required — one-time 6-digit code printed on startup, exchanged
for bearer token via POST /pair, enforced on all /webhook requests
✅ Filesystem scoped (no /) — workspace_only=true by default, null byte
injection blocked, 14 system dirs + 4 sensitive dotfiles in forbidden
list, is_resolved_path_allowed() for symlink escape prevention
✅ Access via Tailscale/SSH tunnel — tunnel system integrated, gateway
refuses public bind without active tunnel
New files:
src/security/pairing.rs — PairingGuard with OTP generation, constant-time
code comparison, bearer token issuance, token persistence
Changed files:
src/config/schema.rs — GatewayConfig (require_pairing, allow_public_bind,
paired_tokens), expanded AutonomyConfig forbidden_paths
src/config/mod.rs — export GatewayConfig
src/gateway/mod.rs — public bind guard, pairing enforcement on /webhook,
/pair endpoint, /health no longer leaks version/memory info
src/security/policy.rs — null byte blocking, is_resolved_path_allowed(),
expanded forbidden_paths (14 system dirs + 4 dotfiles)
src/security/mod.rs — export pairing module
src/onboard/wizard.rs — wire gateway config
935 tests passing (up from 905), 0 clippy warnings, cargo fmt clean
|
2026-02-14 00:39:51 -05:00 |
|
argenis de la rosa
|
0e7f501fd6
|
feat: full-stack search engine — FTS5, vector search, hybrid merge, embedding cache, chunker
The Full Stack (All Custom):
- Vector DB: embeddings stored as BLOB, cosine similarity in pure Rust
- Keyword Search: FTS5 virtual tables with BM25 scoring + auto-sync triggers
- Hybrid Merge: weighted fusion of vector + keyword results (configurable weights)
- Embeddings: provider abstraction (OpenAI, custom URL, noop fallback)
- Chunking: line-based markdown chunker with heading preservation
- Caching: embedding_cache table with LRU eviction
- Safe Reindex: rebuild FTS5 + re-embed missing vectors
New modules:
- src/memory/embeddings.rs — EmbeddingProvider trait + OpenAI + Noop + factory
- src/memory/vector.rs — cosine similarity, vec↔bytes, ScoredResult, hybrid_merge
- src/memory/chunker.rs — markdown-aware document splitting
Upgraded:
- src/memory/sqlite.rs — FTS5 schema, embedding column, hybrid recall, cache, reindex
- src/config/schema.rs — MemoryConfig expanded with embedding/search settings
- All callers updated to pass api_key for embedding provider
739 tests passing, 0 clippy warnings (Rust 1.93.1), cargo-deny clean
|
2026-02-14 00:00:23 -05:00 |
|
argenis de la rosa
|
390cbc0a6c
|
feat: agnostic tunnel system — bring your own tunnel provider
New Tunnel trait + 5 implementations:
- NoneTunnel: local-only, no external exposure (default)
- CloudflareTunnel: wraps cloudflared binary, extracts public URL
- TailscaleTunnel: tailscale serve (tailnet) or funnel (public)
- NgrokTunnel: wraps ngrok binary, supports custom domains
- CustomTunnel: user-provided command with {port}/{host} placeholders
Config schema:
- [tunnel] section with provider selector
- Provider-specific sub-configs: cloudflare, tailscale, ngrok, custom
- Backward compatible (serde default = "none")
Gateway integration:
- Tunnel starts automatically on 'zeroclaw gateway'
- Prints public URL on success, falls back to local on failure
20 new tests (factory, constructors, NoneTunnel async start/health)
649 tests passing, 0 clippy warnings, cargo fmt clean
|
2026-02-13 16:25:01 -05:00 |
|
argenis de la rosa
|
bc31e4389b
|
style: cargo fmt — fix all formatting for CI
Ran cargo fmt across entire codebase to pass CI's cargo fmt --check.
No logic changes, only whitespace/formatting.
|
2026-02-13 16:03:50 -05:00 |
|
argenis de la rosa
|
a5887ad2dc
|
docs+tests: architecture diagram, security docs, 75 new edge-case tests
README:
- Add ASCII architecture flow diagram showing all layers
- Add Security Architecture section (Layer 1: Channel Auth,
Layer 2: Rate Limiting, Layer 3: Tool Sandbox)
- Update test count to 629
New edge-case tests (75 new):
- SecurityPolicy: command injection (semicolon, backtick, dollar-paren,
env prefix, newline), path traversal (encoded dots, double-dot in
filename, null byte, symlink, tilde-ssh, /var/run), rate limiter
boundaries (exactly-at, zero, high), autonomy+command combos,
from_config fresh tracker
- Discord: exact match not substring, empty user ID, wildcard+specific,
case sensitivity, base64 edge cases
- Slack: exact match, empty user ID, case sensitivity, wildcard combo
- Telegram: exact match, empty string, case sensitivity, wildcard combo
- Gateway: first-match-wins, empty value, colon in value, different
headers, empty request, newline-only request
- Config schema: backward compat (Discord/Slack without allowed_users),
TOML roundtrip, webhook secret presence/absence
629 tests passing, 0 clippy warnings
|
2026-02-13 16:00:15 -05:00 |
|
argenis de la rosa
|
542bb80743
|
security: harden architecture against Moltbot security model
- Discord: add allowed_users field + sender validation in listen()
- Slack: add allowed_users field + sender validation in listen()
- Webhook: add X-Webhook-Secret header auth (401 on mismatch)
- SecurityPolicy: add ActionTracker with sliding-window rate limiting
- record_action() enforces max_actions_per_hour
- is_rate_limited() checks without recording
- Gateway: print auth status on startup (ENABLED/DISABLED)
- 22 new tests (Discord/Slack allowlists, gateway header extraction,
rate limiter: starts at zero, records, allows within limit,
blocks over limit, clone independence)
- 554 tests passing, 0 clippy warnings
|
2026-02-13 15:31:21 -05:00 |
|
argenis de la rosa
|
05cb353f7f
|
feat: initial release — ZeroClaw v0.1.0
- 22 AI providers (OpenRouter, Anthropic, OpenAI, Mistral, etc.)
- 7 channels (CLI, Telegram, Discord, Slack, iMessage, Matrix, Webhook)
- 5-step onboarding wizard with Project Context personalization
- OpenClaw-aligned system prompt (SOUL.md, IDENTITY.md, USER.md, AGENTS.md, etc.)
- SQLite memory backend with auto-save
- Skills system with on-demand loading
- Security: autonomy levels, command allowlists, cost limits
- 532 tests passing, 0 clippy warnings
|
2026-02-13 12:19:14 -05:00 |
|