Skip to content

Harden allowedTools parser and git push wrapper#1333

Open
samanmohamadamin90 wants to merge 1 commit into
anthropics:mainfrom
samanmohamadamin90:fix/secure-allowedtools-parser
Open

Harden allowedTools parser and git push wrapper#1333
samanmohamadamin90 wants to merge 1 commit into
anthropics:mainfrom
samanmohamadamin90:fix/secure-allowedtools-parser

Conversation

@samanmohamadamin90
Copy link
Copy Markdown

Summary

This PR hardens the security model around tool parsing and git push execution.

Changes

  • Hardened parseAllowedTools() against:

    • wildcard tool permissions
    • malformed escaping
    • duplicate flag abuse
    • missing values
  • Added stricter validation for:

    • --allowedTools
    • --allowed-tools
  • Improved test coverage for parser edge cases.

  • Hardened git-push.sh wrapper to restrict push behavior and reduce abuse surface.

Validation

  • All tests passing:

    • 691 passing
    • 0 failing
  • TypeScript typecheck passes successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant