fix(security): switch hookBodySchema from passthrough to strict (E1-7)#1553
Merged
OneStepAt4time merged 1 commit intodevelopfrom Apr 9, 2026
Merged
fix(security): switch hookBodySchema from passthrough to strict (E1-7)#1553OneStepAt4time merged 1 commit intodevelopfrom
OneStepAt4time merged 1 commit intodevelopfrom
Conversation
…#1426) Unknown fields in hook payloads are no longer forwarded to SSE subscribers. Enumerated all known CC hook event fields (tool_output, stop_hook_active, reason, message, path, result, worktree_path) to preserve existing behavior. tool_input retains passthrough() for arbitrary tool-specific data. Generated by Hephaestus (Aegis dev agent)
Owner
Author
Contributor
There was a problem hiding this comment.
✅ Approved. hookBodySchema strict mode (#1426). Switched from .passthrough() to .strict() with all known CC hook fields enumerated. tool_input keeps .passthrough() (correct — arbitrary tool-specific fields). Tests verify 400 for unknown fields. CI green.
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
.passthrough()with.strict()onhookBodySchemaso unknown fields are rejected instead of forwarded to all SSE subscribers ([E1-7] hookBodySchema strict mode — unknown fields forwarded to SSE subscribers #1426)tool_output,stop_hook_active,reason,message,path,result,worktree_path) to preserve existing behaviortool_inputretains.passthrough()for arbitrary tool-specific datareasonfield — now properly typed in schemaTest plan
npx tsc --noEmit— passesnpm run build— passesnpm test— 2601 tests pass, 0 failuresCloses #1426
Generated by Hephaestus (Aegis dev agent)