Use an On-Premises Code Scanner to Scan Bitbucket Server IaCs
You can connect your Bitbucket repositories to an On-Premise code scanner and scan your code for violations. Perform the following tasks to connect your Bitbucket repositories to an on-premises scanner:
-
Authorize the on-premise code scanner to access Bitbucket Server.
-
Connect an IaC from Bitbucket Server to Tenable Cloud Security project.

-
Launch the URL displayed in the output of the on-premise code scanner deployment. For more information, see Deploy an On-Premises Code Scanner.
The On Premise Scanner Management Console page appears. You can now authorize the on-premise code scanner with different Source Code Management (SCM) providers.
-
In the Configure servers section, provide the following:
-
In the Repository Server Address box, type the repository server address.
-
In the On-premise code scanner address (use port:9020) box, type the code scanner address.
-
-
Click Continue.
The Configure cloud (Optional) section appears.
-
(Optional) In the Select cloud provider drop-down box, select one of the following options:
-
AWS
-
In the AWS Access Key box, type the AWS access key.
-
In the AWS Secret Key box, type the AWS secret key.
-
-
GCP
-
Click Upload to upload your service account credentials file.
-
-
Azure
-
In the Azure Client ID box, type the Azure client ID.
-
In the Azure Tenant ID box, type the Azure tenant ID.
-
In the Azure Subscription ID box, type the Azure subscription ID.
-
In the Azure Client Secret box, type the Azure client secret.
-
-
- Click Continue.
The Setup authentication section appears.
-
In the Select repository server drop-down box, select Bitbucket.
Tenable Cloud Security displays an information form for Bitbucket. - Provide the following:
In the Personal Access Token box, type the personal access token. For more information about how to obtain the personal access token, see To create a personal access token in Bitbucket Server:
Click Submit.
-
(Optional) In the Other Settings section, click the Allow on-premise code scanner to send logs to Tenable Cloud Security toggle.
Tenable Cloud Security redirects you to the Bitbucket Enterprise server to authorize the permissions on the OAuth Application. A message confirms successful authorization and Bitbucket redirects you to the On-premise code scanner page.

-
In the left navigation bar, click the
icon.
-
Click Connection > Repository.
The Connect to repository page appears. - In the Choose a workflow to discover repo(s) section, select Version control.
- Click Continue.
The Connect to a version control provider section appears.
-
In the Connect to a version control provider section, select Bitbucket and On-premise Code Scanner.
- Click Continue.
The Choose onboarding repositories section appears.
-
Select the required repository.
-
Hover over the selected repository and click
to configure the advanced settings.
For more information, see Repository Configuration Parameters.
- Click Continue.
The Choose projects to add the repository to section appears.
-
Select the project that you want to connect to the repository.
-
Click Connect.
A message confirms that Tenable Cloud Security connects the Bitbucket IaC repository to the selected project.