Commit graph

1349 commits

Author SHA1 Message Date
068460d853 feat(onboarding): skip boarding wizard for new users
Customers land directly on the dashboard instead of the setup wizard,
which shows a misleading localhost vs remote server warning that
conflicts with MapleDeploy's single-VM model.
2026-03-14 00:17:17 -04:00
Andras Bacsai
0991f8e2ca fix(application): clarify deployment type precedence logic
- Prioritize real private keys (id > 0) first
- Check source second before falling back to zero key
- Remove isDev() check that was restricting zero key behavior in dev
- Remove exception throw, use 'other' as safe fallback
- Expand test coverage to validate all precedence scenarios
2026-03-12 13:48:30 +01:00
Andras Bacsai
4f1fe824e5
fix(git-import): ensure ssh key is used for fetch, submodule, and lfs operations (#8933) 2026-03-12 13:35:26 +01:00
Andras Bacsai
92c8ad449f feat(git-import): support custom ssh command for fetch, submodule, and lfs
Allow passing a custom GIT_SSH_COMMAND to setGitImportSettings() so that git fetch,
submodule update, and lfs pull use the same SSH authentication as the initial clone.
This is required for git sources like GitLab that use custom ports and identity files.

Also remove unnecessary SSH retry event tracking and add test coverage.
2026-03-12 13:32:43 +01:00
Andras Bacsai
7cfc6746c7 fix(parsers): resolve shared variables in compose environment
Extract shared variable resolution logic into a reusable helper function
`resolveSharedEnvironmentVariables()` and apply it in applicationParser and
serviceParser to ensure patterns like {{environment.VAR}}, {{project.VAR}},
and {{team.VAR}} are properly resolved in the compose environment section.

Without this, unresolved {{...}} strings would take precedence over resolved
values from the .env file (env_file:) in docker-compose configurations.
2026-03-12 13:23:13 +01:00
Andras Bacsai
e52a49b5e9 feat(server): add server metadata collection and display
Add ability to gather and display server system information including OS, architecture, kernel version, CPU count, memory, and uptime. Includes:
- New gatherServerMetadata() method to collect system details via remote commands
- New refreshServerMetadata() Livewire action with authorization and error handling
- Server Details UI section showing collected metadata with refresh capability
- Database migration to add server_metadata JSON column
- Comprehensive test suite for metadata collection and persistence
2026-03-11 16:21:05 +01:00
Andras Bacsai
b2135bb4fa feat(gitlab): add GitLab source integration with SSH and HTTP basic auth
Add full GitLab application source support for git operations:
- Implement SSH-based authentication using private keys with configurable ports
- Support HTTP basic auth for HTTPS GitLab URLs (with or without deploy keys)
- Handle private key setup and SSH command configuration in both Docker and local modes
- Support merge request checkouts for GitLab with SSH authentication

Improvements to credential handling:
- URL-encode GitHub access tokens to handle special characters properly
- Update log sanitization to redact passwords from HTTPS/HTTP URLs
- Extend convertGitUrl() type hints to support GitlabApp sources

Add test coverage and seed data:
- New GitlabSourceCommandsTest with tests for private key and public repo scenarios
- Test for HTTPS basic auth password sanitization in logs
- Seed data for GitLab deploy key and public example applications
2026-03-11 15:30:46 +01:00
Andras Bacsai
d174724bf6 Merge branch 'ghsa-mw5w-2vvh-mgf4-investigation' 2026-03-10 22:22:51 +01:00
Andras Bacsai
a1c30cb0e7 fix(git-ref-validation): prevent command injection via git references
Add validateGitRef() helper function that uses an allowlist approach to prevent
OS command injection through git commit SHAs, branch names, and tags. Only allows
alphanumeric characters, dots, hyphens, underscores, and slashes.

Changes include:
- Add validateGitRef() helper in bootstrap/helpers/shared.php
- Apply validation in Rollback component when accepting rollback commit
- Add regex validation to git commit SHA fields in Livewire components
- Apply regex validation to API rules for git_commit_sha
- Use escapeshellarg() in git log and git checkout commands
- Add comprehensive unit tests covering injection payloads

Addresses GHSA-mw5w-2vvh-mgf4
2026-03-10 22:22:48 +01:00
Andras Bacsai
096d4369e5 fix(sentinel): add token validation to prevent command injection
Add validation to ensure sentinel tokens contain only safe characters
(alphanumeric, dots, hyphens, underscores, plus, forward slash, equals),
preventing OS command injection vulnerabilities when tokens are
interpolated into shell commands.

- Add ServerSetting::isValidSentinelToken() validation method
- Validate tokens in StartSentinel action and metrics queries
- Improve shell argument escaping with escapeshellarg()
- Add comprehensive test coverage for token validation
2026-03-10 22:19:19 +01:00
Andras Bacsai
4615cfd007 Merge remote-tracking branch 'origin/next' into fix/configurable-proxy-timeout 2026-03-06 08:04:07 +01:00
Andras Bacsai
d3b8d70f08 fix(subscription): harden quantity updates and proxy trust behavior
Centralize min/max server limits in Stripe quantity updates and wire them into
Livewire subscription actions with price preview/update handling.

Also improve host/proxy middleware behavior by trusting loopback hosts when FQDN
is set and auto-enabling secure session cookies for HTTPS requests behind
proxies when session.secure is unset.

Includes feature tests for loopback trust and secure cookie auto-detection.
2026-03-03 12:28:16 +01:00
Andras Bacsai
09b169a222 Merge remote-tracking branch 'origin/next' into subscription-refunds-cancellation 2026-03-03 11:52:58 +01:00
Andras Bacsai
839635e9e8 chore: prepare for PR 2026-03-03 11:51:38 +01:00
Andras Bacsai
db6229f815 Merge remote-tracking branch 'origin/next' into subscription-refunds-cancellation 2026-03-03 10:40:30 +01:00
Andras Bacsai
7ae76ebc79 test(factories): add missing model factories for app test suite
Enable `HasFactory` on `Environment`, `Project`, `ScheduledTask`, and
`StandaloneDocker`, and add dedicated factories for related models to
stabilize feature/unit tests.

Also bump `visus/cuid2` to `^6.0` and refresh `composer.lock` with the
resulting dependency updates.
2026-03-03 09:50:05 +01:00
Andras Bacsai
e4fae68f0e docs(application): add comments explaining commit selection logic for rollback support
Add clarifying comments to the setGitImportSettings method explaining how the
commit selection works, including the fallback to git_commit_sha and that invalid
refs will cause failures on the remote server. This documents the behavior
introduced for proper rollback commit handling.

Also remove an extra blank line for minor code cleanup.
2026-03-03 08:54:58 +01:00
Andras Bacsai
862ab607b7 Merge remote-tracking branch 'origin/next' into fix/rollback-uses-correct-commit 2026-03-02 12:53:14 +01:00
Andras Bacsai
1234463fca feat(models): add is_required to EnvironmentVariable fillable array
Add is_required field to the EnvironmentVariable model's fillable
array to allow mass assignment. Include comprehensive tests to verify
all fillable fields are properly configured for mass assignment.
2026-03-02 12:34:30 +01:00
Andras Bacsai
43412a1a2a Merge remote-tracking branch 'origin/next' into subscription-refunds-cancellation 2026-03-01 14:39:34 +01:00
Andras Bacsai
d9e39ba211 Merge remote-tracking branch 'origin/next' into env-var-descriptions 2026-02-28 00:09:54 +01:00
Andras Bacsai
a565fc3b36 fix(rollback): escape commit SHA to prevent shell injection
Properly escape commit SHA using escapeshellarg() before passing it
to shell commands. Add comprehensive tests for git commit rollback
scenarios including shallow clone, fallback behavior, and HEAD handling.
2026-02-27 23:26:31 +01:00
Andras Bacsai
530037c213 Merge remote-tracking branch 'origin/next' into fix/rollback-uses-correct-commit 2026-02-27 23:24:08 +01:00
Brendan G. Lim
30c1d9bbd0 feat: add configurable timeout for public database TCP proxy
Adds a per-database 'Proxy Timeout' setting for publicly exposed databases.
The nginx stream proxy_timeout can now be configured in the UI, defaulting
to 3600s (1 hour) instead of nginx's 10min default. Set to 0 for no timeout.

Fixes #7743
2026-02-26 21:12:58 -08:00
Andras Bacsai
8f2800a9e5 chore: prepare for PR 2026-02-26 18:22:03 +01:00
Andras Bacsai
2b7e2ebafb chore: prepare for PR 2026-02-26 16:27:02 +01:00
Andras Bacsai
c93296e9a6
feat(healthcheck): add command-based health check support (#8612) 2026-02-25 12:09:59 +01:00
Andras Bacsai
fe36b70680 chore: prepare for PR 2026-02-25 12:00:24 +01:00
Andras Bacsai
521d995ea1 Merge remote-tracking branch 'origin/next' into 7765-healthcheck-investigation 2026-02-25 11:57:58 +01:00
Andras Bacsai
8e2f0836da chore: prepare for PR 2026-02-25 11:52:18 +01:00
Aditya Tripathi
036f565785
Merge branch 'next' into feat/healthcheck-cmd 2026-02-24 22:22:02 +05:30
Tjeerd Smid
1935403053 fix: application rollback uses correct commit sha
- setGitImportSettings() now accepts optional $commit parameter
 - Uses passed commit over application's git_commit_sha (typically HEAD)
 - Fixes rollback deploying latest instead of selected commit
 - Also fixes shallow clone "bad object" error on rollback

Fixes #8445
2026-02-23 20:13:07 +01:00
Andras Bacsai
620da191b1 chore: prepare for PR 2026-02-23 14:15:13 +01:00
Andras Bacsai
133241bac1
fix(service): resolve team lookup via service relationship (#8559) 2026-02-23 13:24:01 +01:00
Andras Bacsai
61a54afe2b fix(service): resolve team lookup via service relationship
Update service application/database team accessors to traverse the service relation chain and add coverage to prevent null team regressions.
2026-02-23 13:23:12 +01:00
Andras Bacsai
bf51ed905f chore: prepare for PR 2026-02-23 13:02:06 +01:00
Andras Bacsai
0c8b9b75f4
fix(traefik): respect force https in service labels (#8550) 2026-02-23 12:16:12 +01:00
Andras Bacsai
d51b26c047
Dont ignore "force https" pref when using docker compose (#8424) 2026-02-23 12:15:37 +01:00
Andras Bacsai
16e85e27e8 fix(service): always enable force https labels
Force HTTPS routing labels in parser helpers and remove per-service toggles now that the preference is no longer honored.
2026-02-23 12:14:44 +01:00
Aditya Tripathi
04283a03a0
Merge branch 'next' into feat/healthcheck-cmd 2026-02-21 06:54:29 +05:30
Andras Bacsai
ab79a51e29 fix(api): improve scheduled tasks API with auth, validation, and execution endpoints
- Add authorization checks ($this->authorize) for all read/write operations
- Use customApiValidator() instead of Validator::make() to match codebase patterns
- Add extra field rejection to prevent mass assignment
- Use Application::ownedByCurrentTeamAPI() for consistent query patterns
- Remove non-existent standalone_postgresql_id from hidden fields
- Add execution listing endpoints for both applications and services
- Add ScheduledTaskExecution OpenAPI schema
- Use $request->only() instead of $request->all() for safe updates
- Add ScheduledTaskFactory and feature tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:53:58 +01:00
Jono
35a6110252 Dont ignore "force https" pref when using docker compose 2026-02-17 15:30:49 -08:00
Ahmed
8c6c2703cc feat: expose scheduled tasks to API 2026-02-16 22:26:58 +03:00
Andras Bacsai
63a1c5c0c7 feat(openclaw): add Openclaw service with environment variables and health checks
- Implemented Openclaw service in Service.php to manage environment variables and passwords.
- Added Openclaw SVG icon for branding.
- Created openclaw.yaml for Docker Compose configuration, including necessary environment variables and volume mappings.
- Updated service-templates-latest.json and service-templates.json to include Openclaw service details and metadata.
2026-02-09 12:33:17 +01:00
peaklabs-dev
48ec6b3169
fix(database): pgvector 18 version is not parsed properly 2026-02-04 17:59:49 +01:00
peaklabs-dev
a05545c78a
feat(database): add official postgres 18 support
- postgres versions 18 and higher require a different volume mount path, so we need to adjust the path when creating them
2026-02-04 00:35:01 +01:00
Andras Bacsai
c0dadc003d fix(env): skip escaping for valid JSON in environment variables (#6160)
Prevent double-escaping of COMPOSER_AUTH and other JSON environment variables
by detecting valid JSON objects/arrays in realValue() and skipping quote
escaping entirely. This fixes broken JSON values passed to runtime services
while maintaining proper escaping for non-JSON values.

- Add JSON detection before escaping logic in EnvironmentVariable::realValue()
- JSON objects/arrays pass through unmodified, avoiding quote corruption
- Add comprehensive test coverage for JSON vs non-JSON escaping behavior
2026-01-28 10:59:00 +01:00
Andras Bacsai
95091e918f fix: optimize queries and caching for projects and environments 2026-01-16 11:51:26 +01:00
Aditya Tripathi
33d5879160
Merge branch 'next' into feat/healthcheck-cmd 2026-01-15 16:37:54 +05:30
peaklabs-dev
b44b7ac49e
fix: switch custom labels check to UTF-8
- this allows more characters then ASCII
2026-01-13 17:12:16 +01:00