Repository navigation
v0.3.1 — Security hardening and race condition fixes
Security Hardening & Race Condition Fixes
This release addresses high-priority security vulnerabilities (sandbox escape vectors, path traversal, dialog deadlocks) and multiple concurrency/race conditions across the Hermes agent interface.
Security Mitigations
- Sandbox escape mitigations: Disarmed dangerous URI schemes (
javascript:,file:,chrome:,data:) inMarkdownRendererand prevented unhandled schemes inHermesChatViewfrom invoking privileged Gecko chrome execution. Added nested parenthesis link URL support. - Workspace sandboxing & database protection: Sandboxed Hermes ACP agent session
cwdandworkdirto<profile>/zotero-hermes/workspace/(isolated fromzotero.sqlite), and disabled ACP filesystem client capabilities. - Path traversal prevention: Enforced strict ID validation (
/^[a-zA-Z0-9_-]+$/) across allConversationManagerfile access methods. - Modal dialog deadlock fix: Handled native
cancelandcloseevents inApprovalDialogso pressingEscaperesolves cleanly rather than deadlocking the approval queue.
Race Condition & Concurrency Fixes
- Process spawn mutex: Added
connectPromisemutex inHermesClientto prevent concurrent calls from spawning multiplehermes acpchild processes. - Stream buffer bleed: Added
abortActiveStream()and buffer clearing on chat switch, creation, or deletion; dropped reasoning chunks targeted at inactive conversations. - Debounced save race: Captured target conversation ID in
ChatManager.scheduleSave()to prevent delayed debounced writes from clobbering switched chats. - Duplicate SSE stop events: Guarded against spurious duplicate stop notifications in
HermesApiClient. - Context synchronization: Added
removeAttachedItem()toItemManagerand synchronized withContextBar.onRemoveItem. - Multi-window teardown: Switched to per-window
WeakMap<Window, any>inhooks.tsto prevent window close from disrupting other open windows.
Install
Download hermes-agent-for-zotero.xpi and install via Zotero → Tools → Plugins → gear → Install Plugin From File.