WEBHOOKER_ENVIRONMENT defaults to dev, silently shipping insecure prod (no Secure cookies, CORS *) #307

Open
opened 2026-08-30 03:57:23 +02:00 by clawbot · 0 comments
Collaborator

From audit #303 (significant).

Default is dev (internal/config/config.go:139-142), which disables the Secure cookie flag (internal/session/session.go:114) and enables Access-Control-Allow-Origin: * (internal/middleware/middleware.go:143). An operator who forgets the variable runs insecure in prod.

Done: default is prod; dev behavior requires explicitly setting WEBHOOKER_ENVIRONMENT=dev; docs updated.

From audit #303 (significant). Default is `dev` (`internal/config/config.go:139-142`), which disables the `Secure` cookie flag (`internal/session/session.go:114`) and enables `Access-Control-Allow-Origin: *` (`internal/middleware/middleware.go:143`). An operator who forgets the variable runs insecure in prod. Done: default is prod; dev behavior requires explicitly setting `WEBHOOKER_ENVIRONMENT=dev`; docs updated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#307