Skip to content

feat(ui): show scan progress - #1642

Merged
scttbnsn merged 1 commit into
dev/v1.9from
feat/v1.9-scan-progress
Nov 19, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.9from
feat/v1.9-scan-progress

Conversation

@scttbnsn

Copy link
Copy Markdown
Contributor

Long security scans looked like nothing was happening. This adds two signals.

  • Heartbeat: while a scanner command runs (Trivy, Grype, Syft or Cosign), runCommand logs still scanning <image> (<n>s) every 30 seconds. It stops on success, failure, timeout and abort. The Trivy DB warm-up names the command, since it has no image.
  • Scanning state: while a scan for a container runs, the container reports securityScanState: 'scanning' in the API and in dd:container-updated SSE events, so a page loaded mid-scan sees it too. It's an in-memory refcount per container, so concurrent scans of the same container are fine and a restart starts clean. The scheduled, bulk and on-demand scans all set and clear it.

The UI reuses the existing "Scanning" chip, which until now only lit up from the scan-started event, so there are no new locale keys. State changes go straight to SSE clients rather than the internal event bus. Otherwise every scan would look like a container lifecycle change to the audit log, MQTT, Prometheus and agents.

Scans of a candidate update image don't mark the running container, because they describe the new image, and the update flow already shows its own scanning phase. A container that's being rescanned keeps counting as scanned, so the dashboard security counts don't flicker.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3be373d and 0a3755a.

Files ignored due to path filters: 1

  • CHANGELOG.md is excluded by !CHANGELOG.md
Files selected for processing: 22

  • app/api/container/bulk-security.test.ts
  • app/api/container/bulk-security.ts
  • app/api/container/security.test.ts
  • app/api/container/security.ts
  • app/api/container/shared.test.ts
  • app/api/container/shared.ts
  • app/api/sse.test.ts
  • app/api/sse.ts
  • app/security/scan-state.test.ts
  • app/security/scan-state.ts
  • app/security/scan.test.ts
  • app/security/scan.ts
  • app/security/scheduler.test.ts
  • app/security/scheduler.ts
  • content/docs/current/configuration/security/index.mdx
  • ui/src/types/container.d.ts
  • ui/src/utils/container-mapper.ts
  • ui/src/utils/dashboard-container-metrics.ts
  • ui/src/views/containers/useContainerActions.ts
  • ui/tests/utils/container-mapper.spec.ts
  • ui/tests/utils/dashboard-container-metrics.spec.ts
  • ui/tests/views/containers/useContainerActions.spec.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Scanner and cosign commands log still scanning every 30 seconds until they exit, fail or time out. A container carries a transient, in-memory securityScanState of scanning while a scheduled, on-demand or bulk scan of it runs, announced through the existing container-updated SSE event and shown as the Scanning chip in the list.
@scttbnsn
scttbnsn force-pushed the feat/v1.9-scan-progress branch from a16c66e to 0a3755a Compare November 19, 2026 15:07
@scttbnsn
scttbnsn merged commit 56c89ff into dev/v1.9 Nov 19, 2026
33 checks passed
@scttbnsn
scttbnsn deleted the feat/v1.9-scan-progress branch November 19, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant