ownerScoped fails open on SiteStatus error #665

Open
opened 2026-08-14 14:20:39 +00:00 by the.auditor · 0 comments
Owner

sitesHandler.ownerScoped (internal/httpapi/sites.go) returns true (access granted) when h.sites.Status() errors. PR #661 introduces docker-dependent error paths in Service.Status (reporter errors other than container-not-found propagate), so in standalone mode a docker daemon outage causes Status() to fail and ownerScoped to grant access. The /deployments endpoint then returns deployment metadata (including commit SHAs) without the owner check.

Recommend ownerScoped fail closed when status cannot be determined, and/or degrade gracefully in Service.Status (log reporter errors and leave container_status unset).

Ref: #661

`sitesHandler.ownerScoped` (internal/httpapi/sites.go) returns `true` (access granted) when `h.sites.Status()` errors. PR #661 introduces docker-dependent error paths in `Service.Status` (reporter errors other than container-not-found propagate), so in standalone mode a docker daemon outage causes `Status()` to fail and `ownerScoped` to grant access. The `/deployments` endpoint then returns deployment metadata (including commit SHAs) without the owner check. Recommend `ownerScoped` fail closed when status cannot be determined, and/or degrade gracefully in `Service.Status` (log reporter errors and leave `container_status` unset). Ref: https://git.lan.thwap.org/thwap/thwap-pagesd/pulls/661
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/thwap-pagesd#665
No description provided.