This guide is for your Bitbucket Server/Atlassian Stash admin to set up FOSSA On-Prem's access to your internal code. Note: This was written for Bitbucket Server v4.0.6+
You first need to add an application link so that users with a login on Bitbucket Server can view their projects through FOSSA.
Navigate to your local Bitbucket Server > Settings > Application Links.
Create an Application Link to FOSSA's internal IP
Fill in "fossa" for all options:
Go to the new link and Edit > Incoming Authentication
Fill in the following settings and hit "Save" (leaving the rest blank):
Now users can successfully connect their Bitbucket Server accounts with FOSSA.
FOSSA currently requires a companion bot account on your Bitbucket Server instance with global
read access to analyze all internal repositories. This will be replaced in future updates, but is currently required for FOSSA to fetch code.
fossabot user to Bitbucket Server
Go to Settings > Accounts > Users > Create User.
For username/password, use the
bitbucket__credentials config in FOSSA's
config.env (default below):
fossabot has global read access
fossabot needs to be able to clone any repository in your instance of Bitbucket Server. The easiest way of doing this is giving the account admin privelages in Settings > Accounts > Global Permissions:
If you need to custom-configure a role for
fossabot, make sure the account still has global read afterwards (i.e. try cloning repos across different projects as
Now you should be all set up! Users on FOSSA should be able browse and import their repositories on Bitbucket Server through Bulk Import.
NOTE: fossabot is not accessible to average users of FOSSA, but serves as an internal proxy for FOSSA to fetch code. Normal users will only be able to browse and import what they have access to normally through Bitbucket Server.
After importing, automatic updates need to be configured manually in two places for each imported project.
On FOSSA via Project > Settings > Update Hooks, select "Select Update Method...", choose
Webhook and hit Save Changes.
On Bitbucket Server, install (if not done already) the webhooks module and enable them on each imported project. View guide here.
Copy & Paste Webhook Update URL from the first step to the webhooks in Bitbucket under Post-Receive Webhooks > Enable.
If you have any problems, contact support at email@example.com. This guide was written for Bitbucket Server v4.0.6+.