PST-072: /metrics is served to anyone when enabled without a token #801
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#801
Loading…
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?
Found in the security audit of 2026-10-10 (
SECURITY-AUDIT-2026-10-10.md), run againstmainatc30851bfrom 8 to 10 October 2026, as PST-072. Severity: Informational.The text below is the audit's entry, unchanged apart from links to the other issues it names. The finding was produced by automated review and checked by a second automated pass; re-check it before acting on it.
src/postulo/core/views_metrics.py(24-30)Who can do it, and what they need. Any stranger, on an instance where the operator set POSTULO_METRICS_ENABLED=1 without a token.
How it works.
Impact. Instance-level counts (how many people and records live here) are readable by anyone; no per-person data. Documented as deliberate on the Logs page, so informational.
Verification (verdict: confirmed; severity after verification: Informational). No correction to file, line or impact. Precondition is a double operator opt-in (POSTULO_METRICS_ENABLED on and no POSTULO_METRICS_TOKEN) made with the warning on the Logs page in view; the behaviour is pinned by tests/security/test_metrics.py and the output is verified to name nobody. Per-address throttling (throttle.endpoint) and no-store apply.
Suggested remediation. Require a token whenever the endpoint is enabled (refuse with 503 and a log line, as /logs does), or at least drop the account count from the open variant.
Fixed in
16a2eae5bon main.