fix(validation): allow quoted shell args in docker options

Permit single-quoted arguments in SHELL_SAFE_COMMAND_PATTERN while
keeping dangerous metacharacters blocked, and add security test cases
for quoted --entrypoint and --hostname values.
This commit is contained in:
Andras Bacsai committed 2026-04-08 14:21:49 +02:00
1 parent c360dbdaea
commit e36ae82d9d
4 files changed
+66 -32

No files matched your search

@@ -512,6 +512,9 @@ describe('custom_docker_run_options validation', function () {
'--cap-add=NET_ADMIN --cap-add=NET_RAW',
'--privileged --init',
'--memory=512m --cpus=2',
'--entrypoint "sh -c \'npm start\'"',
'--entrypoint "sh -c \'php artisan schedule:work\'"',
'--hostname "my-host"',
]);
});