fix: resolve critical concurrency, security, and reliability bugs#2
Open
Bill-Billion wants to merge 2 commits intoshareAI-lab:mainfrom
Open
fix: resolve critical concurrency, security, and reliability bugs#2Bill-Billion wants to merge 2 commits intoshareAI-lab:mainfrom
Bill-Billion wants to merge 2 commits intoshareAI-lab:mainfrom
Conversation
- queue.ts: fix drain() race condition that caused second message in same group to hang indefinitely by using draining flag - sessions.ts: add debounced write queue to prevent concurrent writeFileSync from corrupting JSON file - agent.ts: add 5-minute timeout and proc.kill() in finally block to prevent zombie Python processes - access.ts: replace Math.random() with crypto.randomBytes() for secure pairing codes; add chat_id verification to prevent cross-chat pairing code attacks - index.ts: implement graceful shutdown waiting for queues to drain (max 30s) before exiting
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.
Summary
修复多智能体分析发现的 8 个高危问题:
drain()竞态条件,drainingDepth计数器替代布尔标志proc.kill()finally 块,防止僵尸进程crypto.randomBytes()生成配对码,添加 chat_id 验证pendingPush竞态条件,确保 patcher 就绪前的文本不丢失Test Plan
修复的问题