feat(scan-all): allow scheduling scans for selected projects or repositories#22392
feat(scan-all): allow scheduling scans for selected projects or repositories#22392SoumyaRaikwar wants to merge 6 commits intogoharbor:mainfrom
Conversation
|
@SoumyaRaikwar, thanks for your contribution! because it involves much of code change in Harbor, could you please raise a proposal in github.com/goharbor/community? |
stonezdj
left a comment
There was a problem hiding this comment.
could you please add your proposal in github.com/goharbor/community
|
Hi @stonezdj, Thank you for the feedback! I've submitted the design proposal to the community repository as requested: Proposal PR: Add proposal for selective scan-all scope The proposal includes:
I'll wait for the community review and approval before proceeding with any further changes to this implementation PR. |
|
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
|
This PR was closed because it has been stalled for 30 days with no activity. If this PR is still relevant, please re-open a new PR against main. |
…an-All-Scope header; propagate scope into execution and filter artifacts by project IDs or repositories; add simple UI to choose projects for schedule Signed-off-by: SoumyaRaikwar <somuraik@gmail.com>
…der sends repositories if chosen Signed-off-by: SoumyaRaikwar <somuraik@gmail.com>
…2322 by importing the local app Project model instead of the swagger-generated Project type. The ProjectService returns the app model (creation_time: string | Date), which mismatched the swagger model (creation_time: string). This unblocks Angular build for the selective scan scope UI. Signed-off-by: SoumyaRaikwar <somuraik@gmail.com>
Signed-off-by: Soumya Raikwar <164396577+SoumyaRaikwar@users.noreply.github.com>
Signed-off-by: SoumyaRaikwar <somuraik@gmail.com>
27863b9 to
665193f
Compare
|
@stonezdj , @Vad1mo
I've also ensured the changes are backward compatible; if the header is missing, the scan defaults to the global behavior. I've implemented the changes in the working PR including the backend logic and the UI coverage. Here are the mockups/screenshots of the UI implementation as requested: |
|
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
|
This PR was closed because it has been stalled for 30 days with no activity. If this PR is still relevant, please re-open a new PR against main. |

This PR adds selective scoping to scheduled “Scan All” executions so admins can target only the artifacts they care about. The backend now accepts an optional X-Scan-All-Scope header on schedule create/update that limits the scan set by either:
When the header is present, the scan-all execution enumerates only matching artifacts; when omitted, behavior remains unchanged and all artifacts are scanned (backward compatible).
Portal updates: in Interrogation Services > Vulnerability, users can select projects and optionally load and multi-select repositories before saving the schedule; the chosen scope is sent via X-Scan-All-Scope. A small TS fix switches the Project import to the local app model to resolve a type mismatch and ensure a successful Angular build.
Notes/limits:
Build status:
Related issue