mirror of
https://github.com/mozilla-services/syncstorage-rs.git
synced 2026-05-05 20:26:26 +02:00
related ignores or nosec annotations
This commit is contained in:
parent
46638d7c24
commit
fcf34c509e
@ -94,7 +94,7 @@ def purge_records(args: argparse.Namespace) -> None:
|
||||
if args.mode in ["batches", "both"]:
|
||||
(batch_query, params) = add_conditions(
|
||||
args,
|
||||
f"DELETE FROM batches WHERE {expiry_condition}",
|
||||
f"DELETE FROM batches WHERE {expiry_condition}", # nosec B608
|
||||
)
|
||||
exec_delete(
|
||||
engine,
|
||||
@ -107,7 +107,7 @@ def purge_records(args: argparse.Namespace) -> None:
|
||||
if args.mode in ["bsos", "both"]:
|
||||
(bso_query, params) = add_conditions(
|
||||
args,
|
||||
f"DELETE FROM bsos WHERE {expiry_condition}",
|
||||
f"DELETE FROM bsos WHERE {expiry_condition}", # nosec B608
|
||||
)
|
||||
exec_delete(
|
||||
engine,
|
||||
|
||||
@ -55,7 +55,7 @@ if __name__ == "__main__":
|
||||
logging.info("Starting count_expired_rows.py")
|
||||
|
||||
for table in ["batches", "bsos"]:
|
||||
query = f"SELECT COUNT(*) FROM {table} WHERE expiry < CURRENT_TIMESTAMP()"
|
||||
query = f"SELECT COUNT(*) FROM {table} WHERE expiry < CURRENT_TIMESTAMP()" # nosec B608
|
||||
spanner_read_data(query, table)
|
||||
|
||||
logging.info("Completed count_expired_rows.py")
|
||||
|
||||
@ -135,7 +135,7 @@ def spanner_purge(args: argparse.Namespace) -> None:
|
||||
# IN PARENT batches ON DELETE CASCADE)
|
||||
(batch_query, params, types) = add_conditions(
|
||||
args,
|
||||
f"DELETE FROM batches WHERE {expiry_condition}",
|
||||
f"DELETE FROM batches WHERE {expiry_condition}", # nosec B608
|
||||
prefix,
|
||||
)
|
||||
deleter(
|
||||
@ -151,7 +151,7 @@ def spanner_purge(args: argparse.Namespace) -> None:
|
||||
if args.mode in ["bsos", "both"]:
|
||||
# Delete BSOs
|
||||
(bso_query, params, types) = add_conditions(
|
||||
args, f"DELETE FROM bsos WHERE {expiry_condition}", prefix
|
||||
args, f"DELETE FROM bsos WHERE {expiry_condition}", prefix # nosec B608
|
||||
)
|
||||
deleter(
|
||||
database,
|
||||
|
||||
@ -78,7 +78,7 @@ def _track_account_creation(email: str, password: str, fxa_uid: str) -> None:
|
||||
with open(_ACCT_TRACKING_FILE, "w") as f:
|
||||
json.dump(accounts, f, indent=2)
|
||||
|
||||
except Exception:
|
||||
except Exception: # nosec B110
|
||||
# continue with tests
|
||||
pass
|
||||
|
||||
@ -105,7 +105,7 @@ def _remove_account_from_tracking(email: str) -> None:
|
||||
with open(_ACCT_TRACKING_FILE, "w") as f:
|
||||
json.dump(accounts, f, indent=2)
|
||||
|
||||
except Exception:
|
||||
except Exception: # nosec B110
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@ -642,10 +642,9 @@ class Database:
|
||||
if "nodeid" in kwds:
|
||||
cols.append("id")
|
||||
args.append(":nodeid")
|
||||
query = """
|
||||
insert into nodes ({cols})
|
||||
values ({args})
|
||||
""".format(cols=", ".join(cols), args=", ".join(args))
|
||||
query = "insert into nodes ({cols}) values ({args})".format( # nosec B608
|
||||
cols=", ".join(cols), args=", ".join(args)
|
||||
)
|
||||
res = self._execute_sql(
|
||||
sqltext(query),
|
||||
nodeid=kwds.get("nodeid"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user