Skip to content

Commit 0b8760f

Browse files
Add TLS audit report at /tls-report (#100)
* Add TLS audit report page at /tls-report Static HTML report showing TLS certificate status for all Paseo Asset Hub peers discovered via Kademlia DHT. Includes live browser WebSocket testing, search, and filtering. - Add public/tls-report.html (self-contained report) - Add rewrite /tls-report -> /tls-report.html for clean URL - Add CSP override for report page (Google Fonts + wss:// for live tests) Report tooling: https://github.com/paseo-network/paseo-tls-audit * fix(tls-report): handle IPv6 and private IPs in WebSocket URL builder Prevents DOMException when building wss:// URLs from multiaddrs containing IPv6 or private/loopback addresses. * Regenerate TLS report: filter non-routable IPs, fix instructions - Remove private, loopback, CGNAT, and link-local addresses from report - Switch instructions from bun to npm (smoldot WASM compat) * deploy vercel --------- Co-authored-by: Maria Ayelen Murano <muranoayelen@gmail.com>
1 parent 833dd81 commit 0b8760f

2 files changed

Lines changed: 698 additions & 0 deletions

File tree

next.config.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ const contentSecurityPolicy =
3333
: prodContentSecurityPolicy;
3434

3535
const nextConfig: NextConfig = {
36+
async rewrites() {
37+
return [
38+
{
39+
source: "/tls-report",
40+
destination: "/tls-report.html",
41+
},
42+
];
43+
},
3644
async headers() {
3745
return [
3846
{
@@ -74,6 +82,27 @@ const nextConfig: NextConfig = {
7482
},
7583
],
7684
},
85+
{
86+
// TLS report needs Google Fonts and wss:// for live testing
87+
source: "/tls-report:path(|.html)",
88+
headers: [
89+
{
90+
key: "Content-Security-Policy",
91+
value: [
92+
"default-src 'self'",
93+
"script-src 'self' 'unsafe-inline'",
94+
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
95+
"style-src-elem 'self' 'unsafe-inline' https://fonts.googleapis.com",
96+
"font-src 'self' data: https://fonts.gstatic.com",
97+
"img-src 'self' data:",
98+
"connect-src 'self' wss:",
99+
"frame-ancestors 'self'",
100+
"base-uri 'self'",
101+
"form-action 'self'",
102+
].join("; "),
103+
},
104+
],
105+
},
77106
];
78107
},
79108
};

public/tls-report.html

Lines changed: 669 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)