Repository navigation
Dev worker: email allow-list holds exact addresses as a secret, no domains - #1319
Merged
Merged
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR1319Version: 🤖 Updated on each push. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One CI day of live-tier runs produced 52 real emails in the repository owner's inbox. Cause: the dev worker's
DEV_EMAIL_ALLOWLISTvar was@nemar.org,@nemar.test. Every fixture account lives on those domains, so each fixture sign-up, approval, email change, and (before #1305) admin notice was actually delivered through Resend, and anything addressed to@nemar.orgreached that domain's catch-all, a real inbox. The@nemar.testentry bought nothing:nonProdCodeEchoAllowedalready echoes those fixtures' sign-in codes in the response, so the email was never read.Change: the var is removed from
wrangler-sccn.tomlwith a comment explaining the rule, and the allow-list becomes a dev Worker secret holding exact human addresses (the staging testers who need a real code by email). With no allow-list the delivery fence from #957 fails closed and the dev worker sends nothing, which is the safe state between this deploy and the secret being set. Production is untouched (it never had the var). AGENTS.md gains the rule in one sentence.Post-merge: set the secret with
bunx cfman wrangler --account sccn secret put DEV_EMAIL_ALLOWLIST --env dev -c wrangler-sccn.tomlfrombackend/(value: the testers' addresses, comma-separated). Any live test that turns out to assert on delivery to a fixture address is asserting on the waste this removes and should be corrected, not the fence.