Skip to content

hook bash-check allows unsafe commands hidden behind shell wrappers #94

Description

@adityathebe

The PreToolUse bash-check hook denies unsafe commands when they are issued directly, but allows equivalent commands wrapped in bash -c, sh -c, eval, or command substitution.

The hook evaluates the outer command instead of the command that will execute, so users can receive an allow verdict for behavior the safety hook is intended to deny.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions