Skip to main content

ValidateContent

Supported versions

Supported Cortex XSOAR versions: 5.5.0 and later.

Runs validation and linting using the Demisto SDK on content items, such as integrations, automations and content packs. This automation script is used as part of the content validation that runs as part of the contribution flow.

Script Data#


NameDescription
Script Typepython3
Demisto Version5.5.0

Inputs#


Argument NameDescription
filenameName of the file to validate.
dataBase64 encoded contents of the file to validate.
entry_idID of War Room file entry for the ZIP content pack or the integration/automation YAML.
use_system_proxyUse system proxy settings to download required models from GitHub.
trust_any_certificateTrust any certificate (not secure) to download required models from GitHub.

Outputs#


PathDescriptionType
ValidationResult.NameName of validated item.String
ValidationResult.ErrorThe validation error message.String
ValidationResult.LineThe code line number in which the error was found in the lint.String

Script Example#

!ValidateContent entry_id=G2SUaH9ZPmfw7QHWQNk2pa@6

Context Example#

{
"ValidationResult": [
{
"Name": "MyScript",
"Error": "The docker image tag is not the latest numeric tag, please update it."
},
{
"Name": "MyScript",
"Error": "test for membership should be 'not in'",
"Line": "44"
}
]
}

Human Readable Output#

Validation Results#

NameErrorLine
MyScriptThe docker image tag is not the latest numeric tag, please update it.
MyScripttest for membership should be 'not in'44