Skip to content

security: restrict local backend CORS and request surface #11

@ubugeeei

Description

@ubugeeei

Finding

The local backend appears to apply permissive CORS to endpoints that read local media paths and mutate render state. For a desktop app, this should be deliberately scoped to trusted origins.

Evidence

  • backend/src/main.rs applies CORS headers in shared handlers.
  • Endpoints accept path query values for video/audio/image and mutation requests for cache/progress/cancel/audio plan.

Acceptance criteria

  • Restrict allowed origins to the Electron app/dev servers or document the trust boundary explicitly.
  • Return clear errors for disallowed origins/methods.
  • Add coverage for rejected origins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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