Skip to content

Block mode should ask on input too large or opaque to classify #348

Closed

Description

@blitzcrieg1

Since 0.10.3 the hook classifies a command in full up to 64 KiB (CLASSIFY_MAX_LEN), and past that its first and last 32 KiB. That is a detection bound. In block mode it means a command built to hide something in the middle of more than 64 KiB is allowed without being fully read.

Expected: with tool policy in block mode, input the hook could not fully classify (over the bound, and later anything it recognises as encoded and cannot decode) gets ask, not allow, and the event records that classification was partial. Log mode is unchanged. A security check should fail closed on what it cannot read.

Raised by a reader on r/ClaudeCode on 2026-10-30. This is hook and policy code, outside the frozen detection files.

Activity

  1. added
    enhancement
    detection-rule
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    detection-ruleenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions