fix: ADR-061/062 security fixes + cross-platform Windows hooks (v3.5.14)#1303
Open
fix: ADR-061/062 security fixes + cross-platform Windows hooks (v3.5.14)#1303
Conversation
…dows parity ADR-061 Deep Audit Fixes (12 P0/P1/D issues): - S-1: Replace execSync with execFileSync to prevent command injection (GCS) - S-2: Add MAX_BUFFER constant (10MB) to prevent unbounded stdout capture - S-3: Add validatePackageName() to sanitize plugin names - S-4: Add IPFS CID format validation before fetch - S-5: Add buffer size limits to execSync calls - D-1: Fix CFP magic-number check (use subarray, not slice) - D-2: Fix unsupported format error (throw instead of silent fallback) - D-3: Fix MCP partial-JSON accumulator (per-session buffering) - D-4: Fix duplicate provider registration guard - D-5: Fix memory namespace parameter passthrough - D-6: Fix process command error handler (use err.message) - D-7: Fix GCS credential loading (resolve path, validate fields) ADR-062 Cross-Platform Hook Commands: - Replace node -e "..." one-liners with node script subcommand invocation - Add cmd /c prefix on Windows to bypass PowerShell stdin issues - Fix stdin reading with 500ms timeout (prevents Windows hanging) - Guarantee process.exitCode = 0 in all hook scripts - StatusLine uses plain node (no cmd /c) for proper stdin forwarding - Fix invalid SubagentEnd → SubagentStop hook event name - Restore valid SubagentStart hook event Tests: 1600 passed, 46 skipped across 23 test files Co-Authored-By: claude-flow <ruv@ruv.net>
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
cmd /cprefix, stdin timeout, exit code guarantees, statusline fix)@claude-flow/cli,claude-flow,ruflo)Key Changes
Security (ADR-061)
execSyncstring interpolation withexecFileSync(prevents command injection)MAX_BUFFERconstant (10MB) for all exec callsWindows Parity (ADR-062)
node script subcommandinstead ofnode -e "..."(no quoting issues)cmd /cprefix on Windows bypasses PowerShell stdin pipe issuesnode(nocmd /c) for proper stdin forwardingprocess.exitCode = 0guaranteed in all hook scriptsSubagentEnd→SubagentStophook eventTest plan
🤖 Generated with claude-flow