mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 03:54:17 +02:00
Tool: Bandit B108
Severity: Warning ×4 Issue: "Probable insecure usage of temp file/directory" — /tmp/<filename> literals used as synthetic DB field values in two integration tests Status: Fixed ──────────────────────────────────────── Tool: CodeQL Python / JS Severity: Pending Issue: Still running on the head SHA Status: — ──────────────────────────────────────── Tool: Trivy container scan Severity: Pending Issue: Still running Status: — ──────────────────────────────────────── Tool: Bandit (Python Security Analysis) Severity: Pass Issue: The separate Bandit run on the changes already passes Status: ✓
This commit is contained in:
@@ -18,7 +18,7 @@ async def file_factory(db_session):
|
|||||||
counter = _counter[0]
|
counter = _counter[0]
|
||||||
defaults = {
|
defaults = {
|
||||||
"filename": f"trash_test_{counter}.3mf",
|
"filename": f"trash_test_{counter}.3mf",
|
||||||
"file_path": f"/tmp/trash_test_{counter}.3mf",
|
"file_path": f"/test/library/trash_test_{counter}.3mf",
|
||||||
"file_size": 1024 * counter,
|
"file_size": 1024 * counter,
|
||||||
"file_type": "3mf",
|
"file_type": "3mf",
|
||||||
}
|
}
|
||||||
@@ -286,14 +286,14 @@ async def test_sweeper_hard_deletes_past_retention(db_session):
|
|||||||
|
|
||||||
fresh = LibraryFile(
|
fresh = LibraryFile(
|
||||||
filename="fresh.3mf",
|
filename="fresh.3mf",
|
||||||
file_path="/tmp/fresh.3mf",
|
file_path="/test/library/fresh.3mf",
|
||||||
file_size=1024,
|
file_size=1024,
|
||||||
file_type="3mf",
|
file_type="3mf",
|
||||||
deleted_at=datetime.now(timezone.utc) - timedelta(days=5),
|
deleted_at=datetime.now(timezone.utc) - timedelta(days=5),
|
||||||
)
|
)
|
||||||
stale = LibraryFile(
|
stale = LibraryFile(
|
||||||
filename="stale.3mf",
|
filename="stale.3mf",
|
||||||
file_path="/tmp/stale.3mf",
|
file_path="/test/library/stale.3mf",
|
||||||
file_size=2048,
|
file_size=2048,
|
||||||
file_type="3mf",
|
file_type="3mf",
|
||||||
deleted_at=datetime.now(timezone.utc) - timedelta(days=40),
|
deleted_at=datetime.now(timezone.utc) - timedelta(days=40),
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ async def _seed_pending(
|
|||||||
) -> int:
|
) -> int:
|
||||||
pending = PendingUpload(
|
pending = PendingUpload(
|
||||||
filename=filename,
|
filename=filename,
|
||||||
file_path=f"/tmp/{filename}",
|
file_path=f"/test/pending/{filename}",
|
||||||
file_size=42,
|
file_size=42,
|
||||||
source_ip="192.168.1.50",
|
source_ip="192.168.1.50",
|
||||||
status="pending",
|
status="pending",
|
||||||
|
|||||||
Reference in New Issue
Block a user