Policies
APIs for managing policies
Retrieves a list of all Application Security policies. You can filter the results by finding types, actions, status, triggers, and custom policy flag.
Required license:
Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.
Current status of the policy.
enabledPossible values: Filter by custom policies (true) or system-provided policies (false)
{api_key}
your_api_key_here{api_key_id}
1Ok
The date and time when the policy was created
Unique identifier for the suggested policy
Description of the policy
Unique identifier for the policy
Name of the policy
The date and time when the policy was deleted
The user or system that deleted the policy
List of related detection rules
List of asset groups to which the policy applies. If the array is empty, the policy applies to all asset groups.
Unique identifier for the suggested policy
The user or system that created the policy
The date and time when the policy was last modified
Indicates if the policy is cloneable
Indicates if the policy is a custom policy or a system-provided policy
Indicates if the policy is editable
The date and time when the policy was last triggered
The user or system that last modified the policy
Set the severity of the issue and override the system severity. If not used, system severity is kept.
Indicates the policy type. Auto-assigned by the API based on the Finding Type in conditions. Possible values:
code_image_scanners: for VULNERABILITY, IAC_MISCONFIGURATION, SECRETS, CODE_WEAKNESS, LICENSES, OPERATIONAL_RISK, MALWAREcicd_configuration_scanners: for CICD_RISKSdrift_detection_scanners: for DRIFT
Current status of the policy.
enabledPossible values: The version of the policy - goes up by one every policy update
GET /public_api/appsec/v1/policies HTTP/1.1
Host: api-yourfqdn
Authorization: your_api_key_here
x-xdr-auth-id: 1
Accept: */*
Ok
[
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Block Build and Pull Request on Valid secrets",
"description": "Block Build and Pull Request on Valid secrets in public repository",
"status": "disabled",
"isCustom": false,
"triggers": {
"periodic": {
"isEnabled": false,
"actions": {
"reportIssue": false
}
},
"pr": {
"isEnabled": true,
"actions": {
"reportIssue": false,
"reportPrComment": false,
"blockPr": true
}
},
"cicd": {
"isEnabled": true,
"actions": {
"reportIssue": false,
"reportCicd": false,
"blockCicd": true
}
},
"ciImage": {
"isEnabled": false,
"actions": {
"reportIssue": false,
"reportCicd": false,
"blockCicd": false
}
},
"imageRegistry": {
"isEnabled": false,
"actions": {
"reportIssue": false
}
}
},
"isClonable": true,
"isEditable": false,
"policyType": "code_image_scanners",
"conditions": {
"AND": [
{
"SEARCH_FIELD": "Finding Type",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "SECRETS"
},
{
"SEARCH_FIELD": "Secret Validity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "VALID"
}
]
},
"relatedDetectionRules": [],
"scope": {
"AND": [
{
"SEARCH_FIELD": "is_public_repository",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": true
}
]
},
"createdBy": "system",
"modifiedBy": null,
"deletedBy": null,
"version": 1,
"assetGroupIds": []
}
]Creates a new Application Security policy.
An application security policy defines how a system responds to application security threats. Each policy consists of Conditions, Scope, Triggers, and Actions.
Triggers determine the execution context, such as a Pull Request, CI pipeline, registry scan, or periodic code scan, while Actions are executed only when both the Condition and Scope criteria are met.
Actions can include generating a remediation issue for detection or actively blocking threats within the PR or CI workflow.
Note: To block threats in the CI workflow, you must integrate the Cortex CLI into your pipeline.
Required license:
Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.
Limitations
Be aware of the following limitations when creating policies:
Trigger and Action Constraints by Finding Type
Code & Image scanners Finding Types (for example,
IAC_MISCONFIGURATION,SECRETS,VULNERABILITY,LICENSES,OPERATIONAL_RISK,CODE_WEAKNESS, andMALWARE)For scope filters, only the following parameters are supported:
Category
Asset Type
Provider
Business Application Names
Application Business Criticality
Application Business Owner
Tags
Image Names
Source Branch
Repository Name
Repository Id
Is Public Repository
Has Deployed Assets
Has Internet-exposed deployed assets
Has deployed assets with Access to sensitive data
Has deployed assets with privileged capabilities
Repository labels
Image Architecture
Organization URL
The
categoryparameter only supportsApplication,Container ImageandRepositoryvalues.Setting the
overrideIssueSeverityparameter is mandatory whenciImageorimageRegistryactions are enabled.
CI/CD Risks Finding Type (
CICD_RISKS)Only the Code Periodic Scan trigger is supported.
Only the reportIssue action is available.
For conditions, the
categoryparameter supports only the following values:Category
Application
CI/CD Instance
CI/CD Pipeline
VCS Collaborator
VCS Organization
For scope filters, only the following parameters are supported:
Asset Type
Provider
Tags
Business Application Names
Application Business Criticality
CI/CD Instance Name
CI/CD Instance Id
CI/CD Pipeline Name
CI/CD Pipeline Id
VCS Collaborator Name
VCS Collaborator Email
VCS Collaborator MFA Enabled
VCS Collaborator Last Observed
VCS Organization Name
Repository Name
Repository Id
Is Public Repository
Drift Finding Type (
DRIFT)Only the Code Periodic Scan trigger is supported.
Only the reportIssue action is available.
For conditions, the
categoryparameter only supportsApplicationandRepositoryvalues.For scope filters, only the following parameters are supported:
Category
Provider
Business Application Names
Application Business Criticality
Application Business Owner
Cloud Account
Cloud Region
Repository Name
Repository Id
Is Public Repository
Has Deployed Assets
Has Internet-exposed deployed assets
Has deployed assets with Access to sensitive data
Has deployed assets with privileged capabilities
General Policy Constraints
Third-Party Integration Data
For ingested data from third-party integrations:
Only the periodic scan trigger is supported, along with the
ingestedDataaction that must be explicitly configured.
Multiple Finding Types in Conditions
When selecting multiple
Finding Typevalues within a single condition, only common filters across those types are available.To use filters specific to a
Finding Type, add another condition group that is separated by the OR operator.
Condition and Scope Depth
The UI supports up to 2 levels of depth for conditions and scope.
The API allows up to 10 levels of depth for more complex policy configurations.
Scope vs. Asset Groups
You must define either a scope (detailed asset filters) or specify assetGroupIds, but not both in the same policy.
If both fields are defined (contain values), then only the assetGroupIds will be applied and the scope will be ignored.
Empty Results during Configuration
Conditionsandscopefilters may return empty results during policy configuration.Policies can still be saved for future use.
Once the policies are active, they will evaluate the conditions and trigger defined actions if matching results are found.
{api_key}
your_api_key_here{api_key_id}
1Define the Application Security policy.
Notes:
- The
policyTypefield is auto-assigned by the API based on theFinding Typein conditions, it is not set in the request body. - The
conditionsandscopefields are required. Thescopecan be set to{}for global scope."
A brief description of the AppSec policy's purpose.
A unique name for the AppSec policy.
Whether the policy is enabled upon creation.
A list of asset group IDs that the policy should apply to. If the list is empty, the policy applies globally, unless other scope conditions are defined.
Note : Cannot be used with the scope parameter.
Unique identifier for the suggested policy to link this policy to.
Asset group IDs representing the user's scoped-based access control (SBAC) permissions at the time the policy is created. Controls which asset groups the policy applies to based on the creator's access. When empty, the policy applies to all user scoped asset groups.
No content
No content
Bad Request
The error occurs when the server cannot process the request due to client-side errors in the request body. The error is returned when:
- Required fields are missing
- Field values are invalid (for example, incorrect
SEARCH_TYPEfor the givenSEARCH_FIELD) - The JSON request body is not structured properly (invalid payload structure)
Conflict.
Resolution
Use a unique policy name that does not match any existing policy.
Internal Server Error
POST /public_api/appsec/v1/policies HTTP/1.1
Host: api-yourfqdn
Authorization: your_api_key_here
x-xdr-auth-id: 1
Content-Type: application/json
Accept: */*
Content-Length: 1103
{
"name": "Critical vulnerabilities in code deployed to internet-exposed assets",
"description": "Detects critical and high-severity vulnerabilities on deployed assets with internet exposure.",
"conditions": {
"AND": [
{
"SEARCH_FIELD": "Finding Type",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "VULNERABILITY"
},
{
"OR": [
{
"SEARCH_FIELD": "Severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "CRITICAL"
},
{
"SEARCH_FIELD": "Severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "HIGH"
}
]
}
]
},
"scope": {
"AND": [
{
"SEARCH_FIELD": "has_internet_exposed",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": true
}
]
},
"assetGroupIds": [],
"triggers": {
"periodic": {
"isEnabled": true,
"actions": {
"reportIssue": true
}
},
"pr": {
"isEnabled": true,
"actions": {
"reportIssue": true,
"blockPr": true,
"reportPrComment": true
},
"overrideIssueSeverity": null
},
"cicd": {
"isEnabled": true,
"actions": {
"reportIssue": true,
"blockCicd": true,
"reportCicd": true
},
"overrideIssueSeverity": null
},
"ciImage": {
"isEnabled": false,
"actions": {
"reportIssue": false,
"blockCicd": false,
"reportCicd": false
},
"overrideIssueSeverity": null
},
"imageRegistry": {
"isEnabled": false,
"actions": {
"reportIssue": false
},
"overrideIssueSeverity": null
}
}
}No content
Retrieves detailed information for a specific Application Security policy using its unique policy ID.
Required license:
Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.
Unique identifier for the policy
1db58e20-9e73-498d-8faa-99936e26934c{api_key}
your_api_key_here{api_key_id}
1Ok
The date and time when the policy was created
Unique identifier for the suggested policy
Description of the policy
Unique identifier for the policy
Name of the policy
The date and time when the policy was deleted
The user or system that deleted the policy
List of related detection rules
List of asset groups to which the policy applies. If the array is empty, the policy applies to all asset groups.
Unique identifier for the suggested policy
The user or system that created the policy
The date and time when the policy was last modified
Indicates if the policy is cloneable
Indicates if the policy is a custom policy or a system-provided policy
Indicates if the policy is editable
The date and time when the policy was last triggered
The user or system that last modified the policy
Set the severity of the issue and override the system severity. If not used, system severity is kept.
Indicates the policy type. Auto-assigned by the API based on the Finding Type in conditions. Possible values:
code_image_scanners: for VULNERABILITY, IAC_MISCONFIGURATION, SECRETS, CODE_WEAKNESS, LICENSES, OPERATIONAL_RISK, MALWAREcicd_configuration_scanners: for CICD_RISKSdrift_detection_scanners: for DRIFT
Current status of the policy.
enabledPossible values: The version of the policy - goes up by one every policy update
GET /public_api/appsec/v1/policies/{policyId} HTTP/1.1
Host: api-yourfqdn
Authorization: your_api_key_here
x-xdr-auth-id: 1
Accept: */*
Ok
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Image scan policy with all triggers",
"description": "Detects vulnerabilities, secrets, and malware with CI Image Scan and Registry Image Scan triggers enabled.",
"status": "enabled",
"isCustom": true,
"triggers": {
"periodic": {
"isEnabled": false,
"overrideIssueSeverity": null,
"actions": {
"reportIssue": false
}
},
"pr": {
"isEnabled": false,
"overrideIssueSeverity": null,
"actions": {
"reportIssue": false,
"reportPrComment": false,
"blockPr": false
}
},
"cicd": {
"isEnabled": false,
"overrideIssueSeverity": null,
"actions": {
"reportIssue": false,
"reportCicd": false,
"blockCicd": false
}
},
"ciImage": {
"isEnabled": true,
"overrideIssueSeverity": "Medium",
"actions": {
"reportIssue": true,
"reportCicd": false,
"blockCicd": true
}
},
"imageRegistry": {
"isEnabled": true,
"overrideIssueSeverity": "Low",
"actions": {
"reportIssue": true
}
}
},
"isClonable": true,
"isEditable": true,
"policyType": "code_image_scanners",
"conditions": {
"OR": [
{
"AND": [
{
"SEARCH_FIELD": "Finding Type",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "SECRETS"
},
{
"SEARCH_FIELD": "Severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "CRITICAL"
}
]
},
{
"AND": [
{
"SEARCH_FIELD": "Finding Type",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "VULNERABILITY"
},
{
"SEARCH_FIELD": "Severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "HIGH"
}
]
},
{
"AND": [
{
"SEARCH_FIELD": "Finding Type",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "MALWARE"
}
]
}
]
},
"relatedDetectionRules": [],
"scope": {},
"dateCreated": "2025-06-15T09:30:00.000Z",
"createdBy": "API Token 1",
"dateModified": "2025-06-15T09:30:00.000Z",
"modifiedBy": "API Token 1",
"deletedBy": null,
"version": 1,
"assetGroupIds": []
}Updates an existing Application Security policy by policy ID. Use this endpoint to modify the policy’s Conditions, Scope, Triggers or Actions.
Note: To block threats in the CI workflow, you must integrate the Cortex CLI into your pipeline.
Required license:
Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.
Unique identifier for the policy
1db58e20-9e73-498d-8faa-99936e26934c{api_key}
your_api_key_here{api_key_id}
1A unique name for the AppSec policy.
A brief description of the AppSec policy's purpose.
List of related detection rules.
Whether the policy is enabled.
Unique identifier for the suggested policy.
List of asset groups to which the policy applies. If the array is empty, the policy applies to all asset groups.
Asset group IDs representing the user's scoped-based access control (SBAC) permissions at the time the policy is modified. Controls which asset groups the policy applies to based on the modifier's access. When empty, the policy applies to all asset groups.
No content
No content
Unprocessable Entity
PUT /public_api/appsec/v1/policies/{policyId} HTTP/1.1
Host: api-yourfqdn
Authorization: your_api_key_here
x-xdr-auth-id: 1
Content-Type: application/json
Accept: */*
Content-Length: 999
{
"name": "Updated policy name",
"description": "Updated policy description",
"conditions": {
"AND": [
{
"SEARCH_FIELD": "Finding Type",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "VULNERABILITY"
},
{
"OR": [
{
"SEARCH_FIELD": "Severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "CRITICAL"
},
{
"SEARCH_FIELD": "Severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "HIGH"
}
]
}
]
},
"scope": {
"AND": [
{
"SEARCH_FIELD": "has_deployed_assets",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": true
}
]
},
"triggers": {
"periodic": {
"isEnabled": true,
"actions": {
"reportIssue": true
},
"overrideIssueSeverity": "High"
},
"pr": {
"isEnabled": true,
"actions": {
"reportIssue": true,
"blockPr": true,
"reportPrComment": true
},
"overrideIssueSeverity": null
},
"cicd": {
"isEnabled": true,
"actions": {
"reportIssue": true,
"blockCicd": false,
"reportCicd": true
},
"overrideIssueSeverity": null
},
"ciImage": {
"isEnabled": false,
"actions": {
"reportIssue": false,
"blockCicd": false,
"reportCicd": false
},
"overrideIssueSeverity": null
},
"imageRegistry": {
"isEnabled": false,
"actions": {
"reportIssue": false
},
"overrideIssueSeverity": null
}
}
}No content
Deletes an Application Security policy by its policy ID.
Required license:
Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.
Unique identifier for the policy
1db58e20-9e73-498d-8faa-99936e26934c{api_key}
your_api_key_here{api_key_id}
1Ok
DELETE /public_api/appsec/v1/policies/{policyId} HTTP/1.1
Host: api-yourfqdn
Authorization: your_api_key_here
x-xdr-auth-id: 1
Accept: */*
Ok
{
"message": "Policy 'd4e5f6a7-b8c9-0123-def0-1234567890ab' was successfully deleted"
}Last updated
Was this helpful?
