audit-labs/gh-attest
GitHub Audit Evidence Extractor
clone: git clone https://gitbay.org/audit-labs/gh-attest.git
161b13ad7d5981a6811cd9e6ae1f4390828c5a39
verified · cmc
author: Christian Cleberg <hello@cleberg.net> · 2026-07-20T16:03:43Z
src/dashboard.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) @@ -47,7 +47,10 @@ export interface DashboardData { lastPolledAt: string | null; } -function esc(value: unknown): string { +// Deliberately narrower than `unknown`: an object reaching here would render +// as "[object Object]" in an evidence table, which is worse than failing. +// Keeping the parameter to primitives makes that a compile error instead. +function esc(value: string | number | null | undefined): string { return String(value ?? "").replace(/[&<>"']/g, (c) => { switch (c) { case "&": return "&";