Files
sorcnr a444b27835 fix(security): close traversal/symlink, injection and unsafe-install gaps
Audited by clean-context subagents across three rounds; every finding fixed and
re-verified.

- F1 path traversal: sessionId allowlist + lexical & realpath containment;
  refuse a symlinked run root, symlinked run dir, and any symlinked run file
  (lstat-based, dangling-safe)
- F2 command injection: no shell interpolation of session ids — server-derived
  $SESSION_ID, quoted; lint scans agent files AND command templates (incl.
  backslash line-continuations)
- F3 read-only guardrail: per-agent deny list (real permission actions),
  fail-closed when the permission API is unavailable
- F4 stored prompt injection: sanitised run-state injection (phase allowlist,
  validated dir name, no raw newlines/paths)
- F5 installer is non-destructive by default (refresh opt-in via --refresh)
- F6 refuse symlinked/JSONC configs; string-aware comment/trailing-comma strip
- F8 create-only reference copy on plugin load
- add team/security-auditor agent + docs/GUARDRAILS.md + guardrail lint rules
2026-10-12 02:53:25 +03:00
..