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

Đã đóng
#348 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Một pull request liên quan đã được merge.

  • #349 của @blitzcrieg1 — đã merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
security

Hướng nghiên cứu

Start by locating CLASSIFY_MAX_LEN and the block-mode decision path in the hook and policy code. Read how the current partial-classification cases fall through to allow, then trace where the event is recorded so the partial flag can be attached. Done means oversized or undecodable input yields ask in block mode with partial classification recorded, while log mode stays unchanged.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

detection-rule enhancement

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.

Ngôn ngữ chính
Python
Star
10
Fork
5
Merge trung bình
9 giờ 44 phút
Pull request đã merge (30 ngày)
116

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của blitzcrieg1/agentmetry

Tất cả issue của blitzcrieg1/agentmetry

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.