mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 12:23:48 +00:00
fix(security): enforce team access on mutable actions
Authorize cloud provider token access, audit sensitive operations, and standardize public IDs across deployment and resource flows.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
uses(RefreshDatabase::class);
|
||||
|
||||
it('keeps mutable Livewire components behind authorization checks', function (string $path, array $requiredNeedles) {
|
||||
$source = file_get_contents(base_path($path));
|
||||
|
||||
foreach ($requiredNeedles as $needle) {
|
||||
expect($source)->toContain($needle);
|
||||
}
|
||||
})->with([
|
||||
'storage resources' => [
|
||||
'app/Livewire/Storage/Resources.php',
|
||||
['AuthorizesRequests', "authorize('update'", "authorize('view'"],
|
||||
],
|
||||
'postgres init script editor' => [
|
||||
'app/Livewire/Project/Database/InitScript.php',
|
||||
['AuthorizesRequests', "authorize('update'"],
|
||||
],
|
||||
'execute container command' => [
|
||||
'app/Livewire/Project/Shared/ExecuteContainerCommand.php',
|
||||
['AuthorizesRequests', "authorize('view'", "authorize('canAccessTerminal'"],
|
||||
],
|
||||
'terminal' => [
|
||||
'app/Livewire/Project/Shared/Terminal.php',
|
||||
['AuthorizesRequests', "authorize('view'", "authorize('canAccessTerminal'"],
|
||||
],
|
||||
]);
|
||||
Reference in New Issue
Block a user