Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generate SBOM feature #20251

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Conversation

stonezdj
Copy link
Contributor

@stonezdj stonezdj commented Apr 9, 2024

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #(issue)

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@stonezdj stonezdj requested a review from a team as a code owner April 9, 2024 03:39
@stonezdj stonezdj changed the title 24mar28 add SBOM scan [WIP] add SBOM scan Apr 9, 2024
@stonezdj stonezdj added the release-note/new-feature New Harbor Feature label Apr 9, 2024
Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.10%. Comparing base (b7b8847) to head (10dd4cd).
Report is 139 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #20251       +/-   ##
===========================================
- Coverage   67.56%   46.10%   -21.47%     
===========================================
  Files         991      246      -745     
  Lines      109181    13565    -95616     
  Branches     2719     2781       +62     
===========================================
- Hits        73768     6254    -67514     
+ Misses      31449     6995    -24454     
+ Partials     3964      316     -3648     
Flag Coverage Δ
unittests 46.10% <ø> (-21.47%) ⬇️

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

see 1237 files with indirect coverage changes

@stonezdj stonezdj force-pushed the 24mar28_add_sbom_scan branch 7 times, most recently from 459625f to a77403d Compare April 14, 2024 01:12
@stonezdj stonezdj changed the title [WIP] add SBOM scan Add generate SBOM feature Apr 14, 2024
@stonezdj stonezdj force-pushed the 24mar28_add_sbom_scan branch 2 times, most recently from 30fc819 to 7d278d8 Compare April 15, 2024 06:15
src/common/rbac/project/rbac_role.go Show resolved Hide resolved
src/common/rbac/project/rbac_role.go Show resolved Hide resolved
src/controller/artifact/controller.go Outdated Show resolved Hide resolved
src/pkg/scan/sbom/sbom.go Outdated Show resolved Hide resolved
src/pkg/scan/job.go Outdated Show resolved Hide resolved
src/go.sum Outdated Show resolved Hide resolved
@@ -38,7 +38,14 @@ func GetScanHandler(requestType string) Handler {

// Handler handler for scan job, it could be implement by different scan type, such as vulnerability, sbom
type Handler interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO, refactor this interface, it's now acts as a facade, rather than a interface.

@stonezdj stonezdj force-pushed the 24mar28_add_sbom_scan branch 3 times, most recently from 4b21645 to 83a9cbe Compare April 16, 2024 08:59
Copy link
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

  Add scan handler for sbom
  Delete previous sbom accessory before the job service

Signed-off-by: stonezdj <daojunz@vmware.com>
@stonezdj stonezdj enabled auto-merge (squash) April 16, 2024 12:59
@stonezdj stonezdj merged commit 654aa8e into goharbor:main Apr 16, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/new-feature New Harbor Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants