coolify/app/Livewire/Project/Application
Andras Bacsai 817128c5af refactor(validation): tokenize shell-safe command pattern
Replace the flat character-class regex for SHELL_SAFE_COMMAND_PATTERN with
a token-aware alternation. The parser now recognizes explicit tokens
(`&&`, `||`, balanced single/double quotes, whitespace, and an unquoted
safe-char run) instead of a bag of characters, which lets us extend the
accepted grammar without loosening the guarantees.

New surface area, with tests:
- logical OR chaining (`make build || make clean`)
- shell globs and bang (`rm *.tmp`, `cp src/?.js dist/`, `! grep -q foo`)
- single-quoted arguments are now treated as balanced runs rather than
  rejected per-character

Preserved surface area:
- && chaining, balanced "..." and '...' quotes, the previous safe path /
  argument characters, and the existing error-path contract in
  ApplicationDeploymentJob::validateShellSafeCommand().

Also refreshes the user-facing validation messages in General.php so the
allow/deny list shown on failure matches the new grammar.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 22:00:41 +02:00
..
Deployment feat(logs): Add loading indicator to download all logs buttons 2026-01-02 12:04:17 +01:00
Preview feat(acl): Change views/backend code to able to use proper ACL's later on. Currently it is not enabled. 2025-08-26 10:27:38 +02:00
Advanced.php feat: add Docker build cache preservation toggles and development logging 2025-11-26 13:42:02 +01:00
Configuration.php fix: enable preview deployment page for deploy key applications 2026-02-23 21:08:43 +01:00
DeploymentNavbar.php feat(deployments): add log copying functionality to clipboard in dev 2025-10-02 18:34:39 +02:00
General.php refactor(validation): tokenize shell-safe command pattern 2026-04-20 22:00:41 +02:00
Heading.php Fix: Concurrent builds ignored & add deployment queue limit (#7488) 2025-12-11 11:03:02 +01:00
Previews.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
PreviewsCompose.php fix: remove {{port}} template variable and ensure ports are always appended to preview URLs 2025-12-07 21:53:47 +01:00
Rollback.php fix(git-ref-validation): prevent command injection via git references 2026-03-10 22:22:48 +01:00
Source.php fix(git-ref-validation): prevent command injection via git references 2026-03-10 22:22:48 +01:00
Swarm.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00