Files
Lucas RayanandClaude Opus 5.5 b7462c14fa
CI / Docker image (build and smoke test) (push) Skipped
CI / Format and vet (push) Successful in 27s
CI / Dependency audit (push) Successful in 18s
CI / Tests (Linux, race detector) (push) Successful in 58s
Release / Plan (reuse the published image?) (push) Successful in 4s
Release / ci (push) Skipped
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Successful in 13s
Release / Gitea release (push) Successful in 5s
feat: 1.2.0 attack intelligence, replay, 30-day history and new interface
Intelligence: attack families mapped to MITRE ATT&CK, network type from
ASN/rDNS without external APIs, request cadence, sessions with
recon/probe/exploit/access/banned stages, campaigns across IPs, verdict
with reasons, recommended actions, exposure detection (2xx with a body
on sensitive paths), STIX 2.1 export, FCrDNS for search engine bots,
optional Tor exit list.

Data: 30-day retention, twelve ranges plus custom from/to, an on-disk
event log (daily files, hourly gzip members, size cap, corruption and
disk-full tolerant), /events, /period, /metrics with stable per-hour
metrics, an extended /ip/{ip}, and peer /period merged on the hub.

Interface: layout system with fixed card sizes, range picker in the
URL, IP analysis page, Replay page, Geography down to state and city
(Natural Earth admin-1), Live page redesigned with stable metrics and a
reusable attack map. Demo data and documentation screenshots.

Security: bounded and deadline-limited period computations, linear
campaign clustering, singleflight caches, sanitized peer studies, event
query budgets, gzip bomb guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:45:59 -03:00

213 lines
16 KiB
CSS

/* Urutau - REPLAY page. Every selector is prefixed rp-. Colours come from the
shell tokens (with fallbacks so the page also renders on a bare shell). */
.rp { --rp-side: var(--side-w, 320px); display: flex; flex-direction: column; gap: var(--s-3, 12px); min-width: 0; }
.rp [hidden] { display: none !important; }
.rp button { font: inherit; }
/* summary */
.rp-strip { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
@media (min-width: 1200px) { .rp-strip { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; } }
.rp-lead { margin: 0; font-family: var(--font-display, system-ui); font-size: 1.125rem; font-weight: 650; color: var(--heading, var(--ink)); }
.rp-skeltxt { color: var(--ink-faint); font-weight: 500; }
.rp-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.rp-st { flex: none; display: flex; align-items: baseline; gap: 8px; padding: 5px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm, 7px); background: var(--surface-panel, var(--panel)); }
.rp-st b { font-size: 1rem; font-weight: 650; color: var(--heading, var(--ink)); }
.rp-st span { font-size: .75rem; color: var(--ink-muted); white-space: nowrap; }
.rp-st.rp-t-warn b { color: var(--warn); }
.rp-st.rp-t-danger b { color: var(--danger); }
/* filters */
.rp-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rp-filters select, .rp-q { min-height: 36px; }
.rp-q { width: 150px; max-width: 100%; }
.rp-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.rp-chip { padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: .8125rem; border: 1px solid var(--line); }
/* grid: map | side over list */
.rp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3, 12px); min-width: 0; }
.rp-mapbox { position: relative; height: 40vh; min-height: 220px; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--surface-sunken, #050a10); overflow: hidden; }
.rp-map { position: absolute; inset: 0; }
.rp-nomap { display: none; }
.rp-mode { position: absolute; top: 8px; right: 8px; z-index: 3; }
.rp-mode button { min-height: 32px; padding: 4px 10px; font-size: .8125rem; }
.rp-overlay { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: var(--s-4, 16px); background: color-mix(in srgb, var(--surface-base, #070d14) 70%, transparent); }
.rp-state { max-width: 340px; text-align: center; padding: var(--s-4, 16px); border: 1px solid var(--line-strong, var(--line)); border-radius: var(--radius, 10px); background: var(--surface-panel, var(--panel)); }
.rp-state h3 { margin: 0 0 6px; font-size: 1rem; color: var(--heading, var(--ink)); }
.rp-state p { margin: 0 0 12px; color: var(--ink-muted); font-size: .875rem; }
.rp-state :last-child { margin-bottom: 0; }
/* list */
.rp-listbox { position: relative; height: 320px; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--surface-panel, var(--panel)); overflow: hidden; }
.rp-list { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.rp-list:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rp-vp { position: relative; width: 100%; }
.rp-row { position: absolute; left: 0; right: 0; top: 0; height: 34px; display: grid; grid-template-columns: 62px minmax(0, 92px) minmax(0, 1fr) 38px; align-items: center; column-gap: 8px; padding: 0 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); cursor: pointer; font-size: .8125rem; white-space: nowrap; will-change: transform; }
.rp-row > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rp-row .rp-c-host, .rp-row .rp-c-ip, .rp-row .rp-c-cat { display: none; }
.rp-row:hover { background: var(--surface-raised); }
.rp-row.is-future { opacity: .6; }
.rp-row.is-active { background: var(--accent-soft); opacity: 1; box-shadow: inset 3px 0 0 var(--accent); }
.rp-row.is-inc .rp-c-time { color: var(--danger); font-weight: 600; }
.rp-c-time { color: var(--ink-muted); }
.rp-c-ip { display: inline-flex; gap: 5px; align-items: center; }
.rp-c-cat { display: inline-flex; gap: 6px; align-items: center; }
.rp-c-host { color: var(--ink-muted); }
.rp-meth { color: var(--ink-muted); }
.rp-mk { background: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.rp-mk:empty { display: none; }
.rp-c-st { text-align: right; color: var(--ink-muted); }
.rp-bad { color: var(--danger); font-weight: 650; }
.rp-row.st-exploit { box-shadow: inset 3px 0 0 var(--danger); }
.rp-row.st-access { box-shadow: inset 3px 0 0 var(--danger); }
.rp-row.st-banned { box-shadow: inset 3px 0 0 var(--warn); }
.rp-row.st-probe { box-shadow: inset 3px 0 0 var(--info); }
.rp-row.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.rp-c-stg { font-size: .6875rem; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.rp-c-stg:empty { visibility: hidden; }
.rp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.rp-dot.rp-c-notfound { background: var(--cat-notfound, #8b9eb0); }
.rp-dot.rp-c-scanner { background: var(--cat-scanner, #d29922); }
.rp-dot.rp-c-bruteforce { background: var(--cat-bruteforce, #ff9b4a); }
.rp-dot.rp-c-exploit { background: var(--cat-exploit, #f85149); }
.rp-dot.rp-c-ssh-fail { background: var(--cat-ssh-fail, #58a6ff); }
.rp-dot.rp-c-ssh-probe { background: var(--cat-ssh-probe, #bc8cff); }
.rp-dot.rp-c-ssh-ok { background: var(--cat-ssh-ok, #3fb950); }
.rp-dot.rp-c-ban { background: var(--cat-ban, #39c5cf); }
.rp-dot.rp-c-ok { background: var(--cat-ok, #3fb950); }
.rp-s-recon { color: var(--ink-muted); }
.rp-s-probe { color: var(--info); }
.rp-s-exploit { color: var(--danger); }
.rp-s-access { color: var(--danger); }
.rp-s-banned { color: var(--warn); }
.rp-follow { position: absolute; right: 12px; bottom: 10px; z-index: 2; box-shadow: var(--shadow); background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; min-height: 34px; }
/* side / detail */
.rp-side { display: none; }
.rp-side-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.rp-side-h h2 { margin: 0; font-size: .875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); }
.rp-sheet-x { display: inline-flex; }
.rp-detail { padding: 12px 14px 18px; overflow-y: auto; font-size: .875rem; flex: 1; min-height: 0; overscroll-behavior: contain; }
.rp-muted { color: var(--ink-muted); margin: 0; }
.rp-dl { margin: 0; display: grid; gap: 8px; }
.rp-kv { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.rp-kv dt { color: var(--ink-muted); font-size: .75rem; }
.rp-kv dd { margin: 0; overflow-wrap: anywhere; }
.rp-ipline, .rp-catline { display: inline-flex; gap: 6px; align-items: center; }
.rp-link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rp-techs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.rp-mitre { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--info-soft, var(--accent-soft)); color: var(--info, var(--accent)); font-size: .75rem; font-family: var(--font-mono, monospace); border: 1px solid var(--line); }
.rp-req { font-family: var(--font-mono, monospace); font-size: .8125rem; }
.rp-scoreline { display: inline-flex; gap: 8px; align-items: center; width: 100%; }
.rp-score { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-raised); overflow: hidden; border: 1px solid var(--line); }
.rp-score i { display: block; height: 100%; background: linear-gradient(90deg, var(--warn), var(--danger)); }
.rp-stgbadge { font-weight: 650; text-transform: uppercase; font-size: .75rem; letter-spacing: .03em; }
.rp-session { min-width: 0; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm, 7px); background: var(--surface-raised); }
.rp-session h3 { margin: 0 0 6px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); }
.rp-sess-l { margin: 2px 0; font-size: .8125rem; color: var(--ink); overflow-wrap: anywhere; }
.rp-stagebar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; margin-top: 8px; }
.rp-sg { flex: 1; text-align: center; font-size: .625rem; padding: 3px 0; border-radius: 4px; background: var(--surface-sunken, var(--surface-base)); color: var(--ink-faint); border: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .02em; }
.rp-sg.on { background: var(--accent-soft); border-color: currentColor; font-weight: 650; }
/* dock: transport + timeline */
.rp-dock { position: relative; z-index: 5; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--surface-panel, var(--panel)); padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 8px; }
.rp-transport { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rp-btn { min-width: 44px; min-height: 44px; padding: 0; }
.rp-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rp-btn svg.rp-f { fill: currentColor; stroke: none; }
.rp-play { background: var(--accent); color: var(--on-accent); border-color: transparent; min-width: 52px; }
.rp-play:hover:not(:disabled) { background: var(--accent); filter: brightness(1.1); }
.rp-clock { display: flex; flex-direction: column; line-height: 1.15; min-width: 98px; padding: 0 6px; }
.rp-clock-t { font-family: var(--font-mono, monospace); font-size: 1.25rem; font-weight: 650; color: var(--heading, var(--ink)); font-variant-numeric: tabular-nums; }
.rp-clock-d { font-size: .75rem; color: var(--ink-muted); }
.rp-speed button { min-width: 38px; min-height: 44px; padding: 4px 6px; font-size: .75rem; }
.rp-tog { min-height: 44px; padding: 4px 8px; font-size: .75rem; }
.rp-tog[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.rp-det { display: inline-flex; min-height: 44px; }
.rp-speedsel { display: none; }
.rp-loopnote { font-size: .75rem; color: var(--accent); }
.rp-tl { display: flex; flex-direction: column; gap: 6px; }
.rp-tlwrap { position: relative; height: 92px; touch-action: none; cursor: crosshair; user-select: none; border-radius: var(--radius-sm, 7px); }
.rp-tlwrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rp-cv { position: absolute; left: 0; top: 0; display: block; }
.rp-skel { position: absolute; left: 0; right: 0; top: 24px; bottom: 16px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-raised) 0%, var(--surface-overlay) 50%, var(--surface-raised) 100%); background-size: 200% 100%; animation: rp-shim 1.4s linear infinite; opacity: .7; }
@keyframes rp-shim { to { background-position: -200% 0; } }
.rp-tip { position: absolute; top: -30px; z-index: 6; padding: 3px 8px; border-radius: 6px; background: var(--surface-overlay); border: 1px solid var(--line-strong, var(--line)); color: var(--ink); font-size: .75rem; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rp-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .75rem; color: var(--ink-muted); }
.rp-legend li { display: inline-flex; gap: 6px; align-items: center; }
.rp-k { display: inline-block; width: 10px; height: 10px; flex: none; }
.rp-k-exploit { background: var(--danger); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.rp-k-access { background: var(--danger); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.rp-k-ban { background: var(--warn); }
.rp-k-spike { background: var(--warn); width: 3px; height: 12px; }
.rp-k-tech { border: 2px solid var(--info); border-radius: 50%; }
.rp-k-session { background: var(--ink-faint); border-radius: 50%; width: 6px; height: 6px; }
/* side as bottom sheet on small screens */
@media (max-width: 1199.98px) {
.rp-side { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; max-height: 72vh; display: none; flex-direction: column; background: var(--surface-overlay); border-top: 1px solid var(--line-strong, var(--line)); border-radius: 14px 14px 0 0; box-shadow: var(--shadow); }
.rp-side.is-open { display: flex; }
.rp .rp-scrim { position: fixed; inset: 0; z-index: 65; background: var(--scrim, rgba(2, 6, 10, .62)); }
.rp-listbox { height: 340px; }
}
@media (min-width: 1200px) {
.rp { height: var(--rp-h, auto); min-height: 640px; }
.rp-strip, .rp-filters, .rp-dock { flex: none; }
.rp-grid { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 400px); grid-template-rows: minmax(0, 1fr); }
.rp-mapbox { height: auto; min-height: 0; }
.rp-right { display: flex; flex-direction: column; gap: var(--s-3, 12px); min-height: 0; min-width: 0; }
.rp-side { display: flex; flex-direction: column; flex: 0 1 46%; min-height: 150px; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--surface-panel, var(--panel)); overflow: hidden; }
.rp-listbox { height: auto; flex: 1 1 0; min-height: 150px; }
.rp-nomap { display: block; }
.rp-sheet-x, .rp-det { display: none; }
.rp-clock { margin-left: 4px; }
.rp-row { grid-template-columns: 56px 14px minmax(0, 122px) minmax(0, 1fr) 34px; padding: 0 8px; column-gap: 6px; }
.rp-row .rp-c-time { order: 0; } .rp-row .rp-c-cat { order: 1; display: inline-flex; } .rp-row .rp-c-ip { order: 2; display: inline-flex; } .rp-row .rp-c-req { order: 3; } .rp-row .rp-c-st { order: 4; }
.rp-row .rp-c-stg, .rp-row .rp-c-host { display: none; }
.rp-catt { display: none; }
.rp-dock { box-shadow: 0 -8px 24px rgba(0, 0, 0, .12); padding: 8px 12px 6px; gap: 6px; }
.rp-detail { padding: 8px 12px 12px; }
.rp-dl { gap: 5px; }
.rp-side { flex-basis: 52%; }
}
@media (min-width: 1200px) and (max-height: 1000px) { .rp-legend { display: none; } .rp-tlwrap { height: 78px; } }
@media (min-width: 768px) and (max-width: 1199.98px) {
.rp-mapbox { height: 45vh; min-height: 300px; }
.rp-row { grid-template-columns: 62px minmax(0, 118px) minmax(0, 138px) minmax(0, 1fr) 38px; }
.rp-row .rp-c-ip { display: inline-flex; }
.rp-listbox { height: 340px; }
}
@media (max-width: 767.98px) {
.rp-row { grid-template-columns: 60px minmax(0, 132px) minmax(0, 1fr) 36px; }
.rp-row .rp-c-stg, .rp-row .rp-c-host { display: none; }
.rp-row .rp-c-ip { display: inline-flex; }
.rp-clock { margin-left: auto; }
.rp-tog { min-height: 44px; padding: 2px 8px; flex: 1; }
.rp-btn { min-width: 40px; }
.rp-st { flex: 1 1 calc(50% - 8px); }
.rp-dock { order: 0; }
.rp-legend { display: none; }
.rp-transport { gap: 6px; }
.rp-speed { display: none; }
.rp-speedsel { display: inline-block; flex: 1; min-width: 90px; min-height: 44px; }
.rp-tlwrap { height: 90px; }
.rp-chips { margin-left: 0; }
.rp-filters select { flex: 1 1 40%; min-width: 0; }
.rp-q { flex: 1 1 100%; width: auto; }
.rp-kv { grid-template-columns: 96px minmax(0, 1fr); }
}
/* mobile order: summary, filters, map, controls + scrubber, list */
@media (max-width: 1199.98px) {
.rp-grid, .rp-right { display: contents; }
.rp { gap: 10px; }
.rp-mapbox { order: 3; height: 40vh; min-height: 220px; }
.rp-dock { order: 4; position: static; }
.rp-listbox { order: 5; }
}
@media (min-width: 768px) and (max-width: 1199.98px) { .rp-mapbox { height: 45vh; min-height: 300px; } }
@media (prefers-reduced-motion: reduce) {
.rp-skel { animation: none; }
.rp * { scroll-behavior: auto; transition: none !important; }
}