Managing portfolios
Portfolios home page is the central place for managers and tech leads to monitor the releasability of projects under their supervision.
This feature is only available in the Enterprise plan.
Releasability is based on the projects’ quality gates included in your portfolio. Each portfolio home page offers an aggregate view of the releasability status of all projects in the portfolio. See Viewing portfolios for more information.
Permissions
To manage a portfolio, you will need at least Edit permissions granted by the portfolio’s administrator. See Administering portfolios for more details.
Creating a portfolio
You can create a portfolio if you have the Create Portfolio permission enabled. See Create Portfolios permission for more details.
Select My Portfolios in the top navigation bar and select the enterprise to which you want to add a new portfolio.
Select Create portfolio on the Portfolios home page to start the portfolio creation wizard.

You can also create a portfolio by selecting the ‘+’ sign at the top right of the page.
Portfolio creation wizard
The wizard takes you through 4 steps of the portfolio creation process and the system automatically saves the information you have entered when you go to the next step. You can find the draft portfolios on the Portfolios home page and resume the process in case you get interrupted.

The portfolio creation process consists of the following steps:
Add details: Choose the enterprise where the portfolio will reside if you have permission to more than one enterprise. Then, enter the portfolio name and description.
Add projects: From the How do you want to add projects? dropdown menu choose projects either:
By name: This option shows the list of organizations and projects associated with them. Select the projects and choose the project’s branch you want to include in the portfolio.
By tags: Select existing tags by which you want to query projects and define the project branch to add to the portfolio. If you choose a branch other than the main branch, you need to specify the branch’s name.
By regular expression (RegEx) using project keys: Write RegEx to query the project by project key and define the project branch to add to the portfolio. If you choose a branch other than the main branch, you need to specify the branch’s name.
By organization: Select the organizations and define the project’s branch to include in the portfolio. If you choose a branch other than the main branch, you need to specify the branch’s name.
Set permissions: Add portfolio Administer, Edit, and View permissions to specific groups and users or apply a permission template.
Review: Take a final look at all the portfolio details and select Complete to finalize the process.
Once the portfolio is created, it will be populated with ratings for Releasability, Security, Reliability, Maintainability, and Security Review.
Ensuring a reliable security report
To ensure a reliable security report, check that the relevant security rules are activated in your quality profiles for projects you have included in your portfolio. For instance, if no rule corresponding to a given OWASP category is activated in your quality profile, you won’t get Security issues or Security Hotspots linked to that specific category in the OWASP report. See Checking the security rules included in a project’s quality profile for more information.
Defining a portfolio with regular expressions (RegEx)
Following are some examples of RegEx that may help you write your own RegEx and retrieve matches against project keys.
Selects all projects with a key that includes “python”:
.*python.*
Selects all projects with a key that starts with “sonar”:
^sonar.*
Selects all projects with a key that ends with “-scanner”:
.*-scanner$
For more information about how to write regular expressions, see regex101.com
Editing a portfolio
With the Edit permission on a portfolio, you can add and remove projects from it. Note that you don’t add a project, but a long-lived branch of a project. Currently, you can only add a single branch per project.

Proceed as follows:
In the top navigation bar, go to My Portfolios and select your enterprise from the drop-down menu.
On the Portfolios home page, select the portfolio you want to edit.
Go to Settings > Portfolio Definition.
Select Edit selection.
From a list of organizations and projects to which you have permissions, select projects to include or exclude from the portfolio. Alternatively, use the search field to find projects by name.
If the selected project contains several long-lived branches, select the branch to be added. By default, the main branch is selected.
Select Save.
Deleting a portfolio
With the Edit permission on a portfolio, you can remove it from the system.
In the top navigation bar, go to My Portfolios and select your enterprise from the drop-down menu.
Select the portfolio you want to remove.
Go to Settings > Delete portfolio.
Portfolio recomputation
The following events will trigger the recalculation of a portfolio:
When a project within the portfolio has a new analysis.
If a project is removed from an organization within the enterprise.
When an organization is removed from the enterprise.
For information on how ratings are calculated, see Understanding measures and metrics for more information.
Related pages
Introduction to Getting started with Enterprise
Last updated
Was this helpful?