Silence bandit paranoia on certain lines
Some checks failed
CI / test (push) Successful in 5m24s
Lint / test (push) Failing after 29s
Trivy / test (push) Successful in 20s

This commit is contained in:
Miguel Jacq 2025-12-17 19:05:07 +11:00
parent 9ebd8ff990
commit 62ec8e8b1b
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
3 changed files with 5 additions and 5 deletions

View file

@ -567,7 +567,7 @@ def _tar_dir_to_with_progress(
cols = shutil.get_terminal_size((80, 20)).columns
msg = msg[: cols - 1]
except Exception:
pass
pass # nosec
os.write(2, ("\r" + msg).encode("utf-8", errors="replace"))
with tarfile.open(tar_path, mode="w:gz") as tf:

View file

@ -200,7 +200,7 @@ def remote_harvest(
# Stream a tarball back to the local machine (avoid creating a tar file on the remote).
cmd = f"tar -cz -C {rbundle} ."
_stdin, stdout, stderr = ssh.exec_command(cmd)
_stdin, stdout, stderr = ssh.exec_command(cmd) # nosec
with open(local_tgz, "wb") as f:
while True:
chunk = stdout.read(1024 * 128)

View file

@ -2,7 +2,7 @@ from __future__ import annotations
import os
import shutil
import subprocess
import subprocess # nosec
import tempfile
from pathlib import Path
from typing import Iterable, List, Optional
@ -62,7 +62,7 @@ def encrypt_file_binary(
],
capture_output=True,
check=False,
)
) # nosec
if res.returncode != 0:
raise SopsError(
"sops encryption failed:\n"
@ -112,7 +112,7 @@ def decrypt_file_binary_to(
],
capture_output=True,
check=False,
)
) # nosec
if res.returncode != 0:
raise SopsError(
"sops decryption failed:\n"