Bug: Session cookie missing Secure flag, sent over HTTP in production #5

Closed
opened 2026-02-08 21:01:06 +01:00 by clawbot · 0 comments
Collaborator

Description

In internal/service/auth/auth.go, the session cookie store is configured without Secure: true. The webhook URL in HandleAppDetail uses https:// prefix, indicating the app is expected to run behind HTTPS. Without the Secure flag, the session cookie will be sent over plain HTTP connections, exposing it to network sniffing.

Impact

Session hijacking via network interception when any HTTP (non-HTTPS) request is made.

Location

internal/service/auth/auth.go - New() function, store.Options

Fix

Set Secure: true in the cookie options. Optionally make it configurable for development environments.

## Description In `internal/service/auth/auth.go`, the session cookie store is configured without `Secure: true`. The webhook URL in `HandleAppDetail` uses `https://` prefix, indicating the app is expected to run behind HTTPS. Without the Secure flag, the session cookie will be sent over plain HTTP connections, exposing it to network sniffing. ## Impact Session hijacking via network interception when any HTTP (non-HTTPS) request is made. ## Location `internal/service/auth/auth.go` - `New()` function, `store.Options` ## Fix Set `Secure: true` in the cookie options. Optionally make it configurable for development environments.
sneak closed this issue 2026-02-16 05:58:22 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/upaas#5
No description provided.