T09 · Insecure Skill Coding Practices
- Location
pretext/pages/accuracy.ts:90- Finding
Query-Controlled Report Endpoint Enables Browser Fingerprint Disclosure
- Content
View full analysis
(report: T): AccuracyReport { return requestId === undefined ? report : { ...report, requestId } } function getEnvironmentFingerprint(): EnvironmentFingerprint { return { userAgent: navigator.userAgent, devicePixelRatio: window.devicePixelRatio, viewport: { innerWidth: window.innerWidth, innerHeight: window.innerHeight, outerWidth: window.outerWidth, outerHeight: window.outerHeight, visualViewportScale: window.visualViewport?.scale ?? null, }, screen: { width: window.screen.width, height: window.screen.height, availWidth: window.screen.availWidth, availHeight: window.screen.availHeight, colorDepth: window.screen.colorDepth, pixelDepth: window.screen.pixelDepth, }, } } function publishReport(report: AccuracyReport): void { const reportJson = JSON.stringify(report) window.__ACCURACY_REPORT__ = report if (reportEndpoint !== null) { publishNavigationPhase('posting', requestId) void (async () => { try { await fetch(reportEndpoint, { method: 'POST', body: reportJson, }) publishNavigationReport(toNavigationReport(report)) } catch { // Best-effort side channel for large reports. } })() return } publishNavigationReport(toNavigationReport(report)) } ``` The fingerpr ...[truncated 4147 chars]- Remediation
View remediation
