Skip to content

Product route: No authentication/authorization on write endpoints #14

@thomasiverson

Description

@thomasiverson

Severity: Medium

Category: Security

Description

In api/src/routes/product.ts, the POST, PUT, and DELETE endpoints have no authentication or authorization checks. Per the project's auth design (@github.com emails grant admin access), write operations should be gated behind admin authorization.

Suggested Fix

Add middleware to verify authenticated user has admin privileges before allowing mutating operations on products.

Affected File

  • api/src/routes/product.ts (POST, PUT, DELETE handlers)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions