Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions data/trust-center.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"overallTrustScore": 93,
"securityCategories": [
{
"id": "data-protection",
"label": "Data Protection",
"score": 95
},
{
"id": "authentication",
"label": "Authentication",
"score": 91
},
{
"id": "encryption",
"label": "Encryption",
"score": 96
},
{
"id": "access-control",
"label": "Access Control",
"score": 89
},
{
"id": "monitoring",
"label": "Monitoring",
"score": 92
}
],
"auditResults": {
"overallStatus": "passed",
"lastAudit": "2026-01-20",
"nextAudit": "2026-04-20",
"findings": {
"critical": 0,
"high": 0,
"medium": 2,
"low": 5
}
},
"certifications": [
{
"name": "SOC 2 Type II",
"status": "passed",
"lastAudit": "2026-01-20"
},
{
"name": "ISO 27001",
"status": "in-progress",
"lastAudit": "2025-12-05"
},
{
"name": "GDPR Readiness",
"status": "passed",
"lastAudit": "2026-01-08"
},
{
"name": "CCPA Compliance",
"status": "passed",
"lastAudit": "2025-11-30"
}
],
"incidentHistory": [
{
"date": "2026-02-02",
"severity": "low",
"description": "Automated rate limiter flagged abnormal signup bursts from a single ASN.",
"status": "resolved"
},
{
"date": "2026-01-27",
"severity": "medium",
"description": "Temporary API token validation mismatch impacted a subset of requests.",
"status": "resolved"
},
{
"date": "2026-01-19",
"severity": "high",
"description": "Credential stuffing attempt blocked by adaptive challenge policy.",
"status": "resolved"
},
{
"date": "2026-01-11",
"severity": "low",
"description": "False-positive malware signature quarantined one uploaded artifact.",
"status": "resolved"
},
{
"date": "2026-01-06",
"severity": "medium",
"description": "Suspicious session replay pattern detected during anomaly monitoring.",
"status": "investigating"
}
]
}
58 changes: 58 additions & 0 deletions src/app/api/trust/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { promises as fs } from "fs";
import path from "path";
import { NextResponse } from "next/server";
import type { TrustCenterData } from "@/lib/trustCenter";

export const runtime = "nodejs";

const TRUST_CENTER_PATH = path.join(process.cwd(), "data", "trust-center.json");

async function readTrustCenterData(): Promise<TrustCenterData | null> {
try {
const raw = await fs.readFile(TRUST_CENTER_PATH, "utf-8");
const parsed = JSON.parse(raw) as TrustCenterData;

if (
typeof parsed?.overallTrustScore !== "number" ||
!Array.isArray(parsed.securityCategories) ||
!Array.isArray(parsed.certifications) ||
!Array.isArray(parsed.incidentHistory)
) {
return null;
}

return parsed;
} catch {
return null;
}
}

export async function GET() {
const data = await readTrustCenterData();

if (!data) {
return NextResponse.json(
{
error: "Trust center data unavailable",
},
{
status: 500,
}
);
}

return NextResponse.json(
{
overallTrustScore: data.overallTrustScore,
auditResults: data.auditResults,
securityCategories: data.securityCategories,
certifications: data.certifications,
incidentHistory: data.incidentHistory,
},
{
headers: {
"Cache-Control": "no-store",
},
}
);
}
3 changes: 3 additions & 0 deletions src/app/trust-center/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* eslint-disable react/no-unescaped-entities */
export { metadata } from "@/app/trust/page";
export { default } from "@/app/trust/page";
Loading
Loading