Commit Graph
5678 Commits
Author SHA1 Message Date
Andras Bacsai 61f47cc7ee feat(deployments): support Docker image tags for preview deployments
Add end-to-end support for `docker_registry_image_tag` in preview and deployment queue flows.

- Extend deploy API to accept `pull_request_id` alias and `docker_tag` for preview deploys
- Persist preview-specific Docker tags on `application_previews` and `application_deployment_queues`
- Pass tag through `queue_application_deployment()` and de-duplicate queued jobs by tag
- Update deployment job logic to resolve and use preview Docker tags for dockerimage build packs
- Update Livewire previews UI/state to manage per-preview tags and manual preview/tag inputs
- Add migration for new tag columns and model fillable/casts updates
- Add feature and unit tests covering API behavior and tag resolution
2026-03-30 13:35:35 +02:00
Andras BacsaiandGitHub 3fddc795f6 refactor: define explicit fillable attributes on all Eloquent models (#9282) 2026-03-30 13:11:58 +02:00
Andras Bacsai 850c37bedd fix(database): auto-generate missing CA cert on SSL regeneration
Prevent null CA certificate access during database SSL certificate regeneration
across KeyDB, MariaDB, MongoDB, MySQL, PostgreSQL, and Redis components.

If no CA certificate exists, attempt to generate one and re-query; if still
missing, dispatch a clear error and stop regeneration gracefully.

Add `SslCertificateRegenerationTest` coverage for missing-CA and CA-query
scenarios to prevent regressions.
2026-03-30 13:10:49 +02:00
Andras Bacsai 1da1f32f0e refactor: use forceCreate() for internal model creation
Replace create() with forceCreate() across internal model creation operations to bypass mass assignment protection. This is appropriate for internal code that constructs complete model state without user input.

Add InternalModelCreationMassAssignmentTest to ensure internal model creation behavior is properly tested. Optimize imports by using shortened Livewire attribute references and removing unused imports.
2026-03-30 13:04:11 +02:00
Andras Bacsai 71cde5a063 Merge remote-tracking branch 'origin/next' into refactor/sync-model-attributes 2026-03-30 12:41:31 +02:00
Andras BacsaiandGitHub 7a1999ce39 feat(ui): add two step confirmation to enable self registration (#9277) 2026-03-30 11:47:59 +02:00
Andras BacsaiandGitHub 30c7ab7b7d fix(notification): updated cloud subscription links to valid url (#9296) 2026-03-30 11:47:21 +02:00
Andras Bacsai 09f1c71a76 Merge remote-tracking branch 'origin/next' into refactor/sync-model-attributes 2026-03-30 08:14:32 +02:00
Andras Bacsai c0c0349880 refactor(models): add fillable attributes for database configuration options
Add explicit fillable attributes to Service and all Standalone* database models
for new configuration options: public_port_timeout, enable_ssl, ssl_mode,
is_log_drain_enabled, is_include_timestamps, and custom_docker_run_options.

Add tests to MassAssignmentProtectionTest to verify these attributes are
properly protected by mass assignment protection across all relevant models.
2026-03-30 08:11:23 +02:00
ShadowArcanist 31ae8dd9db fix(notification): updated cloud subscription links to valid url 2026-03-30 11:37:28 +05:30
Andras Bacsai 4ec9b7ef69 fix(clone): include uuid field when cloning persistent volumes
Ensure that the uuid field is preserved during clone operations for persistent
volumes across all clone methods (CloneMe, ResourceOperations, and the clone_application
helper). This prevents UUID conflicts and ensures cloned volumes receive new unique
identifiers as intended.

Adds test coverage validating that cloned persistent volumes receive new UUIDs
distinct from the original volumes.
2026-03-30 00:06:45 +02:00
Andras Bacsai 7b1e75f37d Merge remote-tracking branch 'origin/next' into pr-8371-v4.x 2026-03-29 23:52:37 +02:00
Andras Bacsai 7ad51241f3 Merge remote-tracking branch 'origin/next' into refactor/sync-model-attributes
# Conflicts:
#	app/Models/Application.php
#	app/Models/Service.php
#	app/Models/StandaloneClickhouse.php
#	app/Models/StandaloneDragonfly.php
#	app/Models/StandaloneKeydb.php
#	app/Models/StandaloneMariadb.php
#	app/Models/StandaloneMongodb.php
#	app/Models/StandaloneMysql.php
#	app/Models/StandalonePostgresql.php
#	app/Models/StandaloneRedis.php
#	app/Models/Team.php
#	app/Models/User.php
#	tests/Feature/MassAssignmentProtectionTest.php
2026-03-29 21:32:54 +02:00
Andras BacsaiandGitHub f267a28cb2 fix: harden GetLogs Livewire component properties (#9229) 2026-03-29 21:29:23 +02:00
Andras Bacsai a52352f6cc Merge remote-tracking branch 'origin/next' into refactor/sync-model-attributes 2026-03-29 21:28:41 +02:00
Andras BacsaiandClaude Opus 4.6 9f46586d4a refactor: define explicit fillable attributes on all Eloquent models
Replace $guarded usage with explicit $fillable arrays across all models.
Sync fillable definitions with current database schema and add tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 21:25:41 +02:00
Andras Bacsai b3256d4df1 fix(security): harden model assignment and sensitive data handling
Restrict mass-assignable attributes across user/team/redis models and
switch privileged root/team creation paths to forceFill/forceCreate.

Encrypt legacy ClickHouse admin passwords via migration and cast the
correct ClickHouse password field as encrypted.

Tighten API and runtime exposure by removing sensitive team fields from
responses and sanitizing Git/compose error messages.

Expand security-focused feature coverage for command-injection and mass
assignment protections.
2026-03-29 20:56:04 +02:00
Andras Bacsai 3fde1e0f9f fix(application): persist redirect value in setRedirect
Assign the selected redirect option before validation so valid changes are saved.
Add feature tests to verify redirect persistence and rejection when no www domain exists.
2026-03-29 20:50:03 +02:00
Andras BacsaiandGitHub 9e96a20a49 fix: add validation and escaping for Docker network names (#9228) 2026-03-29 20:46:39 +02:00
Andras BacsaiandGitHub 1027c73d0f refactor: scope server and project queries to current team (#9230) 2026-03-29 20:28:21 +02:00
ShadowArcanist 3a0cfeeab6 feat(ui): add two step confirmation to enable self registration 2026-03-29 22:48:02 +05:30
Andras Bacsai 3ba4553df5 fix(security): enforce team-scoped project/env lookups in onboarding
Use firstOrFail() for team-scoped project and environment lookups across
new-project Livewire flows so missing or cross-team UUIDs fail closed.
Also dispatch an error when boarding selects a non-owned project, and
update IDOR feature tests for the new error/exception behavior.
2026-03-29 15:55:03 +02:00
Andras BacsaiandGitHub 96ae9ade23 fix: add input validation for install/build/start command fields (#9227) 2026-03-29 15:48:30 +02:00
ShadowArcanist c9f20ba2a2 fix(validation): add input validation for database public port and proxy timeout 2026-03-29 19:11:28 +05:30
ShadowArcanist 5037497ada feat(ui): add enable/disable button for scheduled task 2026-03-29 15:36:32 +05:30
ShadowArcanist d33cd7ca71 fix(ui): keep sidebar visible on scheduled task single view 2026-03-29 15:27:40 +05:30
ShadowArcanist 1daff4e23c fix(validation): add input validation for emails configuration 2026-03-29 12:13:30 +05:30
ShadowArcanist b98346f3c3 fix(validation): validate cron expressions in update backup API endpoint 2026-03-29 03:02:15 +05:30
ShadowArcanist 40420e33e3 fix(validation): add timeout validation to database backup API endpoints 2026-03-29 02:53:18 +05:30
ShadowArcanist 67f8eb929f fix(validation): add input validation for database backup timeout 2026-03-29 02:48:32 +05:30
ShadowArcanist 791aa10b3f fix(validation): use int|string for Livewire numeric properties and remove nullable from API rules 2026-03-29 02:24:36 +05:30
ShadowArcanist 1ebba7da3a fix(validation): add input validation for sentinel configuration 2026-03-29 01:56:06 +05:30
ShadowArcanist 15a98b52c9 fix(validation): add input validation for server_disk_usage_check_frequency on API 2026-03-29 01:24:08 +05:30
ShadowArcanist c52a199120 fix(validation): add input validation for server advanced settings page 2026-03-29 01:14:08 +05:30
ShadowArcanist 73258c317e fix(validation): add URL validation for proxy redirect input 2026-03-29 00:34:32 +05:30
ShadowArcanist 105b4a9267 fix(validation): add input validation for port exposes and port mappings fields 2026-03-28 23:23:25 +05:30
ShadowArcanist 407b6df744 fix(validation): add IP validation for custom DNS servers input 2026-03-28 22:30:17 +05:30
Andras Bacsai 72118d61f9 feat(databases): add public port timeout configuration
Add support for configuring public port timeout on databases via API:
- Add public_port_timeout field to schema documentation with 3600s default
- Add validation rules (integer|nullable|min:1)
- Update all database type configurations to support the field
- Add comprehensive test coverage for the feature
2026-03-28 17:08:02 +01:00
ShadowArcanist 6197558a38 fix(validation): add input validation for resource limit fields 2026-03-28 21:08:48 +05:30
Andras BacsaiandGitHub 3b2e6e11f1 refactor: use random_int() for email change verification codes (#9226) 2026-03-28 15:18:00 +01:00
Andras BacsaiandGitHub 377ce24b6d Add URL validation for notification webhook fields (#9224) 2026-03-28 14:39:27 +01:00
Andras Bacsai 0b8c75f8ed fix(webhooks): add validation to block unsafe webhook URLs
Prevent server-side request forgery (SSRF) attacks by validating webhook URLs before sending requests. Blocks loopback addresses, cloud metadata endpoints, and localhost URLs.

- Add SafeWebhookUrl rule validation in SendWebhookJob.handle()
- Log warning when unsafe URLs are rejected
- Add comprehensive unit tests covering valid and invalid URL scenarios
2026-03-28 14:23:08 +01:00
Andras BacsaiandGitHub 91ab0b38d6 refactor: move admin route into middleware group (#9225) 2026-03-28 14:18:16 +01:00
Andras Bacsai ad694275b0 Merge remote-tracking branch 'origin/next' into fix/harden-getlogs-livewire-properties 2026-03-28 14:10:15 +01:00
ShadowArcanist 886d01405f feat(applications): add configurable restart loop limit 2026-03-28 17:48:10 +05:30
Andras Bacsai 67a4fcc2ab fix: add mass assignment protection to models
Replace $guarded = [] with explicit $fillable whitelists across all
models. Update controllers to use request->only($allowedFields) when
assigning request data. Switch Livewire components to forceFill() for
explicit mass assignment. Add integration tests for mass assignment
protection.
2026-03-28 12:32:57 +01:00
Andras BacsaiandClaude Opus 4.6 e36622fdfb refactor: scope server and project queries to current team
Ensure Server and Project lookups in Livewire components and API
controllers use team-scoped queries (ownedByCurrentTeam / whereTeamId)
instead of unscoped find/where calls. This enforces consistent
multi-tenant isolation across all user-facing code paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 12:29:08 +01:00
Andras BacsaiandClaude Opus 4.6 3d1b9f53a0 fix: add validation and escaping for Docker network names
Add strict validation for Docker network names using a regex pattern
that matches Docker's naming rules (alphanumeric start, followed by
alphanumeric, dots, hyphens, underscores).

Changes:
- Add DOCKER_NETWORK_PATTERN to ValidationPatterns with helper methods
- Validate network field in Destination creation and update Livewire components
- Add setNetworkAttribute mutator on StandaloneDocker and SwarmDocker models
- Apply escapeshellarg() to all network field usages in shell commands across
  ApplicationDeploymentJob, DatabaseBackupJob, StartService, Init command,
  proxy helpers, and Destination/Show
- Add comprehensive tests for pattern validation and model mutator

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 12:28:59 +01:00
Andras BacsaiandClaude Opus 4.6 48ba4ece3c fix: harden GetLogs Livewire component with locked properties and input validation
Add #[Locked] attributes to security-sensitive properties (resource, servicesubtype,
server, container) to prevent client-side modification via Livewire wire protocol.
Add container name validation using ValidationPatterns::isValidContainerName() and
server ownership authorization via Server::ownedByCurrentTeam() in both getLogs()
and downloadAllLogs() methods.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 12:28:54 +01:00
Andras BacsaiandClaude Opus 4.6 c9922c30c2 fix: add input validation for install/build/start command fields
Add shellSafeCommandRules() validation to install_command, build_command,
and start_command fields in both the Livewire UI and REST API layers.
These fields previously accepted arbitrary strings without validation,
unlike other shell-adjacent fields which already used this pattern.

Also adds comprehensive tests for rejection of dangerous input and
acceptance of legitimate build commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 12:28:29 +01:00