fix: suppress S608 for both ruff and bandit
All checks were successful
CI / Lint & Format (push) Successful in 18s
CI / Security Scan (push) Successful in 22s
CI / Tests (push) Successful in 1m8s

This commit is contained in:
Username
2025-12-23 22:57:38 +01:00
parent 2a287c65f4
commit 51af8fd2f8

View File

@@ -143,21 +143,19 @@ def query_audit_log(
# Get total count # Get total count
count_row = db.execute( count_row = db.execute(
f"SELECT COUNT(*) as total FROM audit_log WHERE {where_sql}", # nosec B608 f"SELECT COUNT(*) as total FROM audit_log WHERE {where_sql}", # noqa: S608 # nosec B608
params, params,
).fetchone() ).fetchone()
total = count_row["total"] if count_row else 0 total = count_row["total"] if count_row else 0
# Fetch entries # Fetch entries (where_sql built from trusted column names only)
rows: list[Row] = db.execute( query = f"""SELECT id, timestamp, event_type, client_id, client_ip,
f"""SELECT id, timestamp, event_type, client_id, client_ip,
paste_id, request_id, outcome, details paste_id, request_id, outcome, details
FROM audit_log FROM audit_log
WHERE {where_sql} WHERE {where_sql}
ORDER BY timestamp DESC ORDER BY timestamp DESC
LIMIT ? OFFSET ?""", # nosec B608 LIMIT ? OFFSET ?""" # noqa: S608 # nosec B608
[*params, limit, offset], rows: list[Row] = db.execute(query, [*params, limit, offset]).fetchall()
).fetchall()
entries = [] entries = []
for row in rows: for row in rows: