Restrict expensive viewer endpoints (Refs #72)
CI / checks (push) Successful in 4m45s

This commit is contained in:
2026-10-09 16:57:22 -04:00
parent 9eb3aa84c3
commit 15fb90200a
3 changed files with 26 additions and 0 deletions
+3
View File
@@ -60,6 +60,9 @@ export function routePermission(routeId: string | null, method: string): RoutePe
if (!reading && ['/api/maintenance', '/api/plutonium', '/api/watchdog'].includes(routeId))
return 'admin';
// These reads initiate fleet file scans or spend external API quota.
if (routeId === '/api/drift' || routeId === '/api/plugins/github/release') return 'operator';
// Summaries remain visible to viewers; raw configuration, historical file
// bytes, and unfiltered diagnostics may contain runtime credentials.
if (