From 8d67c07294053de9f628ac3da9f24325e80f5dfd Mon Sep 17 00:00:00 2001 From: Ian Rokas Date: Mon, 25 Aug 2025 23:24:42 +0000 Subject: [PATCH 1/3] fix: updates related to support for Python 3.13 in SOAR 7.0 - phase 1 and 2 [batch update] --- .pre-commit-config.yaml | 7 +- .pylintrc | 2 + README.md | 134 ++++++++++++++++++------------------ release_notes/unreleased.md | 1 + zscaler.json | 2 +- 5 files changed, 77 insertions(+), 69 deletions(-) create mode 100644 .pylintrc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a8df7c5..fe86072 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,6 +37,11 @@ repos: hooks: - id: djlint-reformat-django - id: djlint-django + - repo: https://github.com/phantomcyber/soar-app-linter + rev: 0.1.0 + hooks: + - id: soar-app-linter + args: ["--single-repo", "--message-level", "error"] - repo: https://github.com/hukkin/mdformat rev: 0.7.22 hooks: @@ -55,7 +60,7 @@ repos: exclude: "README.md" # Central hooks - repo: https://github.com/phantomcyber/dev-cicd-tools - rev: v2.0.4 + rev: v2.0.9 hooks: - id: build-docs language: python diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000..fcbba09 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,2 @@ +[MASTER] +ignore=.venv diff --git a/README.md b/README.md index 328cb35..a5c6135 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Zscaler -Publisher: Splunk \ -Connector Version: 3.0.0 \ -Product Vendor: Zscaler \ -Product Name: Zscaler \ +Publisher: Splunk
+Connector Version: 3.0.0
+Product Vendor: Zscaler
+Product Name: Zscaler
Minimum Product Version: 6.2.2 This app implements containment and investigative actions on Zscaler @@ -84,44 +84,44 @@ VARIABLE | REQUIRED | TYPE | DESCRIPTION ### Supported Actions -[test connectivity](#action-test-connectivity) - Validate the asset configuration for connectivity using supplied configuration \ -[get report](#action-get-report) - Fetch sandbox report for provided md5 file hash \ -[list url categories](#action-list-url-categories) - List all URL categories \ -[block ip](#action-block-ip) - Block an IP \ -[block url](#action-block-url) - Block a URL \ -[unblock ip](#action-unblock-ip) - Unblock an IP \ -[unblock url](#action-unblock-url) - Unblock a URL \ -[allow ip](#action-allow-ip) - Add an IP address to the allowlist \ -[allow url](#action-allow-url) - Add a URL to the allowed list \ -[unallow ip](#action-unallow-ip) - Remove an IP address from the allowlist \ -[unallow url](#action-unallow-url) - Remove a URL from the allowed list \ -[lookup ip](#action-lookup-ip) - Lookup the categories related to an IP \ -[lookup url](#action-lookup-url) - Lookup the categories related to a URL \ -[submit file](#action-submit-file) - Submit a file to Zscaler Sandbox \ -[get admin users](#action-get-admin-users) - Get a list of admin users \ -[get users](#action-get-users) - Gets a list of all users and allows user filtering by name, department, or group \ -[get groups](#action-get-groups) - Gets a list of groups \ -[add group user](#action-add-group-user) - Add user to group \ -[remove group user](#action-remove-group-user) - Remove user from group \ -[get allowlist](#action-get-allowlist) - Get urls on the allow list \ -[get denylist](#action-get-denylist) - Get urls on the deny list \ -[update user](#action-update-user) - Update user with given id \ -[add category url](#action-add-category-url) - Add urls to a cetgory \ -[add category ip](#action-add-category-ip) - Add IPs to a cetgory \ -[remove category url](#action-remove-category-url) - Add urls to a cetgory \ -[remove category ip](#action-remove-category-ip) - Remove IPs to a cetgory \ -[create destination group](#action-create-destination-group) - Create destination group \ -[list destination group](#action-list-destination-group) - List destination group \ -[edit destination group](#action-edit-destination-group) - Edit destination group \ -[delete destination group](#action-delete-destination-group) - Delete destination group \ -[get departments](#action-get-departments) - Get a list of departments \ +[test connectivity](#action-test-connectivity) - Validate the asset configuration for connectivity using supplied configuration
+[get report](#action-get-report) - Fetch sandbox report for provided md5 file hash
+[list url categories](#action-list-url-categories) - List all URL categories
+[block ip](#action-block-ip) - Block an IP
+[block url](#action-block-url) - Block a URL
+[unblock ip](#action-unblock-ip) - Unblock an IP
+[unblock url](#action-unblock-url) - Unblock a URL
+[allow ip](#action-allow-ip) - Add an IP address to the allowlist
+[allow url](#action-allow-url) - Add a URL to the allowed list
+[unallow ip](#action-unallow-ip) - Remove an IP address from the allowlist
+[unallow url](#action-unallow-url) - Remove a URL from the allowed list
+[lookup ip](#action-lookup-ip) - Lookup the categories related to an IP
+[lookup url](#action-lookup-url) - Lookup the categories related to a URL
+[submit file](#action-submit-file) - Submit a file to Zscaler Sandbox
+[get admin users](#action-get-admin-users) - Get a list of admin users
+[get users](#action-get-users) - Gets a list of all users and allows user filtering by name, department, or group
+[get groups](#action-get-groups) - Gets a list of groups
+[add group user](#action-add-group-user) - Add user to group
+[remove group user](#action-remove-group-user) - Remove user from group
+[get allowlist](#action-get-allowlist) - Get urls on the allow list
+[get denylist](#action-get-denylist) - Get urls on the deny list
+[update user](#action-update-user) - Update user with given id
+[add category url](#action-add-category-url) - Add urls to a cetgory
+[add category ip](#action-add-category-ip) - Add IPs to a cetgory
+[remove category url](#action-remove-category-url) - Add urls to a cetgory
+[remove category ip](#action-remove-category-ip) - Remove IPs to a cetgory
+[create destination group](#action-create-destination-group) - Create destination group
+[list destination group](#action-list-destination-group) - List destination group
+[edit destination group](#action-edit-destination-group) - Edit destination group
+[delete destination group](#action-delete-destination-group) - Delete destination group
+[get departments](#action-get-departments) - Get a list of departments
[get category details](#action-get-category-details) - Get the urls and keywords of a category ## action: 'test connectivity' Validate the asset configuration for connectivity using supplied configuration -Type: **test** \ +Type: **test**
Read only: **True** #### Action Parameters @@ -136,7 +136,7 @@ No Output Fetch sandbox report for provided md5 file hash -Type: **investigate** \ +Type: **investigate**
Read only: **True** #### Action Parameters @@ -184,7 +184,7 @@ summary.total_objects_successful | numeric | | 1 | List all URL categories -Type: **investigate** \ +Type: **investigate**
Read only: **True** #### Action Parameters @@ -221,7 +221,7 @@ summary.total_objects_successful | numeric | | 1 | Block an IP -Type: **contain** \ +Type: **contain**
Read only: **False** If a url_category is specified, it will add the IP(s) as a rule to that category. If it is left blank, it will instead add the IP(s) to the global blocklist. @@ -256,7 +256,7 @@ summary.total_objects_successful | numeric | | 1 | Block a URL -Type: **contain** \ +Type: **contain**
Read only: **False** If a url_category is specified, it will add the URL(s) as a rule to that category. If it is left blank, it will instead add the URL(s) to the global blocklist. @@ -295,7 +295,7 @@ summary.total_objects_successful | numeric | | 1 | Unblock an IP -Type: **correct** \ +Type: **correct**
Read only: **False** If a url_category is specified, it will remove the IP(s) from that category. If it is left blank, it will instead remove the IP(s) from the global blocklist. @@ -330,7 +330,7 @@ summary.total_objects_successful | numeric | | 1 | Unblock a URL -Type: **correct** \ +Type: **correct**
Read only: **False** If a url_category is specified, it will remove the URL(s) from that category. If it is left blank, it will instead remove the URL(s) from the global blocklist. @@ -369,7 +369,7 @@ summary.total_objects_successful | numeric | | 1 | Add an IP address to the allowlist -Type: **contain** \ +Type: **contain**
Read only: **False** If a url_category is specified, it will add the IP(s) as a rule to that category. If it is left blank, it will instead add this IP(s) to the global allowlist. @@ -404,7 +404,7 @@ summary.total_objects_successful | numeric | | 1 | Add a URL to the allowed list -Type: **contain** \ +Type: **contain**
Read only: **False** If a url_category is specified, it will add the URL(s) as a rule to that category. If it is left blank, it will instead add the URL(s) to the global allowed list. @@ -443,7 +443,7 @@ summary.total_objects_successful | numeric | | 1 | Remove an IP address from the allowlist -Type: **correct** \ +Type: **correct**
Read only: **False** If a url_category is specified, it will remove the IP(s) from that category. If it is left blank, it will instead remove the IP(s) from the global allowlist. @@ -478,7 +478,7 @@ summary.total_objects_successful | numeric | | 1 | Remove a URL from the allowed list -Type: **correct** \ +Type: **correct**
Read only: **False** If a url_category is specified, it will remove the URL(s) from that category. If it is left blank, it will instead remove the URL(s) from the global allowed list. @@ -513,7 +513,7 @@ summary.total_objects_successful | numeric | | 1 | Lookup the categories related to an IP -Type: **investigate** \ +Type: **investigate**
Read only: **True** #### Action Parameters @@ -541,7 +541,7 @@ summary.total_objects_successful | numeric | | 1 | Lookup the categories related to a URL -Type: **investigate** \ +Type: **investigate**
Read only: **True** #### Action Parameters @@ -569,7 +569,7 @@ summary.total_objects_successful | numeric | | 1 | Submit a file to Zscaler Sandbox -Type: **generic** \ +Type: **generic**
Read only: **False** This action requires a Sandbox Submission API token. By default, files are scanned by Zscaler antivirus (AV) and submitted directly to the sandbox in order to obtain a verdict. However, if a verdict already exists for the file, you can use the 'force' parameter to make the sandbox to reanalyze it. You can submit up to 100 files per day. @@ -604,7 +604,7 @@ summary.total_objects_successful | numeric | | 1 | Get a list of admin users -Type: **investigate** \ +Type: **investigate**
Read only: **True** #### Action Parameters @@ -653,7 +653,7 @@ summary.total_objects_successful | numeric | | 1 | Gets a list of all users and allows user filtering by name, department, or group -Type: **investigate** \ +Type: **investigate**
Read only: **True** Gets a list of all users and allows user filtering by name, department, or group. The name search parameter performs a partial match. The dept and group parameters perform a 'starts with' match. @@ -697,7 +697,7 @@ summary.total_objects_successful | numeric | | 1 | Gets a list of groups -Type: **investigate** \ +Type: **investigate**
Read only: **True** Gets a list of groups. The search parameters find matching values in the name or comments attributes. @@ -729,7 +729,7 @@ summary.total_objects_successful | numeric | | 1 | Add user to group -Type: **generic** \ +Type: **generic**
Read only: **False** Add a group to the user's profile. @@ -768,7 +768,7 @@ summary.total_objects_successful | numeric | | 1 | Remove user from group -Type: **correct** \ +Type: **correct**
Read only: **False** Remove a group from the user's profile. @@ -807,7 +807,7 @@ summary.total_objects_successful | numeric | | 1 | Get urls on the allow list -Type: **investigate** \ +Type: **investigate**
Read only: **True** #### Action Parameters @@ -830,7 +830,7 @@ summary.total_objects_successful | numeric | | 1 | Get urls on the deny list -Type: **investigate** \ +Type: **investigate**
Read only: **True** #### Action Parameters @@ -858,7 +858,7 @@ summary.total_objects_successful | numeric | | 1 | Update user with given id -Type: **correct** \ +Type: **correct**
Read only: **False** #### Action Parameters @@ -896,7 +896,7 @@ summary.total_objects_successful | numeric | | 1 | Add urls to a cetgory -Type: **generic** \ +Type: **generic**
Read only: **False** #### Action Parameters @@ -940,7 +940,7 @@ summary.total_objects_successful | numeric | | 1 | Add IPs to a cetgory -Type: **generic** \ +Type: **generic**
Read only: **False** #### Action Parameters @@ -984,7 +984,7 @@ summary.total_objects_successful | numeric | | 1 | Add urls to a cetgory -Type: **generic** \ +Type: **generic**
Read only: **False** #### Action Parameters @@ -1028,7 +1028,7 @@ summary.total_objects_successful | numeric | | 1 | Remove IPs to a cetgory -Type: **generic** \ +Type: **generic**
Read only: **False** #### Action Parameters @@ -1072,7 +1072,7 @@ summary.total_objects_successful | numeric | | 1 | Create destination group -Type: **generic** \ +Type: **generic**
Read only: **False** #### Action Parameters @@ -1117,7 +1117,7 @@ summary.total_objects_successful | numeric | | 1 | List destination group -Type: **investigate** \ +Type: **investigate**
Read only: **False** #### Action Parameters @@ -1160,7 +1160,7 @@ summary.total_objects_successful | numeric | | 1 | Edit destination group -Type: **generic** \ +Type: **generic**
Read only: **False** #### Action Parameters @@ -1207,7 +1207,7 @@ summary.total_objects_successful | numeric | | 1 | Delete destination group -Type: **generic** \ +Type: **generic**
Read only: **False** #### Action Parameters @@ -1234,7 +1234,7 @@ summary.total_objects_successful | numeric | | 1 | Get a list of departments -Type: **investigate** \ +Type: **investigate**
Read only: **True** #### Action Parameters @@ -1268,7 +1268,7 @@ summary.total_objects_successful | numeric | | 1 | Get the urls and keywords of a category -Type: **investigate** \ +Type: **investigate**
Read only: **True** #### Action Parameters diff --git a/release_notes/unreleased.md b/release_notes/unreleased.md index e5bdcc7..95f4470 100644 --- a/release_notes/unreleased.md +++ b/release_notes/unreleased.md @@ -6,3 +6,4 @@ * chore(ci): update pre-commit config * Resolved e0006 issue related to Python 3.13 upgrade * Remove beautifulsoup4 from requirements.txt +* Update Python version for 3.13 diff --git a/zscaler.json b/zscaler.json index b91c311..54e2972 100644 --- a/zscaler.json +++ b/zscaler.json @@ -14,7 +14,7 @@ "utctime_updated": "2022-01-24T06:29:48.000000Z", "package_name": "phantom_zscaler", "main_module": "zscaler_connector.py", - "python_version": "3", + "python_version": "3.9, 3.13", "min_phantom_version": "6.2.2", "fips_compliant": true, "latest_tested_versions": [ From 74c53187105766211f378d6d56bb2f25eff015b1 Mon Sep 17 00:00:00 2001 From: grokas Date: Wed, 27 Aug 2025 15:28:39 -0700 Subject: [PATCH 2/3] chore: package deps run --- zscaler.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zscaler.json b/zscaler.json index 54e2972..12ae86c 100644 --- a/zscaler.json +++ b/zscaler.json @@ -5037,5 +5037,11 @@ }, "versions": "EQ(*)" } - ] + ], + "pip39_dependencies": { + "wheel": [] + }, + "pip313_dependencies": { + "wheel": [] + } } From 6540e9077e85f762fec9e443975ac01c0cdbe67d Mon Sep 17 00:00:00 2001 From: mnordby-splunk Date: Fri, 5 Sep 2025 10:52:35 -0600 Subject: [PATCH 3/3] chore: update release notes --- release_notes/unreleased.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/release_notes/unreleased.md b/release_notes/unreleased.md index 95f4470..7f4f654 100644 --- a/release_notes/unreleased.md +++ b/release_notes/unreleased.md @@ -1,9 +1,3 @@ **Unreleased** -* Update Python dependencies for vulnerabilities, package updates, and platform built-in removals -* Update Python dependencies for Python 3.13 support -* Update NOTICE file with updated dependencies -* Apply pre-commit fixes -* chore(ci): update pre-commit config -* Resolved e0006 issue related to Python 3.13 upgrade -* Remove beautifulsoup4 from requirements.txt +* Update Python dependencies and code for Python 3.13 support * Update Python version for 3.13