()
| 7142 | 'ra-pref-open': ['bg-amber-950/50 border-amber-800 text-amber-300', '⚠ Honours RA Router-Preference — a "pref high" rogue RA can hijack the route'], |
| 7143 | 'redirect-open': ['bg-red-950/60 border-red-800 text-red-300', '🛑 Accepts ICMPv6 Redirects — open to a Layer-3 MITM'], |
| 7144 | unknown: ['bg-slate-800 border-slate-700 text-slate-400', '—'], |
| 7145 | }; |
| 7146 | function _raguardRender(d, out) { |
| 7147 | const [cls, label] = _RAGUARD_VERDICT_STYLE[d.verdict] || _RAGUARD_VERDICT_STYLE.unknown; |
| 7148 | let html = `<div class="mb-2 px-3 py-2 rounded border ${cls} text-sm">${label}</div>`; |
| 7149 | if (d.applied) { |
| 7150 | const a = d.applied; |
| 7151 | html += `<div class="mb-2 px-3 py-2 rounded border bg-green-950/40 border-green-900 text-green-300 text-xs">Hardened: set ${a.live.length} sysctl(s)${a.persisted ? ', persisted to <span class="font-mono">' + escapeHtml(a.persisted) + '</span>' : ''}${(a.errors && a.errors.length) ? ' · <span class="text-red-300">' + a.errors.length + ' error(s)</span>' : ''}.</div>`; |
| 7152 | } |
| 7153 | const rows = d.interfaces || []; |
| 7154 | const phys = rows.filter(r => !r.virtual); |
| 7155 | const virt = rows.filter(r => r.virtual); |
| 7156 | const fmt = r => { |
| 7157 | const [c] = _RAGUARD_VERDICT_STYLE[r.verdict] || _RAGUARD_VERDICT_STYLE.unknown; |
| 7158 | const badge = `<span class="px-1.5 py-0.5 rounded border text-[10px] ${c}">${escapeHtml(r.verdict)}</span>`; |
| 7159 | const red = v => v === 1 ? 'text-red-300' : 'text-gray-400'; |
| 7160 | return `<tr class="border-t border-slate-800"> |
| 7161 | <td class="px-2 py-1 font-mono ${r.virtual ? 'text-gray-500' : 'text-gray-200'}">${escapeHtml(r.iface)}</td> |
| 7162 | <td class="px-2 py-1">${badge}</td> |
| 7163 | <td class="px-2 py-1 font-mono ${red(r.accept_redirects)}">${r.accept_redirects}</td> |
no outgoing calls
no test coverage detected