feat(validation): add custom validation rules for Git repository URLs and branches

- Introduced `ValidGitRepositoryUrl` and `ValidGitBranch` validation rules to ensure safe and valid input for Git repository URLs and branch names.
- Updated relevant Livewire components and API controllers to utilize the new validation rules, enhancing security against command injection and invalid inputs.
- Refactored existing validation logic to improve consistency and maintainability across the application.
This commit is contained in:
Andras Bacsai
2025-08-22 14:38:21 +02:00
parent 841e33bac0
commit 8408205955
9 changed files with 393 additions and 28 deletions

View File

@@ -1,7 +1,7 @@
<div>
<h1>Create a new Application</h1>
<div class="pb-4">Deploy any public or private Git repositories through a Deploy Key.</div>
<div class="flex flex-col pt-4">
<div class="flex flex-col ">
@if ($current_step === 'private_keys')
<h2 class="pb-4">Select a private key</h2>
<div class="flex flex-col justify-center gap-2 text-left ">
@@ -46,9 +46,8 @@
</div>
@endif
@if ($current_step === 'repository')
<h2 class="pb-4">Select a repository</h2>
<form class="flex flex-col gap-2 pt-2" wire:submit='submit'>
<x-forms.input id="repository_url" required label="Repository Url (https:// or git@)" />
<form class="flex flex-col gap-2" wire:submit='submit'>
<x-forms.input id="repository_url" required label="Repository URL (https:// or git@)" />
<div class="flex gap-2">
<x-forms.input id="branch" required label="Branch" />
<x-forms.select wire:model.live="build_pack" label="Build Pack" required>