diff --git a/neurosploit-rs/Cargo.lock b/neurosploit-rs/Cargo.lock index 9ac02f8..5f3c733 100644 --- a/neurosploit-rs/Cargo.lock +++ b/neurosploit-rs/Cargo.lock @@ -940,7 +940,7 @@ dependencies = [ [[package]] name = "neurosploit" -version = "4.3.2" +version = "4.3.3" dependencies = [ "anyhow", "clap", @@ -957,7 +957,7 @@ dependencies = [ [[package]] name = "neurosploit-harness" -version = "4.3.2" +version = "4.3.3" dependencies = [ "anyhow", "base64", diff --git a/neurosploit-rs/crates/harness/src/report.rs b/neurosploit-rs/crates/harness/src/report.rs index a30de36..89dfed0 100644 --- a/neurosploit-rs/crates/harness/src/report.rs +++ b/neurosploit-rs/crates/harness/src/report.rs @@ -501,6 +501,16 @@ fn tq(s: &str) -> String { format!("\"{}\"", cleaned) } +/// Like `tq` but preserves newlines as literal `\n` inside the Typst string, +/// so multi-paragraph text renders with proper line breaks. +fn tq_multi(s: &str) -> String { + let cleaned: String = s + .replace('\\', "\\\\") + .replace('"', "\\\"") + .replace('\r', ""); + format!("\"{}\"", cleaned) +} + /// Generate a self-contained `report.typ` (data + bundled template) in `dir` /// and compile it to `report.pdf` via the `typst` binary. Falls back to leaving /// the `.typ` when `typst` is unavailable. @@ -516,16 +526,27 @@ pub fn typst_report(target: &str, findings: &[Finding], dir: &Path) -> std::io:: let confirmed: Vec<&Finding> = sorted.iter().filter(|f| !needs_review(f)).collect(); let review: Vec<&Finding> = sorted.iter().filter(|f| needs_review(f)).collect(); let asset = if meta.asset.is_empty() { "unidentified web asset".to_string() } else { meta.asset.clone() }; - let accounts = findings.iter().find(|f| f.id == "test-accounts").map(|f| f.evidence.clone()).unwrap_or_default(); + let accounts_raw = findings.iter().find(|f| f.id == "test-accounts").map(|f| f.evidence.clone()).unwrap_or_default(); + let account_lines: Vec<&str> = accounts_raw.split('\n') + .map(|l| l.trim()) + .filter(|l| !l.is_empty()) + .collect(); + let accounts_header = account_lines.first().copied().unwrap_or(""); + let account_items: Vec<&str> = account_lines.iter().skip(1) + .filter(|l| l.starts_with("•") || l.starts_with("-") || l.starts_with("*")) + .map(|l| l.trim_start_matches(['•', '-', '*', ' '])) + .collect(); let mut data = String::new(); + let accounts_arr = format!("({})", account_items.iter().map(|a| format!("{},", tq(a))).collect::()); data.push_str(&format!( - "#let meta = (target: {}, asset: {}, tech: {}, server: {}, run_id: {}, generated: {}, model: {}, exec: {}, conclusion: {}, accounts: {}, provenance: {})\n", + "#let meta = (target: {}, asset: {}, tech: {}, server: {}, run_id: {}, generated: {}, model: {}, exec: {}, conclusion: {}, accounts_header: {}, accounts: {}, provenance: {})\n", tq(target), tq(&asset), tq(&meta.tech.join(", ")), tq(&meta.server), tq(&run_id), tq("July 2026"), tq("multi-model"), tq(&strip_md(&exec_summary(target, &meta, &confirmed, &review))), tq(&strip_md(&conclusion(target, &meta, &confirmed, &review))), - tq(&strip_md(&accounts)), + tq(&strip_md(accounts_header)), + accounts_arr, tq(&crate::provenance::Provenance::process().tag()), )); data.push_str("#let findings = (\n"); @@ -543,8 +564,8 @@ pub fn typst_report(target: &str, findings: &[Finding], dir: &Path) -> std::io:: data.push_str(&format!( " (severity: {}, title: {}, agent: {}, cwe: {}, owasp: {}, cvss: {}, endpoint: {}, payload: {}, evidence: {}, impact: {}, remediation: {}, votes: {}, confidence: {}, status: {}, auth: {}, screenshots: {}, location: {}, steps: {}),\n", tq(&f.severity), tq(&f.title), tq(&f.agent), tq(&f.cwe), tq(&owasp), tq(&f.cvss), - tq(&f.endpoint), tq(&wrappable(&f.payload)), tq(&wrappable(&technical_evidence(f))), tq(&f.impact), - tq(&f.remediation), tq(&f.votes), f.confidence, tq(status), + tq(&f.endpoint), tq(&wrappable(&f.payload)), tq(&wrappable(&technical_evidence(f))), tq_multi(&f.impact), + tq_multi(&f.remediation), tq(&f.votes), f.confidence, tq(status), tq(if f.auth_context.is_empty() { "-" } else { &f.auth_context }), shots, tq(&location_line(f)), diff --git a/neurosploit-rs/templates/report.typ b/neurosploit-rs/templates/report.typ index d2d5729..a49f2a4 100644 --- a/neurosploit-rs/templates/report.typ +++ b/neurosploit-rs/templates/report.typ @@ -138,13 +138,33 @@ ] // ---- Test accounts created ---- -#if meta.accounts != "" [ +#let acct_list = meta.at("accounts", default: ()) +#if type(acct_list) == array and acct_list.len() > 0 [ #v(8pt) == Test Accounts Created (delete after) #v(3pt) - #text(9pt, fill: gray)[Created to reach the authenticated surface. Credentials are in the run vault (.neurosploit/vault/.json); delete once testing is complete.] - #v(3pt) - #block(width: 100%, inset: 8pt, radius: 4pt, fill: rgb("#faf7ff"), text(9pt)[#meta.accounts]) + #text(9pt, fill: gray)[Created to reach the authenticated surface. Credentials are in the run vault (.neurosploit/vault/.json); delete once testing is complete.] + #v(2pt) + #let hdr = meta.at("accounts_header", default: "") + #if hdr != "" [ #text(9pt)[#hdr] #v(4pt) ] + #block(width: 100%, inset: 8pt, radius: 4pt, fill: rgb("#faf7ff"), stroke: 0.5pt + rgb("#e4e4e8"))[ + #set text(size: 7.5pt, font: ("Menlo", "DejaVu Sans Mono", "Courier New")) + #set par(leading: 0.6em) + #for acct in acct_list [ + #box(width: 4pt, text(fill: rgb("#7c5cff"))[•]) #acct \ + ] + ] +] else [ + // Fallback for old-format string accounts + #let acct_str = meta.at("accounts_header", default: "") + #if acct_str != "" [ + #v(8pt) + == Test Accounts Created (delete after) + #v(3pt) + #text(9pt, fill: gray)[Created to reach the authenticated surface. Credentials are in the run vault (.neurosploit/vault/.json); delete once testing is complete.] + #v(3pt) + #block(width: 100%, inset: 8pt, radius: 4pt, fill: rgb("#faf7ff"), text(9pt)[#acct_str]) + ] ] #v(10pt) diff --git a/web/public/app.js b/web/public/app.js index a00b702..5d90e0a 100644 --- a/web/public/app.js +++ b/web/public/app.js @@ -3102,6 +3102,28 @@ function gmName(n) { return p.title || p.name || p.category || p.path || p.type || p.address || n.key; } +const GM_ICON = { + Target: ``, + Host: ``, + Service: ``, + Technology: ``, + Endpoint: ``, + Vulnerability: ``, + Finding: ``, + AttackStep: ``, + ExploitAttempt: ``, + Credential: ``, + Secret: ``, + Identity: ``, + Role: ``, + Permission: ``, + Asset: ``, + Control: ``, + BusinessImpact: ``, + Internet: ``, +}; +function gmIcon(label) { return GM_ICON[label] || GM_ICON.Asset; } + function renderGraphFindingList(x) { const data = x.graphData?.graph; const list = x.q('gflist'); @@ -3133,8 +3155,8 @@ function renderGraphMemory(x) { show(x.q('graph-empty'), !has); show(x.q('wrap'), has); renderGraphFindingList(x); - x.q('legend').innerHTML = [['asset', 'asset / host'], ['surface', 'service / endpoint'], ['weak', 'vulnerability / finding'], ['step', 'attack step'], ['cred', 'credential / identity'], ['impact', 'impact']] - .map(([k, l]) => `${esc(l)}`).join('') + + x.q('legend').innerHTML = [['internet', 'Internet'], ['asset', 'Host / Target'], ['surface', 'Service / Endpoint'], ['weak', 'Finding'], ['step', 'Attack Step'], ['cred', 'Credential / Role'], ['impact', 'Impact']] + .map(([k, l]) => `${esc(l)}`).join('') + 'confirmedneeds validationhypothesis'; if (!has) { stage.innerHTML = ''; return; } const filterFid = x.view.filterFinding || null; @@ -3182,22 +3204,17 @@ function renderGraphMemory(x) { if (filterFid) { const fNode = data.nodes.find(n => n.label === 'Finding' && n.key === filterFid); const fid = fNode ? id(fNode) : `Finding|${filterFid}`; - // Only keep edges directly involving this finding, then walk outward - // from connected non-Finding nodes (hosts, impacts, steps). - // Exclude edges connecting OTHER findings to shared hosts. const findingEdges = edges.filter(e => eid(e.from) === fid || eid(e.to) === fid); const reachable = new Set([fid]); for (const e of findingEdges) { reachable.add(eid(e.from)); reachable.add(eid(e.to)); } - // Walk traversal edges from those seeds, but never bridge to other findings let changed = true; while (changed) { changed = false; for (const e of edges) { const from = eid(e.from), to = eid(e.to); - if (from === fid || to === fid) continue; // already handled + if (from === fid || to === fid) continue; const fromIn = reachable.has(from), toIn = reachable.has(to); if (!fromIn && !toIn) continue; - // Don't bridge to other finding nodes if (fromIn && !toIn && e.to.label === 'Finding') continue; if (toIn && !fromIn && e.from.label === 'Finding') continue; if (fromIn && !toIn) { reachable.add(to); changed = true; } @@ -3210,29 +3227,46 @@ function renderGraphMemory(x) { if (fNode && descBox) { const f = gmFinding(x, fNode.props?.finding_id); const props = fNode.props || {}; + const finding = f?.f || {}; + const cweStr = finding.cwe || props.cwe || ''; + const cvssStr = finding.cvss || props.cvss || ''; + const owasp = finding.owasp || ''; + const mitre = finding.mitre || props.mitre || ''; + const stageVal = finding.stage || props.stage || ''; + const exploitability = finding.exploitability || ''; + const confidence = finding.confidence ?? props.confidence ?? ''; + const votes = finding.votes || ''; + const reviewStatus = finding.review_status || props.status || ''; + const agent = finding.agent || ''; + const whereText = finding.where_text || finding.proof || props.description || ''; + const whatText = finding.what_text || ''; + const fixText = finding.fix_text || ''; descBox.innerHTML = `
${esc(props.local_severity || 'info')} - ${esc(gmName(fNode))} + ${esc(finding.title || gmName(fNode))}
-
${props.description ? `

${esc(props.description)}

` : ''} - ${props.category ? `

Category: ${esc(props.category)}

` : ''} - ${props.cwe ? `

CWE: ${esc(Array.isArray(props.cwe) ? props.cwe.join(', ') : props.cwe)}

` : ''} - ${props.stage ? `

Stage: ${esc(props.stage)}

` : ''} +
+ ${cweStr ? `
CWE
${esc(Array.isArray(cweStr) ? cweStr.join(', ') : cweStr)}
` : ''} + ${cvssStr ? `
CVSS
${esc(String(cvssStr))}
` : ''} + ${owasp ? `
OWASP
${esc(owasp)}
` : ''} + ${mitre ? `
MITRE
${esc(mitre)}
` : ''} + ${stageVal ? `
Stage
${esc(stageVal)}
` : ''} + ${exploitability ? `
Exploitability
${esc(exploitability)}
` : ''} + ${confidence !== '' ? `
Confidence
${esc(String(confidence))}
` : ''} + ${reviewStatus ? `
Review Status
${esc(reviewStatus)}
` : ''} + ${agent ? `
Agent
${esc(agent)}
` : ''}
-
- ${props.status ? `Status: ${esc(props.status)}` : ''} - ${f ? '' : ''} -
`; + ${whereText ? `
WHERE THE PROBLEM IS

${esc(whereText)}

` : ''} + ${whatText ? `
WHAT IT MEANS

${esc(whatText)}

` : ''} + ${fixText ? `
HOW TO FIX IT

${esc(fixText)}

` : ''}`; show(descBox, true); - const openBtn = descBox.querySelector('[data-openfinding]'); - if (openBtn && f) openBtn.addEventListener('click', () => openFindingModal(f.f, f.pocs, f.runId)); } } else if (descBox) { show(descBox, false); } - // Columns by entity kind; a long column wraps into sub-columns. - const W = 220, H = 54, GX = 90, GY = 12, PER = 12; + // Circular node layout — left-to-right columns by entity kind + const NW = 140, NH = 90, GX = 60, GY = 30, PER = 8; const cols = new Map(); for (const n of nodes) { const c = GM_COL[n.label] ?? 3; @@ -3248,16 +3282,16 @@ function renderGraphMemory(x) { || sevRank(a.props?.local_severity) - sevRank(b.props?.local_severity) || (a.label + gmName(a)).localeCompare(b.label + gmName(b))); const sub = Math.ceil(list.length / PER); - list.forEach((n, i) => pos.set(id(n), { x: (col + Math.floor(i / PER)) * (W + GX) - Math.floor(i / PER) * (GX - 24), y: (i % PER) * (H + GY) })); - maxH = Math.max(maxH, Math.min(list.length, PER) * (H + GY)); + list.forEach((n, i) => pos.set(id(n), { x: (col + Math.floor(i / PER)) * (NW + GX), y: (i % PER) * (NH + GY) })); + maxH = Math.max(maxH, Math.min(list.length, PER) * (NH + GY)); col += sub; }); - const width = col * (W + GX); + const width = col * (NW + GX); + const CX = NW / 2, CY = 28; const path = (a, b) => { - const x1 = a.x + W, y1 = a.y + H / 2, x2 = b.x, y2 = b.y + H / 2; - if (x2 > x1) { const m = (x1 + x2) / 2; return `M${x1},${y1} C${m},${y1} ${m},${y2} ${x2},${y2}`; } - const r = Math.max(a.x, b.x) + W + 40; - return `M${x1},${y1} C${r},${y1} ${r},${y2} ${b.x + W},${y2}`; + const x1 = a.x + CX + 28, y1 = a.y + CY, x2 = b.x + CX - 28, y2 = b.y + CY; + const mx = (x1 + x2) / 2; + return `M${x1},${y1} C${mx},${y1} ${mx},${y2} ${x2},${y2}`; }; const svg = edges.map((e) => { const a = pos.get(eid(e.from)), b = pos.get(eid(e.to)); @@ -3268,12 +3302,14 @@ function renderGraphMemory(x) { const cards = nodes.map((n) => { const p = pos.get(id(n)); const props = n.props || {}; - const badge = props.status ? `${esc(STATUS_LABEL[props.status] || props.status)}` : ''; - const sev = props.local_severity ? `${esc(props.local_severity)}` : ''; - const crit = props.critical === true || props.privileged === true ? '★' : ''; - return `
-
${esc(n.label)}${props.stage ? ` · ${esc(props.stage)}` : ''}${crit}${sev}${badge}
-
${esc(gmName(n))}
`; + const kind = GM_KIND[n.label] || 'meta'; + const sev = props.local_severity; + const sevBadge = sev ? `${esc(sev.charAt(0).toUpperCase())}` : ''; + const countBadge = props.endpoint_count ? `${props.endpoint_count}` : ''; + return `
+
${gmIcon(n.label)}${sevBadge}${countBadge}
+
${esc(gmName(n))}
+
${esc(n.label)}${props.stage ? ` · ${esc(props.stage)}` : ''}
`; }).join(''); stage.innerHTML = `${svg}${cards}`; stage.style.width = `${width + 80}px`; @@ -3894,9 +3930,14 @@ async function openProviderKeysModal() { let existing = $('#providerKeysModal'); if (!existing) { document.body.insertAdjacentHTML('beforeend', ``); +
`); existing = $('#providerKeysModal'); } const body = $('#providerKeysModalBody'); diff --git a/web/public/style.css b/web/public/style.css index dc33af6..14cca00 100644 --- a/web/public/style.css +++ b/web/public/style.css @@ -657,7 +657,7 @@ textarea { resize: vertical; min-height: 72px; } .modal-foot { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--border); } .modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); } .modal-head .title { font-size: var(--fs-lg); font-weight: 600; } -.modal-sub { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--text-faint); margin-top: 2px; } +.modal-head .modal-sub { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--text-faint); margin-top: 2px; } .modal-tabs { display: flex; gap: var(--sp-1); padding: 0 var(--sp-5); border-bottom: 1px solid var(--border); } .modal-tab { padding: var(--sp-3) var(--sp-2); font-size: var(--fs-sm); font-weight: 500; color: var(--text-faint); border-bottom: 2px solid transparent; background: none; border-top: none; border-left: none; border-right: none; } .modal-tab.active { color: var(--text); border-bottom-color: var(--accent); } @@ -668,15 +668,14 @@ textarea { resize: vertical; min-height: 72px; } .field-status.ok { color: var(--sev-low-fg); } .field-status.bad { color: var(--sev-critical-fg); } -.provider-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--border); position: relative; } +.provider-row { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); } .provider-row:last-child { border-bottom: none; } -.provider-row .p-name { flex: none; width: 150px; font-size: var(--fs-sm); font-weight: 500; } -.provider-row .p-kind { flex: none; width: 74px; font-size: var(--fs-2xs); text-transform: uppercase; color: var(--text-faint); font-family: var(--mono); } -.provider-row .p-status { flex: 1; font-size: var(--fs-2xs); color: var(--text-faint); } -.provider-row .p-status.configured { color: var(--sev-low-fg); font-weight: 600; } .provider-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); flex: none; } .provider-row .dot.set { background: var(--sev-low-fg); } -.provider-row .btn-config { flex: none; } +.provider-row .p-name { flex: none; width: 160px; font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.provider-row .p-kind { flex: none; width: 64px; font-size: var(--fs-2xs); text-transform: uppercase; color: var(--text-faint); font-family: var(--mono); } +.provider-row input { flex: 1; min-width: 0; } +.provider-row .btn { flex: none; } .key-verify { flex: none; font-size: var(--fs-2xs); font-weight: 700; min-width: 60px; } .key-verify.ok { color: var(--sev-low-fg); } .key-verify.bad { color: var(--sev-critical-fg); } @@ -973,37 +972,65 @@ body.resizing-ns { user-select: none; cursor: ns-resize; } .ts-step { font-family: var(--mono); font-size: var(--fs-xs); } .ts-action { font-size: var(--fs-sm); color: var(--text-dim); margin-top: 2px; } -/* graph (web + internal network) */ +/* graph (web + internal network) — Wiz-style attack path visualization */ .gm-wrap { position: relative; height: 640px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; cursor: grab; - background-color: var(--surface-2); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 18px 18px; } + background-color: var(--surface); background-image: radial-gradient(var(--border) .5px, transparent .5px); background-size: 24px 24px; } .gm-wrap.dragging { cursor: grabbing; } .gm-wrap[hidden] { display: none; } .gm-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; } .gm-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; } -.gm-e { fill: none; stroke-width: 1.4; opacity: .55; } -.gm-e.gm-trav { stroke-width: 2; opacity: .85; } +.gm-e { fill: none; stroke-width: 2; opacity: .6; } +.gm-e.gm-trav { stroke-width: 2.5; opacity: .85; } .gm-e.es-confirmed { stroke: var(--sev-low-fg); } .gm-e.es-needs_validation { stroke: var(--sev-medium-fg); stroke-dasharray: 6 4; } .gm-e.es-hypothesis { stroke: var(--text-faint); stroke-dasharray: 2 4; } .gm-e.es-needs_review { stroke: var(--sev-info-fg); stroke-dasharray: 4 3; } -.gm-stage.focusing .gm-e { opacity: .12; } -.gm-stage.focusing .gm-e.hl { opacity: 1; stroke-width: 2.6; } -.gm-node { position: absolute; background: var(--surface); border: 1px solid var(--border-strong); border-left: 4px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 8px; cursor: pointer; overflow: hidden; box-shadow: 0 1px 0 var(--border); } -.gm-node:hover { border-color: var(--text-dim); } -.gm-node.sel { outline: 2px solid var(--focus-ring); } -.gm-node-h { display: flex; align-items: center; gap: 5px; } -.gm-lbl { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--text-faint); } -.gm-node .sev { font-size: var(--fs-2xs); padding: 0 5px; } -.gm-crit { color: var(--sev-critical-fg); font-size: var(--fs-xs); } -.gm-node-t { font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; } -.gk-asset { border-left-color: var(--sev-info-fg); } -.gk-surface { border-left-color: var(--text-faint); } -.gk-weak { border-left-color: var(--sev-high-fg); } -.gk-step { border-left-color: var(--accent); } -.gk-cred { border-left-color: var(--sev-medium-fg); } -.gk-impact { border-left-color: var(--sev-critical-fg); background: var(--sev-critical-bg); } -.gk-meta { border-left-color: var(--border); opacity: .8; } -.gm-leg { font-size: var(--fs-xs); padding: 3px 8px 3px 6px; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-xs); background: var(--surface); color: var(--text-dim); } +.gm-stage.focusing .gm-e { opacity: .1; } +.gm-stage.focusing .gm-e.hl { opacity: 1; stroke-width: 3; } +/* Circular node — Wiz/Orca style */ +.gm-node { position: absolute; display: flex; flex-direction: column; align-items: center; cursor: pointer; } +.gm-node:hover .gm-circle { transform: scale(1.08); box-shadow: 0 4px 16px rgba(0,0,0,.15); } +.gm-node.sel .gm-circle { outline: 3px solid var(--focus-ring); outline-offset: 2px; } +.gm-circle { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); display: flex; align-items: center; justify-content: center; transition: transform .15s, box-shadow .15s; position: relative; } +.gm-circle svg { width: 26px; height: 26px; } +.gm-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--surface); } +.gm-node-label { font-size: var(--fs-xs); font-weight: 500; color: var(--text); text-align: center; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; } +.gm-node-sub { font-size: var(--fs-2xs); color: var(--text-faint); text-align: center; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +/* Color rings by kind */ +.gk-internet .gm-circle { border-color: #4da6ff; background: #e8f4fd; } +.gk-asset .gm-circle { border-color: #4da6ff; background: #e8f4fd; } +.gk-surface .gm-circle { border-color: #f59e0b; background: #fef3c7; } +.gk-weak .gm-circle { border-color: #ef4444; background: #fef2f2; } +.gk-step .gm-circle { border-color: #8b5cf6; background: #f3e8ff; } +.gk-cred .gm-circle { border-color: #10b981; background: #ecfdf5; } +.gk-impact .gm-circle { border-color: #ef4444; background: #fef2f2; } +.gk-meta .gm-circle { border-color: var(--border); background: var(--surface-2); } +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) .gk-internet .gm-circle { border-color: #60a5fa; background: rgba(96,165,250,.12); } + :root:not([data-theme="light"]) .gk-asset .gm-circle { border-color: #60a5fa; background: rgba(96,165,250,.12); } + :root:not([data-theme="light"]) .gk-surface .gm-circle { border-color: #fbbf24; background: rgba(251,191,36,.12); } + :root:not([data-theme="light"]) .gk-weak .gm-circle { border-color: #f87171; background: rgba(248,113,113,.12); } + :root:not([data-theme="light"]) .gk-step .gm-circle { border-color: #a78bfa; background: rgba(167,139,250,.12); } + :root:not([data-theme="light"]) .gk-cred .gm-circle { border-color: #34d399; background: rgba(52,211,153,.12); } + :root:not([data-theme="light"]) .gk-impact .gm-circle { border-color: #f87171; background: rgba(248,113,113,.12); } +} +:root[data-theme="dark"] .gk-internet .gm-circle { border-color: #60a5fa; background: rgba(96,165,250,.12); } +:root[data-theme="dark"] .gk-asset .gm-circle { border-color: #60a5fa; background: rgba(96,165,250,.12); } +:root[data-theme="dark"] .gk-surface .gm-circle { border-color: #fbbf24; background: rgba(251,191,36,.12); } +:root[data-theme="dark"] .gk-weak .gm-circle { border-color: #f87171; background: rgba(248,113,113,.12); } +:root[data-theme="dark"] .gk-step .gm-circle { border-color: #a78bfa; background: rgba(167,139,250,.12); } +:root[data-theme="dark"] .gk-cred .gm-circle { border-color: #34d399; background: rgba(52,211,153,.12); } +:root[data-theme="dark"] .gk-impact .gm-circle { border-color: #f87171; background: rgba(248,113,113,.12); } +.gm-sev-badge { position: absolute; top: -2px; left: -2px; font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 1px 5px; border-radius: 8px; } +.gm-leg { font-size: var(--fs-xs); padding: 3px 8px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; } +.gm-leg .gm-leg-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid; } +.gm-leg.gk-internet .gm-leg-dot { border-color: #4da6ff; } +.gm-leg.gk-asset .gm-leg-dot { border-color: #4da6ff; } +.gm-leg.gk-surface .gm-leg-dot { border-color: #f59e0b; } +.gm-leg.gk-weak .gm-leg-dot { border-color: #ef4444; } +.gm-leg.gk-step .gm-leg-dot { border-color: #8b5cf6; } +.gm-leg.gk-cred .gm-leg-dot { border-color: #10b981; } +.gm-leg.gk-impact .gm-leg-dot { border-color: #ef4444; } .gm-leg-sep { width: 1px; height: 18px; background: var(--border); } .gm-edge-leg { font-size: var(--fs-xs); color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; } .gm-edge-leg::before { content: ""; width: 22px; border-top: 2px solid; } @@ -1106,12 +1133,6 @@ a.deliv-card:hover { border-color: var(--accent); } .moves li { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0; } .moves details summary { cursor: pointer; font-size: var(--fs-xs); color: var(--accent); margin-top: 4px; } -.gm-leg.gk-asset { border-left-color: var(--sev-info-fg); } -.gm-leg.gk-surface { border-left-color: var(--text-faint); } -.gm-leg.gk-weak { border-left-color: var(--sev-high-fg); } -.gm-leg.gk-step { border-left-color: var(--accent); } -.gm-leg.gk-cred { border-left-color: var(--sev-medium-fg); } -.gm-leg.gk-impact { border-left-color: var(--sev-critical-fg); background: var(--surface); } .panel-toolbar .input-sm { width: 200px; flex: 0 0 auto; } .panel-toolbar select.input-sm { width: 150px; } .panel-toolbar .search-wrap { flex: 1 1 260px; max-width: 420px; } @@ -1128,10 +1149,15 @@ a.deliv-card:hover { border-color: var(--accent); } .gfl-item .gfl-sev { font-size: var(--fs-2xs); font-weight: 700; flex: none; padding: 1px 5px; border-radius: var(--radius-xs); } .gfl-item .gfl-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; } .graph-main { flex: 1; overflow: hidden; display: flex; flex-direction: column; } -.gm-finding-desc { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-2); flex: none; } -.gm-finding-desc .fd-header { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); } +.gm-finding-desc { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: var(--sp-4); margin: 0 0 var(--sp-2); flex: none; max-height: 320px; overflow-y: auto; } +.gm-finding-desc .fd-header { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); } .gm-finding-desc .fd-title { font-weight: 600; font-size: var(--fs-base); } -.gm-finding-desc .fd-body { font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.5; } -.gm-finding-desc .fd-body p { margin: 4px 0; } -.gm-finding-desc .fd-meta { display: flex; gap: var(--sp-3); margin-top: var(--sp-2); font-size: var(--fs-2xs); color: var(--text-faint); } +.gm-finding-desc .fd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp-2); margin-bottom: var(--sp-3); } +.gm-finding-desc .fd-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); } +.gm-finding-desc .fd-card-label { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); font-weight: 600; } +.gm-finding-desc .fd-card-value { font-size: var(--fs-sm); font-weight: 500; margin-top: 2px; font-family: var(--mono); } +.gm-finding-desc .fd-section { margin-bottom: var(--sp-3); } +.gm-finding-desc .fd-section:last-child { margin-bottom: 0; } +.gm-finding-desc .fd-section-title { font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: var(--sp-1); } +.gm-finding-desc .fd-section p { font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.6; margin: 0; } @media (max-width: 760px) { .graph-finding-list { width: 160px; } }