SECURITY: CORS allows all origins (*) — review for CSRF implications #40
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#40
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: MEDIUM
File:
internal/middleware/middleware.golines ~120-130 (CORS method)Description
While
AllowCredentials: falseprevents cookies from being sent with cross-origin requests (good), the wildcard CORS policy still allows any website to make API calls to the upaas instance. This means:/apps/{id}/status,/apps/{id}/container-logs, etc.) are accessible from any originFor a single-user admin panel, a wildcard CORS policy is unnecessarily permissive.
Suggested Fix
Restrict CORS to same-origin only, or remove the CORS middleware entirely since this is a server-rendered app that doesn't need cross-origin API access: