-
Notifications
You must be signed in to change notification settings - Fork 86
Feat/proposal selective scan all scope #267
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/proposal selective scan all scope #267
Conversation
Add design proposal to enable selective scoping for scheduled "Scan All" executions in Harbor. This proposal introduces an optional X-Scan-All-Scope header that allows administrators to limit scheduled vulnerability scans to specific projects or repositories instead of scanning all artifacts. Key features: - Optional X-Scan-All-Scope header for schedule create/update - Support for project_ids and repositories scope definitions - Backward compatible implementation with no schema changes - UI enhancements for project/repository selection - Maintains existing behavior when scope is not specified This addresses community issue #22266 and provides a resource-efficient approach for large Harbor installations that need targeted scanning. Signed-off-by: Your Name <your.email@example.com>
Signed-off-by: Soumya Raikwar <164396577+SoumyaRaikwar@users.noreply.github.com>
|
@stonezdj , @Vad1mo @AllForNothing , could you please review my proposal |
|
I like the idea, but I don't think this is the right approach to implementing it. especially the X-Scan-All-Scope header
Following criteria come into my mind:
|
|
@Vad1mo This proposal was intended as a small, incremental improvement to the existing scheduled “Scan All” feature with minimal surface-area change and full backward compatibility. I see scoped scheduling as a possible stepping stone, not an alternative to scan policies. I’m happy to adjust the proposal based on the preferred direction. Also, I’ll make sure to update the documentation clearly describing the behavior, limitations, and intended scope of this feature. Please let me know whether you’d prefer this to remain a short-term improvement or be reworked into a policy-based design. |
|
Let's do it right in policy fashion, with backwards compatibility. |
|
@Vad1mo i have updated the pr goharbor/harbor#22392 could you please review |
|
Thanks @Vad1mo for the feedback! Valid point regarding the policy-based approach. We can certainly iterate towards a more robust policy engine in the future. However, given the immediate need to resource optimization in large installations, this "selective scope" acts as a lightweight, backward-compatible interim solution that fits within the current scheduling architecture without a major refactor. 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: |

Summary
Add design proposal to enable selective scoping for scheduled "Scan All" executions in Harbor. This proposal introduces an optional
X-Scan-All-Scopeheader that allows administrators to limit scheduled vulnerability scans to specific projects or repositories instead of scanning all artifacts.Background
Addresses community issue https://github.com/goharbor/harbor/issues/22266 where users requested granular control over scan scope to reduce unnecessary scanning and optimize resource usage in large Harbor installations.