Skip to content

Security: restrict df.metrics() to user-scoped data or superusers #126

Description

@pinodeca

Summary

df.metrics() queries the duroxide store directly for system-wide aggregate metrics without any RLS filtering. Unlike df.list_instances() (which filters through RLS), any user who can call df.metrics() sees total instance counts, running/completed/failed counts, and total execution/event counts across all users.

Impact

Information disclosure about other users' workflow activity patterns. While no row-level data is leaked, aggregate counts reveal system-wide usage.

Recommended Actions

Either:

  1. Restrict df.metrics() to superusers — remove it from the functions granted by df.grant_usage(), or
  2. Filter metrics to the calling user's own instances — query through RLS-filtered views instead of the duroxide store directly.

Context

  • Security review Finding 6 (severity: Low)
  • Affected component: src/monitoring.rs, function metrics()

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions