Skip to content

feat(gateway): surface security scan results in the AI Finder UI#1760

Merged
paralta merged 2 commits into
mainfrom
feat/security-ui
Jul 8, 2026
Merged

feat(gateway): surface security scan results in the AI Finder UI#1760
paralta merged 2 commits into
mainfrom
feat/security-ui

Conversation

@paralta

@paralta paralta commented Jul 6, 2026

Copy link
Copy Markdown
Member

This PR wires the reconciler's security scan results into the AI Finder UI. Scan summaries stored in the database are now preloaded alongside catalog entries and embedded into each record's metadata.scanManifest field — using the existing map<string, Value> proto field, so no schema changes are needed. The UI consumes this to show a severity-colored "Security Scanned" / "Issues Found" chip inline on each card title, a per-scanner breakdown in the detail modal, and a "Safe" checkbox filter in the sidebar.

  • Scan metadata is embedded at the catalog query layer rather than fetched separately, because PullReferrer is a gRPC bidirectional stream with no HTTP gateway binding and therefore unreachable from the browser.
  • The Status filter is now checkboxes (not radio buttons) because a record can simultaneously be trusted and verified — the two are not mutually exclusive. "Safe" is co-located in the same Status group rather than a separate Security section.
  • The scan badge color encodes the highest reported severity across all scanners (green for safe/none, blue for low, amber for medium, orange for high, red for critical), with a tooltip detailing scanner count or max severity.
image image

Signed-off-by: Catarina Paralta <clouropa@cisco.com>
@paralta
paralta requested a review from a team as a code owner July 6, 2026 15:22
@github-actions github-actions Bot added the size/M Denotes a PR that changes 200-999 lines label Jul 6, 2026
@paralta paralta linked an issue Jul 6, 2026 that may be closed by this pull request
2 tasks
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.77778% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/catalog/v1/catalog.go 31.6% 26 Missing ⚠️
server/database/gorm/catalog.go 71.4% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

}

let colorClass = $derived(severityColorClass(scan.maxSeverity));
let label = $derived(scan.isSafe ? 'Security Scanned' : 'Issues Found');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we maybe have this card display something like:

Security Posture: No issues found or Security Posture: X issues found

the other part is that it looks a bit strange the title of the card like: Security scanned Security Scan Results. This would be nicer a bit more unified like above

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me improve this, agreed 👍 the MCP behaviour scanner does not return findings (just safe or not safe) so Security Posture: X issues found is not a good fit here.

Comment on lines +38 to +40
{#if scanManifest}
<ScanBadge scan={scanManifest} />
{/if}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we put this below instead or below the stars/rating? seems too packed as part of the title

we can use the footer of the card on the dashboard to put extra things like security, metrics, and other details

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My plan was to add the badge close to the trusted badge, but it turned out a bit bloated indeed

Comment thread api/catalog/v1/catalog.go Outdated
entry.Metadata = make(map[string]*structpb.Value)
}

entry.Metadata["scanManifest"] = val

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the metadata keys per AI catalog spec require a bit more specific prefix to indicate the protocol that is injecting it. i would maybe consider having something like the protobuf name here of the object, ie. agntcy.dir.security.v1.ScanResult

@ramizpolic ramizpolic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread api/catalog/v1/catalog.go
Comment on lines +71 to +76
type ScanReportSummary interface {
GetScannerType() string
GetIsSafe() bool
GetMaxSeverity() string
GetUpdatedAt() time.Time
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have the reason for the severities?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scanners currently return a list of raw findings which might lead to an extensive text for a new reason field, which would be hard to visualise in this UI. Check the skill example at #1757 (comment).

Signed-off-by: Catarina Paralta <clouropa@cisco.com>
@paralta

paralta commented Jul 7, 2026

Copy link
Copy Markdown
Member Author
Screenshot 2026-07-07 at 15 41 42 Screenshot 2026-07-07 at 15 41 50 Screenshot 2026-07-07 at 15 44 50

@ramizpolic wdyt about these updates?

@ramizpolic

Copy link
Copy Markdown
Member

@paralta looks better! my slight concern is that it may get mixed up with verifiable status

for next iteration, we can include a filter in the search like include=security-details to include the messages as well since right now we can not inspect the details of the security scan, but its enough for v1

@paralta
paralta merged commit 063133b into main Jul 8, 2026
181 of 188 checks passed
@paralta
paralta deleted the feat/security-ui branch July 8, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 200-999 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: AI Finder UI with scanned badge and findings

2 participants