Free check partly gated behind joining the network (Marty 2026-11-16)
Not signed in: grade, verdict, first finding and the opinion line; the rest (scores, findings, chain facts, screenshot, evidence) stays on the server. Join or sign in by one-time email link (hub /v1/join with the wwi.ref sponsor when HUB_JOIN=1; staging reads only). 1 free check a day without an account, 3 for members. Red flags deduped (deterministic VERIFIED one kept), grade recomputed on read. Privacy: joining and emails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -157,7 +157,18 @@ function grade(report, E) {
|
||||
if (eoaUp.length) flags.push({ text: 'One personal wallet can replace the code in a single transaction (' + eoaUp.join(', ') + ').', tag: 'VERIFIED', source: 'rubric red flag 1' });
|
||||
const v = (E && E.verification) || {};
|
||||
if (E && E.proxy && E.proxy.upgradeable && !(v.implementation && v.implementation.match)) flags.push({ text: 'The implementation behind the upgradeable proxy has no verified source on Sourcify.', tag: 'VERIFIED', source: 'rubric red flag 2' });
|
||||
for (const f of report.critical_flags || []) if (typeof f === 'string' && f.trim()) flags.push({ text: f.trim(), tag: 'INFERRED', source: 'model, from the rubric list' });
|
||||
// the model often restates the deterministic red flags: keep one per issue, the deterministic VERIFIED one
|
||||
const has1 = flags.some(f => f.source === 'rubric red flag 1'), has2 = flags.some(f => f.source === 'rubric red flag 2');
|
||||
const words = t => new Set(String(t).toLowerCase().match(/[a-z]{4,}/g) || []);
|
||||
const similar = (a, b) => { const A = words(a), B = words(b); let n = 0; for (const w of A) if (B.has(w)) n++; return n / Math.max(1, Math.min(A.size, B.size)) >= 0.5; };
|
||||
for (const f of report.critical_flags || []) {
|
||||
if (typeof f !== 'string' || !f.trim()) continue;
|
||||
const t = f.trim();
|
||||
if (has1 && /(upgrad|replace (the )?code|single[- ](eoa|wallet|key)|one (personal )?wallet|\beoa\b|owner key)/i.test(t)) continue;
|
||||
if (has2 && /(unverified|not verified|no verified|source)/i.test(t)) continue;
|
||||
if (flags.some(x => similar(x.text, t))) continue;
|
||||
flags.push({ text: t, tag: 'INFERRED', source: 'model, from the rubric list' });
|
||||
}
|
||||
let band = overall == null ? null : overall <= 25 ? 'Low risk' : overall <= 50 ? 'Moderate risk' : overall <= 75 ? 'Elevated risk' : 'High risk';
|
||||
const forced = flags.length > 0 && band !== 'High risk';
|
||||
if (flags.length) band = 'High risk';
|
||||
|
||||
Reference in New Issue
Block a user