Harden authz/XSS/entitlements and restyle to Google Developers UI - #14
Merged
Conversation
Tighten Express identity, GitHub webhook ownership, Firestore report/blog rules, and public HTML escaping. Track a commented .env.example and drop MUI in favor of a DevSite-style layout. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
server/core/authz.ts). GitHub webhook POSTownerIdcomes from verified uid; GET/SSE/DELETE are uid-scoped. Firestore reports requireownerId == uid; blog publish is limited to active Pro/Team/Enterprise or superadmin (nottrialing). Telemetry IP hashing respectsTRUST_PROXY; anomaly notify requires superadmin. Unauthenticated demo surfaces only whenNODE_ENV=testandALLOW_UNAUTH_DEMO=true.public/xss-guard.jsplusCLEscapeonpublic/*.html; dashboard uses escaped output anddata-*click handlers. Client sanitizes hrefs (src/lib/sanitizeHref.ts)..env.example(no secrets);.gitignoreignores.env/.env.*with!.env.example.npm test175/175 andtsc --noEmitclean after these changes.Intentional leftovers
app/+api/+next.config.tstrees are not started bypackage.json(Express is live). Do not deploy Next/Vercel on those paths — the stream route trusts querytierandX-Forwarded-For. Cleanup is delete/quarantine, not a merge.startUserTrialstill writestrialing+ pro; Firestore now denies that combo for publish.contact_inquiriescreate is unchanged.Test plan
npm test(175) and./node_modules/.bin/tsc --noEmit.env.example→.env; confirm.envis gitignored and.env.exampleis notTRUST_PROXYunset,X-Forwarded-Fordoes not change rate-limit or telemetry identitypublic/*.htmlpages do not execute injected markup in dashboard/report fields