Bitbucket
Bitbucket Integration
Pensar Console integrates with Bitbucket Cloud to scan and secure your repositories. The integration uses OAuth to provide secure access to your Bitbucket workspace.
Prerequisites
Before connecting Bitbucket, ensure you have:
- A Bitbucket account with access to the repositories you want to scan
- Admin access to the Bitbucket workspace you want to connect
Connecting Bitbucket
From Workspace Settings
- Navigate to Settings → Integrations → Source control in your Pensar Console workspace
- Find the Bitbucket row
- Click Connect
- Enter your Bitbucket workspace slug in the form (find it in your Bitbucket URL:
bitbucket.org/<workspace-slug>/…), then click Connect to Bitbucket - You’ll be redirected to Bitbucket’s authorization page
- Review the permissions and click Grant access
- You’ll be automatically redirected back to Pensar Console
The workspace slug is required before the OAuth redirect — it tells Pensar which Bitbucket workspace to clone repositories from.
From Onboarding
When creating a new workspace, you can connect Bitbucket during the onboarding process by clicking Connect your Bitbucket workspace, entering your workspace slug, and following the same steps.
Pensar will automatically set up webhooks in your Bitbucket workspace to receive notifications about repository events.
Permissions
When you authorize Pensar, the following permissions are granted:
Adding Repositories
After connecting Bitbucket, attach repositories directly to your workspace:
- Go to Attack Surface → Repositories in Pensar Console
- Click Add repository
- Your Bitbucket repositories appear in the picker — select one or more
- Click Attach & continue
Each repository you attach is connected to the workspace and recon / attack-surface analysis launches automatically — there is no separate project to create.
Managing the Integration
Viewing Connection Status
- Navigate to Settings → Integrations → Source control
- Find the Bitbucket row
- If connected, you’ll see a confirmation with your workspace name
Unlinking Bitbucket
To remove the Bitbucket integration:
- Navigate to Settings → Integrations → Source control
- Find the Bitbucket row
- Click Unlink
Unlinking Bitbucket will prevent Pensar from scanning Bitbucket repositories. Any repositories attached to your workspace from Bitbucket will no longer be able to perform scans.
Troubleshooting
Authorization Failed
If the OAuth authorization fails:
- Ensure you have admin access to the Bitbucket workspace
- Double-check the workspace slug you entered matches your Bitbucket URL
- Try clearing your browser cache and cookies
- Attempt the connection again from Settings → Integrations → Source control
Repositories Not Appearing
If your repositories don’t appear in the Add repository picker:
- Verify you have at least read access to the repositories in Bitbucket
- Check that the correct workspace is connected
- Try refreshing the page
Webhook Issues
If you’re not receiving real-time updates:
- Navigate to your Bitbucket workspace settings
- Go to Webhooks
- Verify a Pensar webhook exists and is active
- If the webhook is missing, disconnect and reconnect the integration
Need Help?
If you encounter issues setting up your Bitbucket integration, please contact our support team at team@pensar.dev.