Exclude one or more CVEs from Saner VM results for a given scope and duration.
This covers CVEs in Saner VM. To exclude a patch or an application from Saner PM instead, use Exclude Patch/Asset; the two share one endpoint but take different item types and reason values.
Excludes a vulnerability from remediation and visibility based on the specified scope. This API allows administrators to create exclusion policies for vulnerabilities (CVEs) when visibility or remediation is not required, not applicable, risk accepted or temporarily deferred. Exclusions can be applied at the account, group, or device level. Exclusions are enforced for the defined duration and automatically removed once the exclusion period expires.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| account_name | Name of the account where the exclusion policy is applied | Yes | string |
| policy_name | Name of the exclusion policy | Yes | string |
| item_type | Type of vulnerability identifier (e.g., CVE) | Yes | string |
| items | List of vulnerability identifiers to exclude | Yes | array |
| days | Number of days the exclusion remains active | Yes | string |
| reason | Reason for exclusion (e.g., RISK_ACCEPTED, NOT_APPLICABLE, DEFERRED) | Yes | string |
| desc | Description of the exclusion policy | No | string |
| comments | Additional comments related to the exclusion policy | No | string |
| scopeType | Scope level where exclusion applies (account, group, or device) | Yes | string |
| selectedScopeItems | List of specific scope items (such as group names or device identifiers) | Yes | array |
| module_type | Module type where exclusion applies (e.g., VM) | Yes | string |
Python SDK code
Install:
pip install secpod-saner-sdkCall this endpoint:
from saner.cvem import CvemClient
client = CvemClient(
api_key="<YOUR_API_KEY>",
accountid="<YOUR_ACCOUNT_ID>",
base_url="https://saner.secpod.com"
)
response=client.Vulnerability.exclude(
account_name="Default",
policy_name="policy001",
item_type="CVE",
items=["CVE-2023-5167","CVE-2022-351"],
scopeType="group",
selectedScopeItems=["debian12"],
module_type="VM",
days="1",
reason="NA"
)
print(response)
client.close()Requires Python 3.9 or later.