mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
fix(auth): limit application commands and configuration to admins and read:sensitive tokens
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
efbd64346c
commit
eb030c6a22
@@ -254,6 +254,24 @@ class Application extends BaseModel
|
||||
|
||||
protected $appends = ['server_status'];
|
||||
|
||||
/**
|
||||
* Free-form commands and configuration that can embed credentials. Only users who can
|
||||
* update the application and `read:sensitive` tokens may read them.
|
||||
*/
|
||||
public const COMMAND_AND_CONFIGURATION_ATTRIBUTES = [
|
||||
'install_command',
|
||||
'build_command',
|
||||
'start_command',
|
||||
'pre_deployment_command',
|
||||
'post_deployment_command',
|
||||
'health_check_command',
|
||||
'health_check_response_text',
|
||||
'custom_docker_run_options',
|
||||
'docker_compose_custom_start_command',
|
||||
'docker_compose_custom_build_command',
|
||||
'custom_nginx_configuration',
|
||||
];
|
||||
|
||||
/**
|
||||
* Sensitive fields hidden by default in serialized output (toArray/toJson).
|
||||
* API controllers should call makeVisible([...]) for callers with the
|
||||
@@ -261,6 +279,7 @@ class Application extends BaseModel
|
||||
* job, compose generation) must makeVisible explicitly before toArray().
|
||||
*/
|
||||
protected $hidden = [
|
||||
...self::COMMAND_AND_CONFIGURATION_ATTRIBUTES,
|
||||
'http_basic_auth_password',
|
||||
'manual_webhook_secret_github',
|
||||
'manual_webhook_secret_gitlab',
|
||||
|
||||
Reference in New Issue
Block a user