-
Notifications
You must be signed in to change notification settings - Fork 5k
feat(scan-all): allow scheduling scans for selected projects or repositories #22392
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
base: main
Are you sure you want to change the base?
feat(scan-all): allow scheduling scans for selected projects or repositories #22392
Conversation
…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 <[email protected]>
…der sends repositories if chosen Signed-off-by: SoumyaRaikwar <[email protected]>
…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 <[email protected]>
@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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add your proposal in github.com/goharbor/community
Signed-off-by: Soumya Raikwar <[email protected]>
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 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