Route homepage capture to the bmdpat list (secure, same-origin)#632
Merged
Conversation
…igin)
The homepage "Get updates" form posted to /api/lead, which has no handler
in the repo (GET returns 307) and does not feed the bmdpat newsletter list
where subscribers actually live. It was a dead capture.
Replace it with a link to bmdpat's hardened, same-origin capture at
/tools/agentguard (honeypot + rate limit + validation already in place),
tagged with utm_source=agentguard47 for attribution. De-fluffed the copy to
match the list ("Field notes on running agents in production").
Security: this deliberately introduces NO cross-origin write path. No CORS
is opened on bmdpat, and no shared secret lives in this public MIT repo.
The most secure wiring is to reuse the existing same-origin endpoint, which
this does. Removed the now-unused submitLeadForm handler.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Updates the public product homepage newsletter capture to avoid a dead /api/lead POST and instead route users to the existing hardened capture flow on bmdpat.com via a same-origin click-through link (no cross-origin write path, no secrets added to this MIT repo).
Changes:
- Replace the homepage inline “Get updates” email form with a CTA link to
https://bmdpat.com/tools/agentguardincluding UTM tags. - Remove the now-unused
submitLeadFormclient-side handler previously used to POST to/api/lead.
| <p class="form-status" aria-live="polite"></p> | ||
| </form> | ||
| <div class="email-cta"> | ||
| <p class="muted">Field notes on running agents in production: what breaks, what it costs, and what actually stops a runaway agent. Only when there is something worth sending.</p> |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Draft — outward-facing change to the public product site. Do not merge without review.
What
The homepage "Get updates" form posted to
/api/lead, which has no handler in the repo (a liveGET /api/leadreturns 307) and does not feed the bmdpat newsletter list where subscribers actually live. It was a dead capture.This replaces it with a link to bmdpat's hardened, same-origin capture at
/tools/agentguard, taggedutm_source=agentguard47for attribution, with de-fluffed copy that matches the list ("Field notes on running agents in production"). Removes the now-unusedsubmitLeadFormhandler.Security (the point of the design)
This deliberately introduces no cross-origin write path:
/api/subscribe. CORS only governs whether a browser can read a response; a public POST endpoint is already reachable bycurl, so opening CORS would add attack surface (subscription-bombing, spam) without adding protection.The alternative (keep an inline form on agentguard47.com) would require either opening CORS (least secure) or a server-to-server forward with a shared secret env var provisioned on both Vercel projects. That is viable but needs secret provisioning and is a larger change; this same-origin-link approach is the maximally secure option and ships with zero secrets.
Tested
https://bmdpat.com/tools/agentguard?utm_source=agentguard47&utm_medium=site&utm_campaign=field-notes, which returns HTTP 200 live./api/leadorsubmitLeadFormreferences; no other site page carried the dead form.Tradeoff for the reviewer
This removes the inline email field in favor of a click-through to the hardened capture. That is a small conversion cost for a large security gain. If inline capture on-site is preferred, the follow-up is the server-to-server design above (needs one shared-secret env var).
🤖 Generated with Claude Code