Skip to content

security: harden bash permission matching against shell redirects for deny-by-default agents #859

@anandgupta42

Description

@anandgupta42

Found in the v0.8.0 release review (deferred from the reviewer-agent P0). tool/bash.ts matches the permission pattern against the whole redirected_statement text (node.parent.text), so a write-redirect rides inside an allowed pattern (an agent allowed 'git log *' can run 'git log -p > target'). Fixed for the reviewer agent by denying bash, but any deny-by-default bash-allowlist agent is affected. Durable fix: emit the redirect target as its own permission check (or deny > and >> for deny-by-default agents). Needs design + tests; too large for the v0.8.0 patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions