Skip to content

[HIGH] Information disclosure through metrics #7

Description

@emiperez95

Security Issue

Metrics expose sensitive information including absolute file paths, session IDs, and internal architecture details.

Exposed Data

  • Full database paths: /Users/emilianoperez/Projects/...
  • Session IDs (even truncated)
  • Agent names revealing internal logic
  • Error details with stack traces

Location

Multiple locations in prometheus_exporter.py

Fix Tasks

  1. Hash sensitive identifiers
import hashlib
def hash_session_id(session_id):
    return hashlib.sha256(session_id.encode()).hexdigest()[:8]
  1. Remove absolute paths
database_info.info({
    'database': 'agent_workflow.db',  # Not full path
    'total_invocations': str(total_invocations),
})
  1. Add metric filtering
SENSITIVE_LABELS = ['file_path', 'session_id', 'error_details']

def sanitize_metric_value(label, value):
    if label in SENSITIVE_LABELS:
        return hash_value(value)
    return value

Effort: 2 hours

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    privacyData privacy concernsvulnerabilitySecurity vulnerabilities

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions