goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
24.22k stars 4.77k forks source link

Enhancement: add support for configuring new Trivy environment variables via harbor.yml #21193

Open quent1-fr opened 1 week ago

quent1-fr commented 1 week ago

This update allows Harbor administrators to configure two new Trivy environment variables directly through the harbor.yml configuration file:

This enhancement simplifies Trivy configuration when using mirrors of vulnerability repositories.

MinerYang commented 4 days ago

Hi @quent1-fr ,

Thanks for your contribution and please help to rebase the RP. thx~

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.09%. Comparing base (c8c11b4) to head (0af2129). Report is 332 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/goharbor/harbor/pull/21193/graphs/tree.svg?width=650&height=150&src=pr&token=6SOPrJGDVW&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goharbor)](https://app.codecov.io/gh/goharbor/harbor/pull/21193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goharbor) ```diff @@ Coverage Diff @@ ## main #21193 +/- ## =========================================== + Coverage 45.36% 66.09% +20.72% =========================================== Files 244 1049 +805 Lines 13333 114654 +101321 Branches 2719 2867 +148 =========================================== + Hits 6049 75783 +69734 - Misses 6983 34732 +27749 - Partials 301 4139 +3838 ``` | [Flag](https://app.codecov.io/gh/goharbor/harbor/pull/21193/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goharbor) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/goharbor/harbor/pull/21193/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goharbor) | `66.09% <ø> (+20.72%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goharbor#carryforward-flags-in-the-pull-request-comment) to find out more. [see 1288 files with indirect coverage changes](https://app.codecov.io/gh/goharbor/harbor/pull/21193/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goharbor)

🚨 Try these New Features: