Skip to content

Security: Add -- delimiter and validateBranchName in agent modeFix fetch command to include baseBranch correctly#1387

Open
kakashi-kx wants to merge 2 commits into
anthropics:mainfrom
kakashi-kx:security/fix-basebranch
Open

Security: Add -- delimiter and validateBranchName in agent modeFix fetch command to include baseBranch correctly#1387
kakashi-kx wants to merge 2 commits into
anthropics:mainfrom
kakashi-kx:security/fix-basebranch

Conversation

@kakashi-kx

Copy link
Copy Markdown

Defense-in-depth security hardening fixes:

  • Add -- positional delimiter in restoreConfigFromBase to prevent
    git option injection via baseBranch (CWE-88)
  • Add validateBranchName() in agent mode for consistency with tag mode

Related: HackerOne report #3784661

@kakashi-kx

Copy link
Copy Markdown
Author

Added second fix: validateBranchName() in agent mode (src/modes/agent/index.ts).

This PR now has both changes:

  1. -- delimiter in restoreConfigFromBase
  2. validateBranchName() in agent mode

Related: HackerOne #3784661 (closed as Informative — these are
defense-in-depth hardening patches)

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