From 609d425af6b452574baca2fdf98e14fb9acbd9ca Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 06:35:46 +0000 Subject: [PATCH] dream(security): #4960 revert out-of-scope CJS-mirror edit, fix CI The "guard" check failed: __tests__/helper-signing.test.ts's Ed25519 provenance gate (ADR-174) caught that v3/@claude-flow/cli/.claude/helpers/ hook-handler.cjs -- the npm-shipped, cryptographically signed helper artifact -- no longer matched helpers.manifest.json's signed hash. The previous commit's CJS-mirror port (done by an independent adversarial critic reviewing this PR) edited that file directly; re-signing it requires the GCP-held ruflo-helpers-signing-key, a release-time operation explicitly out of scope and authority for this nightly research session. A second, separate test (session-start-hook-settings-risk-scan.test.ts's "root and package hook-handler.cjs copies are byte-identical" check) means the root copy can't diverge from the package copy either, so reverting only one side was not an option. Reverted hook-handler.cjs (both copies) and the parity-test's node/deno/ bun/php sample additions to their pre-critique state. The core candidate (settings-risk-scanner.ts + its own test/corpus) is untouched and remains ACCEPT on its own evaluation. The CJS-mirror gap the critic found is real and still open -- recorded in the gist/issue as a disclosed, not-fixed finding for a future night that can go through the real signing pipeline, rather than fixed here by defeating the gate that exists to catch exactly this kind of unsigned edit. --- .claude/helpers/hook-handler.cjs | 12 +----------- v3/@claude-flow/cli/.claude/helpers/hook-handler.cjs | 12 +----------- .../session-start-hook-settings-risk-scan.test.ts | 10 +--------- 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/.claude/helpers/hook-handler.cjs b/.claude/helpers/hook-handler.cjs index 456b46a215..0dbe2e4360 100755 --- a/.claude/helpers/hook-handler.cjs +++ b/.claude/helpers/hook-handler.cjs @@ -462,16 +462,6 @@ const SR_DANGEROUS_COMMAND_WORDS = [ ]; const SR_SHELL_EXEC_WORDS = ['bash', 'sh', 'zsh', 'python', 'python3', 'perl', 'ruby', 'eval']; const SR_DOWNLOADER_WORDS = ['curl', 'wget']; -// Mirrors settings-risk-scanner.ts's INTERPRETER_WORDS (Dream Cycle -// 2026-11-11): general-purpose scripting interpreters with the same -// GTFOBins-documented shell-breakout capability as python/ruby/perl, but -// kept OUT of SR_SHELL_EXEC_WORDS — that array also drives -// srScanCommandStringForRisk's downloader+shell-exec check on fixed hook -// *command strings*, where `node