CheckContextValue

This script checks that a context key exists (and contains data), and optionally checks the value of the context key for a match against an input value. If a regex is not supplied, the script checks that the key is not empty. This script can be used with the "GenericPolling" playbook to poll for field population or that a field contains a specific value. This scripts does not support a context key which holds a list of values.

python · Common Scripts

Details

IDCheckContextValue
Languagepython
From Version6.0.0
Docker Imagedemisto/python3:3.12.13.10404775
Tagsevaluation polling

README

This script checks that a context value exists (and contains data), and optionally checks the value of the key for a match against an input value. This script can be used with the “GenericPolling” playbook to poll for field population or that a field contains a specific value.

Script Data


Name Description
Script Type python3
Tags evaluation, polling
Cortex XSOAR Version 5.0.0

Inputs


Argument Name Description
key The key to check (can contain. ex: key1.key2.key3)
regex The regex pattern to check the field for. (optional).
ignore_case Whether character matching will be case-insensitive. Default is “False”.

Outputs


Path Description Type
CheckContextKey.name Key Name string
CheckContextKey.exists.exists Whether the Key Exists. Unknown
args:
- description: 'The context key to check (can contain ".", e.g: My.Context.Path).'
  name: key
  required: true
- description: The regex pattern to check the field for (optional).
  name: regex
- auto: PREDEFINED
  defaultValue: "False"
  description: Whether character matching will be case-insensitive.
  name: ignore_case
  predefined:
  - "True"
  - "False"
comment: This script checks that a context key exists (and contains data), and optionally checks the value of the context key for a match against an input value. If a regex is not supplied, the script checks that the key is not empty. This script can be used with the "GenericPolling" playbook to poll for field population or that a field contains a specific value. This scripts does not support a context key which holds a list of values.
commonfields:
  id: CheckContextValue
  version: -1
dockerimage: demisto/python3:3.12.13.10404775
enabled: true
name: CheckContextValue
outputs:
- contextPath: CheckContextKey.name
  description: Key Name.
  type: string
- contextPath: CheckContextKey.exists
  description: Whether the Key Exists.
  type: Unknown
runas: DBotWeakRole
script: ''
scripttarget: 0
subtype: python3
tags:
- evaluation
- polling
type: python
fromversion: 6.0.0
tests:
- No tests (auto formatted)