From 24be1e88544c5cf2fef8415b07b8db6558033bbe Mon Sep 17 00:00:00 2001 From: chkp-edenbr <94056191+chkp-edenbr@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:16:01 +0200 Subject: [PATCH 1/2] hide api-key from debug file (#61) * Add sg file * Revert "Add sg file" This reverts commit 726298c13acc2f51fccda85035d2b56c23ef4f4f. * hide api-key from debug file --- cpapi/mgmt_api.py | 5 ++++- setup.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cpapi/mgmt_api.py b/cpapi/mgmt_api.py index 83d2396..dc42370 100644 --- a/cpapi/mgmt_api.py +++ b/cpapi/mgmt_api.py @@ -368,7 +368,10 @@ def api_call(self, command, payload=None, sid=None, wait_for_task=True, timeout= # would not appear as plaintext in the debug file. if command == "login": json_data = compatible_loads(_data) - json_data["password"] = "****" + if "password" in json_data: + json_data["password"] = "****" + if "api-key" in json_data: + json_data["api-key"] = "****" _data = json.dumps(json_data) if self.debug_file: diff --git a/setup.py b/setup.py index 9b5a5b1..b35bd99 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name="cp-mgmt-api-sdk", - version="1.8.0", + version="1.9.0", author="API team", author_email="api_team@checkpoint.com", license='Apache 2.0', From 5db24fe8b5db2605daf8028e6780604751012eb2 Mon Sep 17 00:00:00 2001 From: chkp-edenbr <94056191+chkp-edenbr@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:27:26 +0200 Subject: [PATCH 2/2] Update workflow.yml (#62) --- .github/workflows/workflow.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 334832c..8536ad8 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -5,9 +5,6 @@ on: - pull_request jobs: - code-analysis: - uses: CheckPointSW/org-templates/.github/workflows/code-analysis.yml@main - secrets: inherit build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI