Cortex connects to many third-party vendors whose system interfaces frequently change. As a result, integration behavior or configuration steps may shift without notice. If you encounter unexpected issues, check with your system administrator or refer to the vendor’s documentation for the most current information. Additionally, integration sync times vary and are subject to scheduling overrides and timing variance.
Connecting an entity to Apiiro
Before Cortex can show Apiiro risks on an entity, the entity needs to be connected to an application or repository in Apiiro. Cortex connects entities to Apiiro repositories automatically when their repository paths match. To connect an entity to an application, or to a repository whose path doesn’t match, map it in the entity’s YAML. This page explains both methods and how to confirm that an entity is connected.Importing entities from Apiiro
The Apiiro integration doesn’t import entities into Cortex. It adds security risk data to entities that already exist in your catalog. To add entities to Cortex, see Adding entities.Connecting entities automatically
If an entity has a git repository and nox-cortex-apiiro block, Cortex connects it to any Apiiro repository with the same path.
Cortex compares the repository path from the entity’s x-cortex-git block (for example, my-org/my-service) to the repository paths in Apiiro. Keep these rules in mind:
- Matches are exact. Matching is case-sensitive, and Cortex doesn’t normalize spaces or punctuation.
My-Org/My-Servicedoesn’t matchmy-org/my-service. - Only paths are compared. Cortex doesn’t match on repository URLs, repository IDs, entity names, or Cortex tags.
- Every match is kept. If more than one Apiiro repository has the same path, Cortex connects the entity to all of them.
- Applications aren’t matched automatically. To connect an entity to an Apiiro application, map it manually.
Automatic matching requires a git repository on the entity. Entities without an
x-cortex-git block only connect to Apiiro through manual mapping.Connecting entities manually
Add anx-cortex-apiiro block to an entity’s YAML to connect it to specific Apiiro repositories or applications. Use manual mapping when:
- You want to connect an entity to an Apiiro application.
- The entity’s repository path doesn’t exactly match the path in Apiiro.
- The entity doesn’t have a git repository in Cortex.
Mapping an entity in its YAML
- In Apiiro, find each repository or application you want to connect to the entity. For a repository, you can use either its ID or its path (e.g.
my-org/my-service). For an application, you need its ID. - In Cortex, navigate to the entity’s YAML:
- From the main sidebar, expand Catalogs, then select All entities.
- Do one of the following:
- Select the All tab to search and filter across all of your organization’s entities.
- Select the Mine tab to search and filter only the entities you own.
- Note that Cortex saves your selection and restores it the next time you open this page.
- Select your entity.
- From the entity’s left sidebar, select Entity YAML.
- In the upper-right corner, click Configure entity.
- Add an
x-cortex-apiiroblock. You can list repositories, applications, or both. Set each entry’saliasto the alias of your Apiiro configuration in Cortex. - Click Save changes.
Field reference
You can include
repositories, applications, or both. If an entity has neither, Cortex uses automatic matching.
How repository and application mappings differ
Both types of mapping show risks in the same places: the Code & security block on the entity’s overview page, andapiiro.risks() in CQL. The difference is which risks Cortex pulls in:
- Repository mapping - Cortex shows only the risks in that repository.
- Application mapping - Cortex shows every risk Apiiro associates with that application, which can span multiple repositories.
The Code & security block only appears if the entity has at least one risk. If the entity is connected but has no risks, the block doesn’t appear.
Using multiple configurations
If you have more than one Apiiro configuration in Cortex (for example, one for each Apiiro instance), one entity can connect to repositories and applications under different aliases. Cortex pulls risks from each configuration, then combines the results and removes duplicates.Verifying the connection
After an entity is connected, check that its Apiiro data appears in Cortex:- On the entity’s details page - Risks appear in the Code & security block on the overview, grouped by severity. For the full list, go to Security > Apiiro in the entity’s sidebar.
The Code & security block only appears if the entity has at least one risk. If the entity is connected but has no risks, the block doesn’t appear.
- With CQL - Run
apiiro != nullin the Query builder - US / Query builder - EU to find entities that are connected to Apiiro. Entities that don’t appear in the results aren’t connected.