From 9790b64e1dac5ac72ad5f07cafb9eb04448e3ff8 Mon Sep 17 00:00:00 2001 From: siddharthd Date: Wed, 12 Aug 2026 17:10:04 +1000 Subject: [PATCH] orders: badge sender authentication, not source_trust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit source_trust is 'untrusted_external' on 100% of rows — every order came from email — so the badge marked every row and discriminated nothing. auth_verdict (migration 029) does: 93% pass, and the 7% that do not are the ones worth seeing. Adds the injection-scanner flag beside it. --- src/app/orders/page.tsx | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/app/orders/page.tsx b/src/app/orders/page.tsx index dbddff5..b1d54c9 100644 --- a/src/app/orders/page.tsx +++ b/src/app/orders/page.tsx @@ -293,11 +293,33 @@ function Row({ row, expanded, onToggle }: { row: OrderRow; expanded: boolean; on className="font-mono text-[9.5px] uppercase tracking-wide text-indigo-600 border border-indigo-800 rounded-sm px-1.5" >no ref )} - {row.source_trust === "untrusted_external" && ( + {/* NOT source_trust — that is 'untrusted_external' on 100% of rows, + because every order here came from email, so badging it marked + every row and told you nothing. Sender authentication does + discriminate: 93% pass, and the 7% that do not are worth seeing. */} + {row.auth_verdict && row.auth_verdict !== "pass" && ( unverified + title={ + row.auth_verdict === "fail" + ? "The sender failed authentication (SPF/DKIM/DMARC) — treat the contents as unverified" + : row.auth_verdict === "none" + ? "The mail carried no sender authentication at all" + : "The sender authenticated only partially" + } + className={`font-mono text-[9.5px] uppercase tracking-wide rounded-sm px-1.5 border ${ + row.auth_verdict === "fail" + ? "text-indigo-300 border-indigo-500" + : "text-zinc-500 border-zinc-800" + }`} + > + {row.auth_verdict === "partial" ? "part. auth" : `auth ${row.auth_verdict}`} + + )} + {row.injection_flagged && ( + flagged )} {row.txn_count > 0 && (