From bc73be50e1301858f3fbef7fb85b156ef3e41443 Mon Sep 17 00:00:00 2001 From: Scott Odle Date: Sat, 18 Jul 2026 04:50:45 -0600 Subject: [PATCH 1/4] chore: update connector development tooling Use dev-cicd-tools v2.2.4 and declare the supported Python 3.9 and 3.13 runtimes. Refs PAPP-38212. Written by Codex. --- .pre-commit-config.yaml | 2 +- ip2locationio.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index edf7b2b..671dc35 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,7 +60,7 @@ repos: exclude: "README.md" # Central hooks - repo: https://github.com/phantomcyber/dev-cicd-tools - rev: v2.1.4 + rev: v2.2.4 hooks: - id: build-docs language: python diff --git a/ip2locationio.json b/ip2locationio.json index e44d962..4d9b1ad 100644 --- a/ip2locationio.json +++ b/ip2locationio.json @@ -5,7 +5,7 @@ "type": "information", "product_vendor": "IP2Location.io", "product_name": "IP2Location.io", - "python_version": "3", + "python_version": "3.9, 3.13", "product_version_regex": ".*", "logo": "logo_ip2locationio.svg", "logo_dark": "logo_ip2locationio_dark.svg", From 1fafae1fcf2856fb3fb6935d53bfc747c9912c9d Mon Sep 17 00:00:00 2001 From: Scott Odle Date: Sat, 18 Jul 2026 04:50:59 -0600 Subject: [PATCH 2/4] fix: verify IP2Location.io TLS certificates Expose the standard certificate-verification setting and default it to enabled for every outbound request. Refs PSAAS-31074 and PAPP-38212. Written by Codex. --- ip2locationio.json | 7 +++++++ ip2locationio_connector.py | 2 +- release_notes/unreleased.md | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ip2locationio.json b/ip2locationio.json index 4d9b1ad..b8b89c5 100644 --- a/ip2locationio.json +++ b/ip2locationio.json @@ -29,6 +29,13 @@ "data_type": "password", "required": true, "order": 0 + }, + "verify_server_cert": { + "description": "Verify the IP2Location.io server certificate", + "data_type": "boolean", + "required": false, + "default": true, + "order": 1 } }, "actions": [ diff --git a/ip2locationio_connector.py b/ip2locationio_connector.py index f10ed46..04c4381 100644 --- a/ip2locationio_connector.py +++ b/ip2locationio_connector.py @@ -112,7 +112,7 @@ def _make_rest_call(self, endpoint, action_result, method="get", **kwargs): url = self._base_url + endpoint try: - r = request_func(url, verify=config.get("verify_server_cert", False), **kwargs) + r = request_func(url, verify=config.get("verify_server_cert", True), **kwargs) except Exception as e: return RetVal(action_result.set_status(phantom.APP_ERROR, f"Error Connecting to server. Details: {e!s}"), resp_json) diff --git a/release_notes/unreleased.md b/release_notes/unreleased.md index fbcb2fd..cb689fb 100644 --- a/release_notes/unreleased.md +++ b/release_notes/unreleased.md @@ -1 +1,3 @@ **Unreleased** + +* Enable TLS server certificate verification by default From d52b1ed0f0ec46fdb069913cbcbe5a62a8269e2b Mon Sep 17 00:00:00 2001 From: Scott Odle Date: Sat, 18 Jul 2026 04:51:15 -0600 Subject: [PATCH 3/4] fix: redact IP2Location.io transport errors Report only exception types for request failures so password-type API keys embedded in failed request URLs cannot persist in action results. Refs PSAAS-31239 and PAPP-38212. Written by Codex. --- ip2locationio_connector.py | 10 +++++++++- release_notes/unreleased.md | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ip2locationio_connector.py b/ip2locationio_connector.py index 04c4381..f7a00a2 100644 --- a/ip2locationio_connector.py +++ b/ip2locationio_connector.py @@ -113,8 +113,16 @@ def _make_rest_call(self, endpoint, action_result, method="get", **kwargs): try: r = request_func(url, verify=config.get("verify_server_cert", True), **kwargs) + except requests.exceptions.RequestException as e: + return RetVal( + action_result.set_status(phantom.APP_ERROR, f"Error connecting to IP2Location.io. Details: {type(e).__name__}"), + resp_json, + ) except Exception as e: - return RetVal(action_result.set_status(phantom.APP_ERROR, f"Error Connecting to server. Details: {e!s}"), resp_json) + return RetVal( + action_result.set_status(phantom.APP_ERROR, f"Unexpected connection error. Details: {type(e).__name__}"), + resp_json, + ) return self._process_response(r, action_result) diff --git a/release_notes/unreleased.md b/release_notes/unreleased.md index cb689fb..f79972f 100644 --- a/release_notes/unreleased.md +++ b/release_notes/unreleased.md @@ -1,3 +1,4 @@ **Unreleased** * Enable TLS server certificate verification by default +* Prevent API keys in failed request URLs from reaching action results From 2d6cd78558e4ecfb576ffd858d9fb7d376c20610 Mon Sep 17 00:00:00 2001 From: Scott Odle Date: Sat, 18 Jul 2026 04:54:25 -0600 Subject: [PATCH 4/4] chore: refresh generated connector documentation Regenerate the connector README after adding the certificate-verification setting. Refs PAPP-38212. Written by Codex. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8d7060a..5cdd3aa 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,7 @@ This table lists the configuration variables required to operate IP2Location IO. VARIABLE | REQUIRED | TYPE | DESCRIPTION -------- | -------- | ---- | ----------- **api_key** | required | password | IP2Location.io API key | +**verify_server_cert** | optional | boolean | Verify the IP2Location.io server certificate | ### Supported Actions