Supply Chain Security – Bitbucket Server Onboarding and Limiting Scanned Repositories
Overview
After integrating Bitbucket Server with Aqua Supply Chain Security (SCS), the Repository Selection wizard may enqueue scans for many repositories at once, even when only a subset (for example all repos in an ACS project) should consume licenses. Default selection favors active repositories (commits in the last three months), and completing authentication can add repositories to the scan queue before you click Start Scanning.
This article explains the onboarding flow, how to scan only chosen repositories, and how to stop unwanted repositories from reappearing.
Expected Onboarding Flow
Complete Bitbucket Server integration authentication.
Aqua opens the Repository Selection wizard.
By default, active code repositories (recent commits) may be pre-selected.
Repositories can be added to the scan queue as part of this stage without a separate Start Scanning click in some flows—behavior can look like “automatic” scanning of everything.
To onboard only specific repositories: clear unwanted selections, check only required repos, then click Start Scanning.
Symptoms
All or most Bitbucket repos appear in Code Repositories and consume repository licenses.
Deleting repos from Aqua does not stop new repos from appearing while onboarding behavior or auto-discovery is active.
License limit (for example 100 repositories) is exceeded during testing.
Limit Scans to Required Repositories
During initial onboarding
In the wizard, deselect repositories that are out of scope.
Select only repositories you intend to license (for example ACS project repos).
Click Start Scanning to enqueue only the checked repositories.
After unintended onboarding
Open Code Repositories in the SCS UI.
Remove repositories that should not be licensed.
Confirm Auto Scan New (or equivalent automatic onboarding of newly discovered repos) is disabled so future discoveries are not auto-queued.
Add repos intentionally later via Add New Repository when needed.
Why Repositories Keep Appearing
Cause | Mitigation |
|---|---|
Default “active repo” selection at first connect | Manually narrow selection before Start Scanning |
Ongoing scans still completing | Wait for queue to drain; then remove extras |
Auto onboarding of new repos enabled | Disable Auto Scan New; onboard manually |
Removing a repo from Aqua does not delete code in Bitbucket—it only removes the Aqua SCS binding and stops license use for that repo once cleanup completes.
Verification
Repository count in Aqua matches licensed intent (for example ACS-only).
Auto Scan New is off if policy requires manual onboarding.
New Bitbucket repos created after integration do not appear until manually added.
License dashboard reflects only onboarded repositories.
Best Practices
Pilot with a dedicated Bitbucket project before connecting organization-wide servers.
Align repository license counts with pre-selected checkboxes before Start Scanning.
Document which integration user/token scopes are required for repo enumeration.
Platform Coverage
Component: Supply Chain Security, Bitbucket Server (on-premises)
Deployment: CodeSec connector/scanner stack for on-prem SCM
Summary
Topic | Guidance |
|---|---|
Default wizard selection | Active repos (≈3 months) often pre-checked |
Start Scanning | Required to limit queue to checked repos |
Auto Scan New | Disable to prevent silent expansion |
Re-onboarding | Use Add New Repository for future repos |
Related Resources
Did you find it helpful? Yes No
Send feedback