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

  1. Complete Bitbucket Server integration authentication.

  2. Aqua opens the Repository Selection wizard.

  3. By default, active code repositories (recent commits) may be pre-selected.

  4. 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.

  5. 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

  1. In the wizard, deselect repositories that are out of scope.

  2. Select only repositories you intend to license (for example ACS project repos).

  3. Click Start Scanning to enqueue only the checked repositories.

After unintended onboarding

  1. Open Code Repositories in the SCS UI.

  2. Remove repositories that should not be licensed.

  3. Confirm Auto Scan New (or equivalent automatic onboarding of newly discovered repos) is disabled so future discoveries are not auto-queued.

  4. 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

  1. Repository count in Aqua matches licensed intent (for example ACS-only).

  2. Auto Scan New is off if policy requires manual onboarding.

  3. New Bitbucket repos created after integration do not appear until manually added.

  4. 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