[scan] Security attack vector mapping #26
Labels
No labels
P1
P2
P3
PHP
agent-ready
bug
clotho
discovery
docs
epic
refactor
review
security
testing
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
-
Dependencies
No dependencies set.
Reference: core/php-admin#26
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Map every external input entry point: function, file:line, input source, flows into, validation, attack vector.
Implementation Plan (Spark)
Security Attack Vector Map
Date: 2026-03-23
Scope:
CODEX.mdwas not present anywhere under/workspace, so this review usedAGENTS.md,CLAUDE.md, and the code itself.1. Route and Auth Boundary Map
Primary registration surface:
src/Website/Hub/Boot.php:93-98registers the Hub routes with a domain,/hubprefix, andhub.route name prefix, but no package-local middleware.src/Website/Hub/Routes/admin.php:15-74defines the GET entry points for the admin panel.Routeable components that rely on outer middleware only:
/hub/promptssrc/Website/Hub/Routes/admin.php:49->src/Website/Hub/View/Modal/Admin/PromptManager.php:69-75Prompt::query()/findOrFail()/create()/delete()atPromptManager.php:80-87,PromptManager.php:195-259,PromptManager.php:266-286./hub/consolesrc/Website/Hub/Routes/admin.php:27->src/Website/Hub/View/Modal/Admin/Console.php:13-46/hub/content-manager/{workspace}/{view?}src/Website/Hub/Routes/admin.php:19-20->src/Website/Hub/View/Modal/Admin/ContentManager.php:84-105/hub/content-editor/{workspace}/new/{contentType?}and/hub/content-editor/{workspace}/{id}src/Website/Hub/Routes/admin.php:21-23->src/Website/Hub/View/Modal/Admin/ContentEditor.php:135-188/hub/services/{service?}/{tab?}src/Website/Hub/Routes/admin.php:68-71->src/Website/Hub/View/Modal/Admin/ServicesAdmin.php:74-95/hub/account/usagesrc/Website/Hub/Routes/admin.php:32->src/Website/Hub/View/Modal/Admin/AccountUsage.php:78-80AccountUsage.php:209-270./hub/workspacessrc/Website/Hub/Routes/admin.php:25->src/Website/Hub/View/Modal/Admin/Sites.php:42-46WorkspaceService;addService()also creates globalFeatureandPackagerows atSites.php:212-269.Routeable components that do self-gate:
src/Website/Hub/View/Modal/Admin/Platform.php:37-42src/Website/Hub/View/Modal/Admin/PlatformUser.php:65-72src/Website/Hub/View/Modal/Admin/ServiceManager.php:57-61src/Website/Hub/View/Modal/Admin/WaitlistManager.php:45-49src/Website/Hub/View/Modal/Admin/Honeypot.php:28-32src/Website/Hub/View/Modal/Admin/Databases.php:38-42src/Website/Hub/View/Modal/Admin/Deployments.php:21-24,src/Website/Hub/View/Modal/Admin/Deployments.php:262-266src/Website/Hub/View/Modal/Admin/Entitlement/Dashboard.php:83-87src/Website/Hub/View/Modal/Admin/Entitlement/FeatureManager.php:25-29src/Website/Hub/View/Modal/Admin/Entitlement/PackageManager.php:26-30Discovery amplifiers:
src/Website/Hub/View/Blade/admin/layouts/app.blade.php:95-98.src/Search/Providers/AdminPageSearchProvider.php:75-129.2. CSRF-Relevant Admin Mutation Surface
Livewire entry points are mounted from the admin layout and header:
src/Website/Hub/View/Blade/admin/layouts/app.blade.php:10exposes the CSRF token in the page.src/Website/Hub/View/Blade/admin/components/header.blade.php:24mounts the workspace switcher.src/Website/Hub/View/Blade/admin/layouts/app.blade.php:95-98mounts global search.These are the state-changing methods worth testing for CSRF and replay because they are exposed as public Livewire actions. This map does not assert that Livewire's default token checks are absent; it identifies the methods with the highest impact if those checks are bypassed or weakened.
High-value public mutation methods exposed as Livewire actions:
Platformsrc/Website/Hub/View/Modal/Admin/Platform.php:60-98PlatformUsersrc/Website/Hub/View/Modal/Admin/PlatformUser.php:84-149,src/Website/Hub/View/Modal/Admin/PlatformUser.php:250-399,src/Website/Hub/View/Modal/Admin/PlatformUser.php:462-530,src/Website/Hub/View/Modal/Admin/PlatformUser.php:604-707PromptManagersrc/Website/Hub/View/Modal/Admin/PromptManager.php:211-292ServiceManagersrc/Website/Hub/View/Modal/Admin/ServiceManager.php:110-150WaitlistManagersrc/Website/Hub/View/Modal/Admin/WaitlistManager.php:71-208Entitlement\Dashboardsrc/Website/Hub/View/Modal/Admin/Entitlement/Dashboard.php:171-271,src/Website/Hub/View/Modal/Admin/Entitlement/Dashboard.php:358-419Entitlement\FeatureManagersrc/Website/Hub/View/Modal/Admin/Entitlement/FeatureManager.php:100-148Entitlement\PackageManagersrc/Website/Hub/View/Modal/Admin/Entitlement/PackageManager.php:110-202Databasessrc/Website/Hub/View/Modal/Admin/Databases.php:133-207ContentEditorsrc/Website/Hub/View/Modal/Admin/ContentEditor.php:297-328,src/Website/Hub/View/Modal/Admin/ContentEditor.php:379-409,src/Website/Hub/View/Modal/Admin/ContentEditor.php:437-562,src/Website/Hub/View/Modal/Admin/ContentEditor.php:666-779AccountUsagesrc/Website/Hub/View/Modal/Admin/AccountUsage.php:209-270Honeypotsrc/Website/Hub/View/Modal/Admin/Honeypot.php:50-603. Livewire Injection and Tampering Map
src/Website/Hub/View/Blade/admin/global-search.blade.php:78->src/Website/Hub/View/Modal/Admin/GlobalSearch.php:140-148->src/Website/Hub/View/Blade/admin/global-search.blade.php:28array $resultfrom the Livewire call payloaddispatch('navigate-to-url', url: $result['url'])followed byLivewire.navigate(...)src/Website/Hub/View/Blade/admin/workspace-switcher.blade.php:35->src/Website/Hub/View/Modal/Admin/WorkspaceSwitcher.php:52-69string $slugWorkspaceService::setCurrent($slug), event dispatch, redirect to capturedreturnUrlWorkspaceService::setCurrent().src/Website/Hub/View/Modal/Admin/ContentEditor.php:135-146workspace,id, andcontentTypeparametersWorkspace::where('slug', $workspace)->first(),loadContent((int) $id)src/Website/Hub/View/Modal/Admin/ContentEditor.php:651-699selectedPromptId,promptName,promptVariablesPrompt::find(),Prompt::where('name', ...)->first(), AI executionsrc/Website/Hub/View/Modal/Admin/ContentManager.php:84-105workspaceslugWorkspace::where('slug', $workspace)->first(),setCurrent($workspace)workspace-changedevent.src/Website/Hub/View/Modal/Admin/ContentManager.php:434-487selectedItemId,logIdContentItem::find($selectedItemId),ContentWebhookLog::find($logId)src/Website/Hub/View/Modal/Admin/ServicesAdmin.php:263-285websiteId,pathpageDetailsWebsiteId,pageDetailsPath,selectedWebsiteIdsrc/Website/Hub/View/Modal/Admin/PlatformUser.php:442-493,src/Website/Hub/View/Modal/Admin/PlatformUser.php:580-670selectedWorkspaceId,selectedPackageCode,entitlementWorkspaceId,entitlementFeatureCode,entitlementLimit,entitlementExpiresAtprovisionPackage()accepts an arbitrary workspace ID without the ownership check used elsewhere in the component.src/Website/Hub/View/Modal/Admin/WpConnectorSettings.php:28-124Workspace $workspace, then mutable public properties4. Unscoped Query Map
Concrete unscoped reads and writes in admin views/components:
src/Website/Hub/View/Modal/Admin/ContentEditor.php:141-156Workspace::where('slug', $workspace)->first()andContentItem::with(...)->findOrFail($id)workspace_id.src/Website/Hub/View/Modal/Admin/ContentEditor.php:252ContentMedia::find($this->featuredMediaId)src/Website/Hub/View/Modal/Admin/ContentEditor.php:439-445ContentRevision::findOrFail($revisionId)content_item_idonly after retrieval.src/Website/Hub/View/Modal/Admin/ContentEditor.php:500-502ContentItem::findOrFail($this->contentId)src/Website/Hub/View/Modal/Admin/ContentEditor.php:570-580,src/Website/Hub/View/Modal/Admin/ContentEditor.php:655-690Promptqueries inside a workspace editorsrc/Website/Hub/View/Modal/Admin/ContentManager.php:89-97,src/Website/Hub/View/Modal/Admin/ContentManager.php:100-105Workspace::where('slug', $workspace)->first()src/Website/Hub/View/Modal/Admin/ContentManager.php:395-396ContentItem::find($this->selectedItemId)forWorkspace(...)scoping used elsewhere in the component.src/Website/Hub/View/Modal/Admin/ContentManager.php:483-486ContentWebhookLog::find($logId)src/Website/Hub/View/Modal/Admin/ServicesAdmin.php:337-449,src/Website/Hub/View/Modal/Admin/ServicesAdmin.php:473-535selectedWebsiteId$this->analyticsWebsites.src/Website/Hub/View/Modal/Admin/ServicesAdmin.php:535-717AnalyticsWebsite::find($pageDetailsWebsiteId)and related event/session/visitor queriessrc/Website/Hub/View/Modal/Admin/PlatformUser.php:472-478Workspace::findOrFail($this->selectedWorkspaceId)followed by provisioningsrc/Website/Hub/View/Modal/Admin/PromptManager.php:80-87,src/Website/Hub/View/Modal/Admin/PromptManager.php:167-183,src/Website/Hub/View/Modal/Admin/PromptManager.php:195-289src/Website/Hub/View/Modal/Admin/AccountUsage.php:177-200,src/Website/Hub/View/Modal/Admin/AccountUsage.php:209-270src/Website/Hub/View/Modal/Admin/ActivityLog.php:43-48,src/Website/Hub/View/Modal/Admin/ActivityLog.php:57-62log_nameandeventvalues are read from allActivityrowsactivities()later narrows by workspace members.src/Website/Hub/View/Modal/Admin/Databases.php:43-49Workspace::where('slug', $slug)->first()5. Embedded Livewire Components Present on Most Admin Pages
These are not standalone routes in
Routes/admin.php, but they are mounted broadly and therefore expand the reachable Livewire surface:src/Website/Hub/View/Blade/admin/layouts/app.blade.php:95-98->src/Website/Hub/View/Modal/Admin/GlobalSearch.php:27-256src/Website/Hub/View/Blade/admin/components/header.blade.php:24->src/Website/Hub/View/Modal/Admin/WorkspaceSwitcher.php:11-75That means most authenticated Hub pages also expose:
GlobalSearch.php:140-148WorkspaceSwitcher.php:52-69Security Scan: Attack Vector Map completed. Details in agent log.