Skip to content

Add authentication and access controls to log viewer endpoints #835

Description

@coderabbitai

The new log viewer endpoints introduced in PR #833 currently expose sensitive webhook processing information without any authentication or access controls.

Affected endpoints:

  • GET /logs (HTML page)
  • GET /logs/api/entries (historical log entries)
  • GET /logs/api/export (log export)
  • GET /logs/api/pr-flow/{hook_id} (PR flow visualization)
  • GET /logs/api/workflow-steps/{hook_id} (workflow steps)
  • WebSocket /logs/ws (real-time streaming)

Security concerns:

  • Endpoints expose repository names, user information, and system behavior
  • No authentication mechanism protects access
  • Potential for unauthorized access to sensitive operational data

Requirements:

  • Implement authentication mechanism (JWT tokens, API keys, etc.)
  • Add authorization controls to restrict access to admin users
  • Ensure HTTPS enforcement
  • Consider rate limiting and CORS restrictions
  • Add audit logging for access to these endpoints
  • Sanitize sensitive information in responses

References:

Requested by: @myakove

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions