S108: ignore our uses
This commit is contained in:
@@ -139,7 +139,7 @@ class Remote:
|
||||
if sys.platform == "darwin" and os.environ.get("TMPDIR", "").startswith(
|
||||
"/var/folders/",
|
||||
):
|
||||
directory = "/tmp/"
|
||||
directory = "/tmp/" # noqa: S108 - Required on macOS due to bugs with default TMPDIR
|
||||
with TemporaryDirectory(prefix="clan-ssh", dir=directory) as temp_dir:
|
||||
remote = Remote(
|
||||
address=self.address,
|
||||
|
||||
@@ -33,7 +33,7 @@ def upload(
|
||||
# Exceptions: Allow depth 2 if the path starts with /tmp/, /root/, or /etc/.
|
||||
# This allows destinations like /tmp/mydir or /etc/conf.d, but not /tmp or /etc directly.
|
||||
is_allowed_exception = depth >= 2 and (
|
||||
str(remote_dest).startswith("/tmp/")
|
||||
str(remote_dest).startswith("/tmp/") # noqa: S108 - Path validation check
|
||||
or str(remote_dest).startswith("/root/")
|
||||
or str(remote_dest).startswith("/etc/")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user