T05 · Unauthorized Access and Privilege Escalation
- Location
references/rum.md:180- Finding
Privacy handlers allow user-data deletion and export without demonstrated authorization
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Go observability guide, but some production-ready examples can lead agents to add unsafe telemetry and privacy endpoints unless reviewed carefully.
Review generated code before merging. Require authenticated, authorized, audited workflows for user data export/deletion; enforce consent and data minimization for analytics; avoid raw URLs or user-controlled identifiers in metrics and traces; require HTTPS and sanitized logging for profiling endpoints; and approve any multi-agent audit before running it on private repositories.
references/rum.md:180Privacy handlers allow user-data deletion and export without demonstrated authorization
references/rum.md:54Primary analytics examples transmit identifiable user and transaction data without a consent gate
references/rum.md:90Client-controlled identity headers are exported as trusted trace attributes
references/profiling.md:19Pyroscope credentials may be transmitted over plaintext HTTP and exposed in logs
references/metrics.md:39HTTP metrics example uses unbounded raw request paths as Prometheus labels
The example exposes destructive and sensitive privacy endpoints using a user-controlled path parameter (/api/users/:id/data) but shows no authentication, authorization, or ownership checks before deleting or exporting data. If implemented as shown, an attacker could request deletion or access for another user's ID, causing account-wide data loss or unauthorized disclosure across the database, analytics platform, and CDP.
GDPR and CCPA require you to let users access, export, and delete their data. Implement API endpoints that propagate these requests to all systems that hold user data — your database, your analytics platform, your CDP.
// DELETE /api/users/:id/data — GDPR Article 17 "Right to Erasure"
func (h *PrivacyHandler) HandleDataDeletion(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
userID := chi.URLParam(r, "id")
The evaluation content explicitly recommends using up to 5 parallel sub-agents for large codebase audits. In an agent skill, prescriptive delegation without user opt-in or a fallback can trigger unnecessary autonomous actions, increase data exposure across additional agent contexts, and raise cost or control risks if followed literally by an agentic system.
Recording raw request paths as metric labels without an adjacent warning is dangerous because path values are often high-cardinality and may contain personal data, tokens, or resource identifiers. In an observability skill aimed at production use, this pattern is especially risky since it encourages copy-paste deployment into monitoring pipelines where the resulting data exposure and operational instability can persist continuously.
The example instruments r.URL.Path directly as a Prometheus label value, which can create unbounded metric cardinality because each distinct path becomes a separate time series. In production this can exhaust Prometheus memory, degrade query performance, and may also expose sensitive path data if identifiers or secrets appear in URLs; the surrounding observability context makes this more dangerous because readers are likely to copy the snippet into always-on production instrumentation.
The tracing guidance explicitly encourages attaching request-scoped metadata such as user_id and order_id to errors and spans, but does not warn about privacy classification, minimization, redaction, or avoiding PII in telemetry. In an observability skill, this omission is materially risky because developers may copy these examples directly into production tracing pipelines, causing sensitive customer or tenant data to be exported, retained, and indexed across third-party telemetry systems.
The naming conventions section states metrics must use base units and gives explicit examples of preferred units, yet the later histogram example defines myapp_orders_amount_dollars, which is not a base SI-style unit and conflicts with the stated rule. This is a documentation-to-example contradiction rather than an implementation necessity.
No suspicious patterns detected.