Production readiness: security headers, global-error boundary, JSON-LD, strict TS, CI scanning#5
Draft
Copilot wants to merge 2 commits into
Draft
Production readiness: security headers, global-error boundary, JSON-LD, strict TS, CI scanning#5Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ror, JSON-LD, strict TypeScript, CI scanning Co-authored-by: JevonThompsonx <104575457+JevonThompsonx@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Perform production readiness audit
Production readiness: security headers, global-error boundary, JSON-LD, strict TS, CI scanning
Mar 19, 2026
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.
Addresses five gaps identified in the production readiness audit: missing HTTP security headers, no root-level error boundary, absent JSON-LD structured data, incomplete TypeScript strictness, and no dependency vulnerability scanning in CI.
Security headers (
next.config.ts)Applied to all routes via
headers():Strict-Transport-Security(2yr + preload),X-Frame-Options: DENY,X-Content-Type-Options: nosniff,Referrer-Policy: strict-origin-when-cross-origin,Permissions-Policy(camera/mic/geolocation/browsing-topics off)'unsafe-inline'(required by Next.js/Tailwind) but nounsafe-eval;frame-ancestors,base-uri, andform-actionlocked to'self'Global error boundary (
src/app/global-error.tsx) — new fileNext.js requires a separate
global-error.tsxwith its own<html>/<body>wrapper to catch crashes in the root layout —error.tsxalone doesn't cover that layer. Uses inline styles since Tailwind is unavailable at this boundary; logs viauseEffect.JSON-LD structured data
Personschema (name, URL, sameAs, jobTitle, email)BlogPostingschema (headline, description, dates, author, image)Both use
.replace(/</g, "\\u003c")on the serialized JSON to prevent</script>breakout from user-entered content:TypeScript:
noUncheckedIndexedAccess(tsconfig.json,src/lib/markdown.ts)Enabled
noUncheckedIndexedAccess: true. Fixed the two surfaced errors inmarkdown.ts— regex capture groupsmatch[1]/match[2]are now null-coalesced before use.CI dependency scanning (
.github/workflows/ci.yml)Added
bun auditimmediately after install.continue-on-error: truefor initial rollout — remove once any flagged advisories are resolved.📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.