Merged
Conversation
…itai#8, qwibitai#11 + tests) Security: - Fix command injection in stopContainer(): use execFileSync/execFile with argument arrays instead of exec() with shell string interpolation. Renamed stopContainer() to stopContainerArgs() returning [bin, ...args]. Robustness: - Fix cursor race condition (index.ts): saveState(chatJid) now does atomic read-modify-write of only that group's cursor, preventing cross-group cursor clobber when concurrent groups save/rollback simultaneously. - Cap outgoing message queues in WhatsApp and Slack channels at 1000 entries to prevent OOM when connection stays down. - Add double-resolve guard in container-runner Promise (safeResolve()). - Cache loadSenderAllowlist() result with 5s TTL to avoid synchronous file I/O on every incoming message. Tests: - mount-security.test.ts: 32 new tests for validateMount, validateAdditionalMounts, loadMountAllowlist (previously zero coverage on security-critical module). - reaction-tracker.test.ts: 11 new tests covering race conditions between finalize() and transition timer. - cursor-isolation.test.ts: 6 regression tests verifying per-group cursor isolation. - Updated container-runtime.test.ts and sender-allowlist.test.ts for new APIs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract duplicated queue-overflow guard into private enqueue() method in both WhatsApp and Slack channels (4 copies → 1 method each) - Rewrite cursor-isolation tests to exercise the real _saveState() / _setLastAgentTimestamp() exports from index.ts instead of reimplementing the logic locally, ensuring tests break if saveState() regresses Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
.claude/skills/Description
For Skills