feat(validation): add branch name validation across provider schemas

- Introduced a regex validation for branch names in Bitbucket, Git, Gitea, GitHub, and GitLab provider schemas to ensure valid branch formats.
- Updated the corresponding schemas to include the new validation rule, enhancing input integrity and preventing potential errors.
- Added a utility for branch validation in the server utils.
This commit is contained in:
Mauricio Siu
2026-05-08 23:50:38 -06:00
parent b20ff64cbf
commit fef2de1ec5
13 changed files with 38 additions and 15 deletions

View File

@@ -0,0 +1,3 @@
// Valid git branch names per git-check-ref-format rules.
// Rejects shell metacharacters that would enable command injection.
export const VALID_BRANCH_REGEX = /^[a-zA-Z0-9._\-/]+$/;