Skip to content

security(e2e): warn at startup when --env=e2e is set - #732

Merged
lakhansamani merged 1 commit into
worktree-playground-e2efrom
security/e2e-env-startup-warning
Jul 28, 2026
Merged

security(e2e): warn at startup when --env=e2e is set#732
lakhansamani merged 1 commit into
worktree-playground-e2efrom
security/e2e-env-startup-warning

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

Summary

Stacked on #729 — depends on constants.E2EEnv, which only exists on that branch. GitHub will auto-retarget this to main once #729 merges.

  • Follow-up from the adversarial security review of test(e2e-playground): live-playground e2e suite for OIDC/SAML/SCIM/SSO/OAuth/MFA #729's --env=e2e redesign: --env takes free text with zero validation, and Env == E2EEnv silently disables SSRF protection (private/loopback-IP rejection) for the per-org SSO broker and webhook registration/delivery, and routes OAuth/SMS to fixed e2e-playground mock addresses.
  • The 13 flags this replaced (--test-allow-private-sso-hosts=true, etc.) were self-documenting as dangerous by name. A bare --env=e2e is not — it reads like an ordinary environment label and could be copy-pasted from e2e-playground/docker-compose.yml into a real deployment with no runtime signal.
  • Adds a log.Warn() at startup when Env == constants.E2EEnv, mirroring the existing AllowedOrigins wildcard warning already in cmd/root.go right above it.

Test plan

  • go build ./..., go vet ./..., gofmt -l cmd/root.go: clean.
  • go test ./cmd/...: passing (no existing test covers the sibling AllowedOrigins warning either, so no new test was added for this one-line, same-shaped conditional — matches existing convention in this function).

--env takes free text with no validation, and E2EEnv silently
disables SSRF protection for the SSO broker and webhook
registration/delivery, and routes OAuth/SMS to fixed e2e-playground
mock addresses. The old per-feature flags
(--test-allow-private-sso-hosts, etc.) were self-documenting as
dangerous by name; a bare --env=e2e is not, and could be copy-pasted
from docker-compose.yml into a real deployment with zero runtime
signal. Match the existing AllowedOrigins wildcard warning's pattern.
@lakhansamani
lakhansamani merged commit 7eaf3eb into worktree-playground-e2e Jul 28, 2026
4 checks passed
@lakhansamani
lakhansamani deleted the security/e2e-env-startup-warning branch July 28, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant