Skip to content

fix: make scan task assets traceable in the UI - #335

Merged
klboke merged 4 commits into
mainfrom
feat/scan-task-asset-traceability
Sep 23, 2026
Merged

klboke merged 4 commits into
mainfrom
feat/scan-task-asset-traceability

Conversation

@klboke

@klboke klboke commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Scan tasks currently expose only an internal asset ID, so operators cannot identify the artifact or open it from the task list. Add the asset path beside the ID and link it to Repository Browser, preserving group/member context and using the existing projected and Docker manifest paths.

Asset metadata is resolved in batches from shared persistence. Unresolvable or deletion-nulled asset references display “Asset unavailable”; unrelated repository assets are not resolved. Existing deletion semantics clear the asset foreign key, so this change does not preserve historical asset coordinates after deletion. Update the English/Chinese operator guides and refresh admin asset cache versions.

Related to #328.

Validation:

  • Final commit 7382720d: CI, MySQL/PostgreSQL persistence and server smoke checks, CodeQL, and Codecov all passed. All modified coverable lines are covered; project coverage is 86.27%.
  • Confirmed the numeric-only task rendering in v1.0.2 and current main; the new UI regression suite fails on the old implementation and passes with the fix (5 tests).
  • Passed 67 focused Maven tests, including 58 management service/controller tests and 9 admin UI tests; the JavaScript wrapper runs the 5 UI behavioral tests.
  • Coverage includes batched lookup/pagination, deleted and asset-less tasks, visible group-only access, selected group context, unrelated assets, Docker manifest browse paths, URL encoding, and HTML escaping.
  • Passed the complete admin-ui suite (41 Maven tests), including the updated asset cache version contracts.
  • Checked a Chrome rendering fixture with the actual task renderer and CSS, including long Docker paths and missing assets.

Command: mvn -B -ntp -pl server -am '-Dtest=SecurityScanManagementService*Test,SecurityScanManagementControllerTest,AdminSecurityScanningCapabilityContractTest,SecurityScanTasksJavascriptTest' -Dsurefire.failIfNoSpecifiedTests=false test

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-23T10:56:38.632575Z ad7c77a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.27%. Comparing base (bc59bf6) to head (ad7c77a).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #335   +/-   ##
=========================================
  Coverage     86.27%   86.27%           
+ Complexity     1449     1448    -1     
=========================================
  Files           800      800           
  Lines         83668    83699   +31     
  Branches      14694    14706   +12     
=========================================
+ Hits          72181    72213   +32     
+ Misses        11487    11486    -1     
Flag Coverage Δ
server-smoke-mysql 13.38% <0.00%> (+0.01%) ⬆️
server-smoke-postgresql 13.39% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77b3ac868d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread admin-ui/src/main/resources/META-INF/resources/admin/assets/admin.js Outdated
@klboke
klboke merged commit 7be463b into main Sep 23, 2026
38 checks passed
@klboke
klboke deleted the feat/scan-task-asset-traceability branch September 23, 2026 12:03
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