ZTAPParseLinks

Parses ZTAP external links to display in a dynamic table.

python · Zero Trust Analytics Platform

Details

IDZTAPParseLinks
Languagepython
From Version6.0.0
Docker Imagedemisto/python3:3.12.13.10116658
Tagsztap dynamic-section

README

Parses ZTAP external links to display in a dynamic table.

Script Data


Name Description
Script Type python3
Tags ztap, dynamic-section
Cortex XSOAR Version 6.0.0

Inputs


There are no inputs for this script.

Outputs


There are no outputs for this script.

import json


def util_load_json(path):
    with open(path, encoding="utf-8") as f:
        return json.loads(f.read())


def util_load_raw(path):
    with open(path, encoding="utf-8") as f:
        return f.read()


def test_parse_links():
    from ZTAPParseLinks import parse_links

    events = util_load_json("test_data/events.json")
    output = parse_links(events)

    mock_markdown_result = util_load_raw("test_data/output.md")

    assert output == mock_markdown_result