Add compliance pages, sitemap/robots, forgot-password flow, security headers, and route protections#115
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 GuideImplements new compliance-facing pages and machine-readable endpoints, introduces a secure forgot-password flow, strengthens security headers and routing protections, and updates navigation and production readiness tests accordingly. Sequence diagram for the new forgot-password flowsequenceDiagram
actor User
participant ForgotPasswordPage
participant ForgotPasswordAPI as POST_api_auth_forgot_password
participant RateLimiter as rateLimit
participant AuditLog as emitAuditLog
participant DB as db.user
User->>ForgotPasswordPage: Submit form (submit)
ForgotPasswordPage->>ForgotPasswordAPI: fetch /api/auth/forgot-password
ForgotPasswordAPI->>ForgotPasswordAPI: getRequestContext
ForgotPasswordAPI->>RateLimiter: rateLimit
alt [rate limited]
RateLimiter-->>ForgotPasswordAPI: limit
ForgotPasswordAPI->>AuditLog: emitAuditLog (failed_login)
ForgotPasswordAPI-->>ForgotPasswordPage: rateLimitedResponse (429)
ForgotPasswordPage-->>User: Show rate limit message
else [within limit]
ForgotPasswordAPI->>ForgotPasswordAPI: request.json
ForgotPasswordAPI->>ForgotPasswordAPI: forgotPasswordSchema.safeParse
alt [invalid request]
ForgotPasswordAPI-->>ForgotPasswordPage: NextResponse.json (400)
ForgotPasswordPage-->>User: Show generic error
else [valid request]
ForgotPasswordAPI->>DB: db.user.findUnique
DB-->>ForgotPasswordAPI: user | null
ForgotPasswordAPI->>AuditLog: emitAuditLog (password_change)
ForgotPasswordAPI-->>ForgotPasswordPage: NextResponse.json(SAFE_RESPONSE)
ForgotPasswordPage-->>User: Show 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 | 027653a | Jun 28 2026, 01:45 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 production-ready security defaults across routing and infrastructure.
New Features:
Enhancements:
Tests: