Add compliance pages, sitemap/robots, forgot-password flow, security headers, and route protections#119
Draft
support371 wants to merge 1 commit into
Draft
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
Reviewer's GuideAdds new compliance-focused public pages, security headers, sitemap/robots endpoints, a non-enumerating forgot-password flow with rate limiting and audit logging, and extends proxy route protections and tests to cover these behaviors. Sequence diagram for the new forgot-password flowsequenceDiagram
actor User
participant ForgotPasswordPage
participant ForgotPasswordAPI as api_auth_forgot_password_POST
participant RateLimiter as rateLimit
participant DB as db_user
participant Audit as emitAuditLog
User->>ForgotPasswordPage: submit()
ForgotPasswordPage->>ForgotPasswordAPI: fetch /api/auth/forgot-password
ForgotPasswordAPI->>ForgotPasswordAPI: getRequestContext
ForgotPasswordAPI->>RateLimiter: rateLimit(ipAddress, key, windowMs, max)
alt [rate limit exceeded]
RateLimiter-->>ForgotPasswordAPI: limit.ok = false
ForgotPasswordAPI->>Audit: emitAuditLog(flow: forgot_password, reason: rate_limited)
ForgotPasswordAPI-->>ForgotPasswordPage: rateLimitedResponse(429)
ForgotPasswordPage-->>User: [Too many requests message]
else [within limit]
ForgotPasswordAPI->>ForgotPasswordAPI: request.json()
ForgotPasswordAPI->>ForgotPasswordAPI: forgotPasswordSchema.safeParse
alt [invalid request]
ForgotPasswordAPI-->>ForgotPasswordPage: NextResponse.json(error, 400)
ForgotPasswordPage-->>User: [Error message]
else [valid request]
ForgotPasswordAPI->>DB: db.user.findUnique(email)
DB-->>ForgotPasswordAPI: user | null
ForgotPasswordAPI->>Audit: emitAuditLog(flow: forgot_password, accepted)
ForgotPasswordAPI-->>ForgotPasswordPage: NextResponse.json(SAFE_RESPONSE)
ForgotPasswordPage-->>User: [Non-enumerating success message]
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
gem-enterprise | 7a240ab | Jun 28 2026, 01:57 PM |
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.
Motivation
cookie-policy,trust-center,sitemap.xml, androbots.txtendpoints for compliance and SEO.Description
next.config.js, includingStrict-Transport-Security,Permissions-Policy, and aContent-Security-Policy-Report-Onlyentry, and added a redirect from/blogto/resources.src/app/api/auth/forgot-password/route.tswhich returns a safe, non-enumerating response.src/app/cookie-policy/page.tsx,src/app/trust-center/page.tsx,src/app/forgot-password/page.tsx,src/app/robots.txt/route.ts, andsrc/app/sitemap.xml/route.ts.src/components/Footer.tsx, addedcookie-policyandtrust-centertosrc/lib/siteRoutes.ts, removed the legacy redirect that previously forwarded/trust-center, and extendedsrc/proxy.tsto expand protected and admin route prefixes while marking the new compliance pages as public.src/__tests__/production-readiness.test.tsto assert presence of key pages, proxy protections, and footer linkage.Testing
vitestincluding the newproduction-readiness.test.ts, and all tests completed successfully.Codex Task
Summary by Sourcery
Introduce compliance-focused public pages, secure account recovery, and stricter security/SEO defaults.
New Features:
Enhancements:
Tests: