From db5fc72ffe852f0f7883445492e8e6b22c0a7655 Mon Sep 17 00:00:00 2001 From: Dmitriyev <2291074+vdmitriyev@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:49:06 +0100 Subject: [PATCH] FIX: use correct bandit codes --- .pre-commit-config.yaml | 2 +- pymultissher/pymultissher.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4980c52..59f8776 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: check-docstring-first - id: check-json - id: check-merge-conflict - - id: check-shebang-scripts-are-executable + #- id: check-shebang-scripts-are-executable - id: check-symlinks - id: check-toml - id: check-vcs-permalinks diff --git a/pymultissher/pymultissher.py b/pymultissher/pymultissher.py index f3e1bd4..4ccc68c 100644 --- a/pymultissher/pymultissher.py +++ b/pymultissher/pymultissher.py @@ -97,7 +97,7 @@ def create_client(self, ssh_host: SSHCredentials) -> None: """ self.client = paramiko.SSHClient() - self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) # nosec CWE-295 + self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) # nosec B507 # Load private key with password try: @@ -197,7 +197,7 @@ def execute_cmd_and_read_response(self, cmd: str) -> str: channel = transport.open_session() channel.set_combine_stderr(1) # not handling stdout & stderr separately - channel.exec_command(cmd) # nosec CWE-78 + channel.exec_command(cmd) # nosec B601 channel.shutdown_write() # command was sent, no longer need stdin def __response_read(channel):