mirror of
https://github.com/rohitg00/agentmemory.git
synced 2026-09-14 20:16:33 +08:00
cbaaf4fb44
Fixes 6 security issues in agentmemory's default deployment, viewer, mesh sync, export path, and startup flow. ## Findings Addressed 1. **Default REST/stream exposure on 0.0.0.0** — bind default REST and stream services to 127.0.0.1; restrict Docker port publishing to localhost; add dedicated iii-config.docker.yaml for Docker usage. 2. **Stored XSS via inline viewer handlers** — remove inline event handlers from the viewer; replace with delegated data-action event handling; switch to nonce-based CSP for viewer HTML; add script-src-attr 'none'. 3. **Arbitrary path writes in Obsidian export** — confine exports to AGENTMEMORY_EXPORT_ROOT (default ~/.agentmemory); reject vaultDir values outside the allowed root. 4. **Mesh sync without peer auth** — require AGENTMEMORY_SECRET for mesh endpoints and sync operations; send Authorization: Bearer <secret> on mesh push/pull requests. 5. **Secret redaction misses modern token formats** — add coverage for Bearer tokens, sk-proj-*, broader sk/pk/rk/ak variants, GitHub ghs_/ghu_ tokens. 6. **CLI executes remote shell script directly** — remove curl|sh installation pattern; use existing local iii-engine binary if available, otherwise fall back to Docker. ## Validation - 654 tests passing (8 new security tests) - npm run build succeeds - Merged with main and resolved README conflicts to preserve the new benchmark/competitor table layout Thanks @eng-pf for catching these and submitting the fixes.
16 lines
325 B
YAML
16 lines
325 B
YAML
services:
|
|
iii-engine:
|
|
image: iiidev/iii:latest
|
|
ports:
|
|
- "127.0.0.1:49134:49134"
|
|
- "127.0.0.1:3111:3111"
|
|
- "127.0.0.1:3112:3112"
|
|
- "127.0.0.1:9464:9464"
|
|
volumes:
|
|
- iii-data:/data
|
|
- ./iii-config.docker.yaml:/app/config.yaml:ro
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
iii-data:
|