fix(scans): show hostname/IP on scan detail header, not a raw UUID#613
Merged
Conversation
The Scan detail page Host field rendered scan.host_id.slice(0,8) — a
truncated UUID that's not human-friendly.
Backend (api-scans v1.1.0 C-07/AC-08): GET /scans/{id} now resolves the
host's hostname + ip_address from the hosts table onto ScanSummary (via
host(ip_address) for clean inet->text, COALESCE for NULLs). The list
endpoint omits them (the caller already has host context).
Frontend (frontend-scan-detail v1.1.0 C-08/AC-08): the Host field renders
scan.hostname || scan.ip_address || scan.host_id.slice(0,8) — hostname
first, IP fallback, short UUID only as a last resort — still linking to
/hosts/$hostId.
Verified live: the field now shows 'owas-tst01' instead of '019eccd8'.
remyluslosius
added a commit
that referenced
this pull request
Jun 20, 2026
- SESSION_LOG.md: 2026-06-20 entry for the /scans/{id} host-label fix
(hostname->IP->short-UUID), the inet COALESCE gotcha, and tests.
- BACKLOG.md: note the scan-detail host label shipped (#613); mark the
Host Management chart-icon browser verification done (verified live on
owas-tst01, no longer a pending P3).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Scan detail page (
/scans/{id}) Host field renderedscan.host_id.slice(0, 8)— a truncated UUID (e.g.019eccd8) that isn'thuman-friendly. Per request: show the hostname if present, else the IP
address (short UUID only as an impossible-case last resort).
Changes
Backend (
api-scansv1.1.0 — C-07 / AC-08)GET /scans/{id}resolves the host'shostname+ip_addressfrom thehoststable ontoScanSummary, usinghost(ip_address)for cleaninet→text and
COALESCEfor NULLs. A missing host row (FK isON DELETE RESTRICT, so unexpected) leaves the labels empty rather thanfailing the read. The list endpoint (
GET /scans) omits them — the calleralready has host context.
Frontend (
frontend-scan-detailv1.1.0 — C-08 / AC-08)scan.hostname || scan.ip_address || scan.host_id.slice(0, 8),still wrapped in the
/hosts/$hostIdLink.Tests
GET /scans/{id}returns the hostname + IP for a namedhost; an empty-hostname host yields empty hostname + populated IP.
host_id.slicerender is gone).api-scans+scanresultsuites green;specter check111 specs.Verified live
The detail header now shows
owas-tst01instead of019eccd8.Note: one bug caught + fixed mid-implementation —
COALESCE(ip_address, '')500'd because
ip_addressis Postgresinet(can't COALESCE with text);switched to
host(ip_address), confirmed by the failing→passing AC-08 test.