Prisma Cloud (CNAPP) Executor¶
Category: Cloud Security
Script: prisma_cloud.py
Integration: REST API
Faraday Plugin: Raw JSON
Website: https://www.paloaltonetworks.com/prisma/cloud
Description¶
Imports cloud security alerts from Prisma Cloud (Palo Alto Networks) into Faraday. Each alert becomes a [CNAPP] vulnerability, grouped under a host that represents the affected cloud resource.
Prerequisites¶
- A Prisma Cloud tenant with API access
- A Prisma Cloud access key (key ID and secret) of a service account that can read alerts, policies and cloud accounts
- Network access from the agent to the Prisma Cloud API URL of your tenant
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
PRISMA_HOST |
Yes | Prisma Cloud API URL for your tenant's region (e.g., https://api.prismacloud.io, https://api2.prismacloud.io or https://api.eu.prismacloud.io). If you omit the scheme, https:// is used. |
PRISMA_USERNAME |
Yes | Access key ID |
PRISMA_PASSWORD |
Yes | Access key secret |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
PRISMA_ACCOUNT_GROUP |
string | No | Name of a Prisma Cloud account group to import. If empty, all groups visible to the service account are imported. |
PRISMA_MIN_SEVERITY |
string | No | Minimum severity to import: info, low, medium, high or critical (default: info) |
PRISMA_STATUS |
string | No | Comma-separated alert statuses to import: OPEN, RESOLVED, DISMISSED or SNOOZED (default: all). Common synonyms such as CLOSED or IGNORED are mapped to these values. |
YAML Configuration Example¶
executors:
prisma_cloud:
repo_executor: prisma_cloud.py
max_size: 65536
varenvs:
PRISMA_HOST: "https://api.prismacloud.io"
PRISMA_USERNAME: "<access_key_id>"
PRISMA_PASSWORD: "<access_key_secret>"
params:
PRISMA_ACCOUNT_GROUP:
mandatory: false
type: string
base: string
PRISMA_MIN_SEVERITY:
mandatory: false
type: string
base: string
PRISMA_STATUS:
mandatory: false
type: string
base: string
How It Works¶
- Logs in with
POST /loginusing the access key, and sends the returned token in thex-redlock-authheader. The token is renewed if it expires during a long run. - Searches alerts with
POST /alert, 100 per page, sorted by last seen, filtered by status, severity and account group - Loads policy details (
GET /v2/alert/policy) and cloud accounts (GET /cloud) to add remediation text and account names - Maps each alert to a Faraday vulnerability:
- Name:
[CNAPP]followed by the policy name and the affected resource - Severity: the policy severity, or the CVSS score when the severity is missing
- Status:
OPENbecomes open,RESOLVEDbecomes closed,DISMISSEDandSNOOZEDbecome risk-accepted - Details: cloud account, region, resource, CVEs, references and the policy recommendation
- Name:
- Groups the vulnerabilities under one host per cloud resource
Notes¶
- The alert search covers only the last 24 hours (alerts with activity in the last day). The executor has no setting to change this window.
- Hosts use IP
0.0.0.0, because Prisma Cloud findings belong to cloud resources and not to IP addresses. The hostname is<resource name>@<resource id>. - An unrecognized
PRISMA_MIN_SEVERITYfalls back toinfo, and unrecognizedPRISMA_STATUSvalues are ignored. Both cases are written to the agent log. - TLS certificate verification is disabled for requests to the API.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor. UsePRISMA_MIN_SEVERITYto filter by severity.