Wiz
Port's Wiz integration allows you to model Wiz resources in your context lake and ingest data into them.
Prerequisites
Wiz restricts its API documentation to authenticated users. Sign in to the Wiz documentation portal to access it.
Wiz Credentials
You will need the following connection details to configure Wiz:
- Wiz API URL (API Endpoint URL)
- Wiz Token URL
There are two possible endpoints depending on your service account's identity provider:- Amazon Cognito: https://auth.app.wiz.io/oauth/token
- Auth0:
https://auth.wiz.io/oauth/token
- Client ID and Client Secret
-
Find Your Wiz API URL:
-
Login to Wiz account.
-
Click the User Profile icon available at the top right of the screen and click the User Settings option.
-
Click the Tenant option from the left options menu.
-
The system displays the API Endpoint URL.
-
Copy and save the API URL to use while configuring the Wiz integration.
-
-
Get the Client ID and Client Secret
You must create a service account in Wiz to generate the Client ID and Client Secret. Follow the below steps to get the Client ID and Client Secret:
-
Login to Wiz with the Project Admin role.
-
Click the Settings icon available at the top-right of the page.
-
On the Settings page, Click Service Accounts from the left menu.
-
Create a Service Account:
- Click Add Service Account.
- Provide a descriptive Service Account Name.
- Type: Select Custom Integration (GraphQL API).
- Project: Choose the relevant project(s).
- API Scopes: Select only the
read:projects,read:issues,read:vulnerabilities,read:inventoryandread:sbom_artifactspermissions. - Click Add Service Account at the bottom of the page to save.
-
Retrieve Credentials: Wiz will display your Client ID and Client Secret.
-
Save Credentials: Copy and store them securely for use in Port.
-
Setup
Choose your preferred installation method below. Not sure which to pick? See the installation methods overview.
The prerequisites required for installation are listed below.
-
Go to the Wiz Connectors page in Port.
-
Under
Select your installation method, chooseHosted by Port. -
Configure the
Installation parametersandAdvanced configurationas you wish (see below for details).
Installation parameters
Each integration requires specific parameters (such as an API token, a URL, etc.), as seen in Port's UI when installing it. Hover over the ⓘ icon next to each parameter to see more details about it.
Advanced configuration
- During the installation process each integration may have additional settings under the
Advanced configurationsection in Port's UI. Additionally, each integration has one or more settings that can be configured after installation. To do so, click on the integration's name in the Connectors page and navigate to theSettingtab. Hover over the ⓘ icon next to each setting to see more details about it.
Port secrets
Some integration settings require sensitive pieces of data, such as tokens. For these settings, Port secrets will be used, ensuring that your sensitive data is encrypted and secure.
When filling in such a setting, its value will be obscured (shown as ••••••••).
For each such setting, Port will automatically create a secret in your organization.
To see all secrets in your organization, follow these steps.
Port source IP addresses
When using this installation method, Port will make outbound calls to your 3rd-party applications from static IP addresses. You may need to add these addresses to your allowlist, in order to allow Port to interact with the integrated service:
- Europe (EU):
54.73.167.226,63.33.143.237,54.76.185.219 - United States (US):
3.234.37.33,54.225.172.136,3.225.234.99
-
Go to the Wiz Connectors page in the Port app.
-
Select the
Self-hostedmethod. -
A
helmcommand will be displayed, with default values already filled out (e.g. your Port client ID, client secret, etc). Copy the command, replace the placeholders with your values, then run it in your terminal to install the integration.
Live event support
Currently, live events are not supported for this integration.
Resyncs will be performed periodically (with a configurable interval), or manually triggered by you via Port's UI.
Therefore, real-time events (including GitOps) will not be ingested into Port immediately.
Live events support for this integration is WIP and will be supported in the near future.
The resync interval can be configured using the scheduledResyncInterval parameter. See the optional parameters section below for more details.
Scalable mode for large integrations
If you are deploying the integration at scale and want to decouple the resync process from the live events process (recommended for large or high-throughput environments), you can enable scalable mode by adding the following flags to your Helm install command:
--set workload.kind="CronJob" \
--set workload.cron.resyncTimeoutMinutes=60 \
--set scheduledResyncInterval="'*/60 * * * *'" \
--set liveEvents.worker.enabled=true
Required parameters:
port.clientId- Your Port client ID.port.clientSecret- Your Port client secret.port.baseUrl- Your Port API URL (https://api.port.iofor EU,https://api.us.port.iofor US).integration.identifier- A unique identifier for your integration.integration.type- The integration type.integration.eventListener.type- The event listener type.integration.secrets.wizClientId- The Wiz Client ID.integration.secrets.wizClientSecret- The Wiz Client Secret.integration.config.wizApiUrl- The Wiz API URL.integration.config.wizTokenUrl- The Wiz Token Authentication URL.
Optional parameters (click to expand)
integration.config.appHost- The host of the Port Ocean app. Used to set up the integration endpoint as the target for webhooks created in Wiz.integration.secret.wizWebhookVerificationToken- This is a password you create, that is used to verify webhook events to Port.scheduledResyncInterval- The number of minutes between each resync.initializePortResources- Whentrue, the integration will create default blueprints and the port App config mapping.sendRawDataExamples- Whentrue, sends raw data examples from the third-party API to Port for testing and managing the integration mapping.
Recommended resource sizes
To ensure optimal performance and avoid out-of-memory (OOM) errors, we recommend the following resources for this integration:
- CPU Limit:
800m - CPU Request:
100m - Memory Limit:
1Gi - Memory Request:
1Gi
Set resource values
helm install my-integration port-labs/port-ocean \
# ... other parameters
--set resources.limits.cpu=800m \
--set resources.limits.memory=1Gi \
--set resources.requests.cpu=100m \
--set resources.requests.memory=1Gi
- GitHub
- Jenkins
- Azure DevOps
- GitLab
- Go to the Wiz Connectors page in the Port app.
- Under Select your installation method, choose your desired CI/CD platform.
- Copy the workflow and replace the placeholders with your values.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a GitHub Actions secret |
|---|---|---|---|
port_client_id | Your Port client ID (How to get the credentials). | ✓ | ✓ |
port_client_secret | Your Port client secret (How to get the credentials). | ✓ | ✓ |
port_base_url | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
wiz_client_id | The Wiz Client ID. | ✓ | ✓ |
wiz_client_secret | The Wiz Client Secret. | ✓ | ✓ |
wiz_api_url | The Wiz API URL (e.g. https://api.us17.app.wiz.io/graphql). | ✓ | ✗ |
wiz_token_url | The Wiz Token URL (e.g. https://auth.app.wiz.io/oauth/token). | ✓ | ✗ |
initialize_port_resources | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
integration_identifier | The identifier of the integration that will be installed. | ✗ | ✗ |
send_raw_data_examples | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Your Jenkins agent must be able to run Docker commands.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a Jenkins credential (Secret Text) |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | The Wiz Client ID. | ✓ | ✓ |
OCEAN__ | The Wiz Client Secret. | ✓ | ✓ |
OCEAN__ | The Wiz API URL (e.g. https://api.us17.app.wiz.io/graphql). | ✓ | ✗ |
OCEAN__ | The Wiz Token URL (e.g. https://auth.app.wiz.io/oauth/token). | ✓ | ✗ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Here is an example for a Jenkinsfile pipeline file:Jenkins pipeline (click to expand)
Prerequisites
- Your Azure Devops agent should be able to run docker commands. Learn more about agents here.
- You must have permissions to create and manage Azure DevOps variable groups for storing credentials.
Set up your credentials
- Create a Variable Group: Name it port-ocean-credentials.
- Store the required variables (see the table below).
- Authorize Your Pipeline:
-
Go to "Library" -> "Variable groups."
-
Find port-ocean-credentials and click on it.
-
Select "Pipeline Permissions" and add your pipeline to the authorized list.
-
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as an Azure DevOps pipeline variable |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | The Wiz Client ID. | ✓ | ✓ |
OCEAN__ | The Wiz Client Secret. | ✓ | ✓ |
OCEAN__ | The Wiz API URL (e.g. https://api.us17.app.wiz.io/graphql). | ✓ | ✗ |
OCEAN__ | The Wiz Token URL (e.g. https://auth.app.wiz.io/oauth/token). | ✓ | ✗ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Here is an example for a azure-pipeline.yml pipeline file:Azure pipeline (click to expand)
- Go to the Wiz Connectors page in the Port app.
- Under Select your installation method, choose your desired CI/CD platform.
- Copy the workflow and replace the placeholders with your values.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a GitLab CI/CD variable |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | The Wiz Client ID. | ✓ | ✓ |
OCEAN__ | The Wiz Client Secret. | ✓ | ✓ |
OCEAN__ | The Wiz API URL (e.g. https://api.us17.app.wiz.io/graphql). | ✓ | ✗ |
OCEAN__ | The Wiz Token URL (e.g. https://auth.app.wiz.io/oauth/token). | ✓ | ✗ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Configuration
Port integrations use a YAML mapping block to ingest data from the third-party api into Port.
The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.
Default mapping configuration
This is the default mapping configuration for this integration:
Default mapping configuration (click to expand)
createMissingRelatedEntities: true
deleteDependentEntities: true
resources:
- kind: project
selector:
query: 'true'
port:
entity:
mappings:
blueprint: '"wizProject"'
identifier: .id
title: .name
properties:
archived: .archived
businessUnit: .businessUnit
description: .description
- kind: issue
selector:
query: 'true'
port:
entity:
mappings:
blueprint: '"wizIssue"'
identifier: .id
title: .entitySnapshot.name + " | " + .entitySnapshot.type
properties:
url: .id as $id | "https://app.wiz.io/issues#~(issue~'" + $id + ")"
status: .status
severity: .severity
vulnerabilityType: .type
notes: .notes
wizIssueID: .entitySnapshot.id
cloudResourceType: .entitySnapshot.type
resourceName: .entitySnapshot.name
cloudPlatform: .entitySnapshot.cloudPlatform
linkToResource: if .entitySnapshot.cloudProviderURL == "" then null else .entitySnapshot.cloudProviderURL end
cloudResourceID: .entitySnapshot.providerId
cloudRegion: .entitySnapshot.region
resourceGroupExternalId: .entitySnapshot.resourceGroupExternalId
subscriptionExternalId: .entitySnapshot.subscriptionExternalId
subscriptionName: .entitySnapshot.subscriptionName
subscriptionTags: .entitySnapshot.subscriptionTags
resourceTags: .entitySnapshot.tags
vulnerability: .entitySnapshot
createdAt: .createdAt
updatedAt: .updatedAt
statusChangedAt: .statusChangedAt
resolvedAt: .resolvedAt
relations:
projects: .projects | map(.id)
serviceTickets: .serviceTickets[].externalId
control: .sourceRule.id
- kind: control
selector:
query: 'true'
port:
entity:
mappings:
blueprint: '"wizControl"'
identifier: .id
title: .name
properties:
controlDescription: .controlDescription
resolutionRecommendation: .resolutionRecommendation
- kind: serviceTicket
selector:
query: 'true'
port:
entity:
mappings:
blueprint: '"wizServiceTicket"'
identifier: .externalId
title: .name
properties:
url: .url
- kind: vulnerability-finding
selector:
query: 'true'
port:
entity:
mappings:
blueprint: '"wizVulnerabilityFinding"'
identifier: .id
title: .name
properties:
status: .status
severity: .severity
categories: .categories
version: .version
score: .score
description: .description
detailedName: .detailedName
artifactMetadata: .artifactType
remediation: .remediation
detectionMethod: .detectionMethod
environments: .environments
link: .link
portalUrl: .portalUrl
origin: .origin
vulnerabilityExternalId: .vulnerabilityExternalId
CVEDescription: .CVEDescription
hasFix: .hasFix
hasExploit: .hasExploit
isHighProfileThreat: .isHighProfileThreat
updatedAt: .updatedAt
resolvedAt: .resolvedAt
firstDetectedAt: .firstDetectedAt
publishedDate: .publishedDate
rootComponent: .rootComponent
applicationServices: .applicationServices
relations:
projects: .projects | map(.id)
- kind: repository
selector:
query: 'true'
port:
entity:
mappings:
blueprint: '"wizRepository"'
identifier: .id
title: .name
properties:
url: .url
platform: .platform
public: .public
archived: .archived
visibility: .visibility
organization: .organization.id
branches: .branches | map(.id)
relations:
projects: .projects | map(.id)
- kind: technology
selector:
query: 'true'
port:
entity:
mappings:
blueprint: '"wizTechnology"'
identifier: .id
title: .name
properties:
description: .description
categories: .categories | map(.name)
usage: .usage
status: .status
risk: .risk
note: .note
ownerName: .ownerName
businessModel: .businessModel
popularity: .popularity
projectCount: .projectCount
codeRepoCount: .codeRepoCount
isCloudService: .isCloudService
supportedOperatingSystems: .supportedOperatingSystems
- kind: hosted-technology
selector:
query: 'true'
port:
entity:
mappings:
blueprint: '"wizHostedTechnology"'
identifier: .id
title: .name
properties:
detectionMethods: .detectionMethods
installedPackages: .installedPackages
firstSeen: .firstSeen
updatedAt: .updatedAt
cpe: .cpe
relations:
technology: .technology.id
Monitoring and sync status
To learn more about how to monitor and check the sync status of your integration, see the relevant documentation.
Mapping & selectors per resource
Use the explorer below to view sample payloads and the resulting Port entities for each resource type. For additional resources and advanced configurations, see the examples page.
- kind: project
selector:
query: 'true'
port:
entity:
mappings:
blueprint: '"wizProject"'
identifier: .id
title: .name
properties:
archived: .archived
businessUnit: .businessUnit
description: .description
{
"id": "d6ac50bb-aec0-52fc-80ab-bacd7b02f178",
"name": "Project1",
"isFolder": false,
"archived": false,
"businessUnit": "Dev",
"description": "Test project"
}
{
"identifier": "d6ac50bb-aec0-52fc-80ab-bacd7b02f178",
"title": "Project1",
"blueprint": "wizProject",
"team": [],
"icon": "NewRelic",
"properties": {
"archived": false,
"businessUnit": "Dev",
"description": "Test project"
},
"createdAt": "2024-2-6T09:30:57.924Z",
"createdBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW",
"updatedAt": "2024-2-6T11:49:20.881Z",
"updatedBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW"
}
Below are the supported selectors for this resource. Use them under the selector key in your integration mapping configuration to control which resources are returned from the API.
| Selector | Type | Description |
|---|---|---|
exportEnvVariables | array | Environment variable names whose values should be included in lakehouse ingest payloads for DSP processing. |
impact | string | The business impact of the project. If empty, all projects are fetched. |
includeArchived | boolean | Include archived projects. False by default. |
Examples
To view and test the integration's mapping against examples of the third-party API responses, use the jq playground in your connectors page. Find the integration in the list of connectors and click on it to open the playground.
Examples of blueprints and the relevant integration configurations can be found on the Wiz examples page.