coolify/app/Livewire/Project
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
..
Application refactor(validation): tokenize shell-safe command pattern 2026-04-20 22:00:41 +02:00
Database fix(database): tighten Postgres init script filename handling 2026-04-20 21:26:34 +02:00
New refactor: scope destination and resource lookups by current team 2026-04-19 11:55:12 +02:00
Resource refactor: scope destination and resource lookups by current team 2026-04-19 11:55:12 +02:00
Service refactor(volumes): validate input and escape shell args 2026-04-20 11:27:10 +02:00
Shared refactor(volumes): validate input and escape shell args 2026-04-20 11:27:10 +02:00
AddEmpty.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
CloneMe.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
DeleteEnvironment.php refactor(redirect): replace redirect calls with redirectRoute helper for consistency 2025-12-26 13:29:59 +01:00
DeleteProject.php refactor: scope server and project queries to current team 2026-03-28 12:29:08 +01:00
Edit.php feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00
EnvironmentEdit.php refactor(redirect): replace redirect calls with redirectRoute helper for consistency 2025-12-26 13:29:59 +01:00
Index.php refactor: replace queries with cached versions for performance improvements 2025-12-08 13:39:33 +01:00
Show.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00