Reported listings move to suspended status, not hard-deleted
Why it matters
Hard-deleting reported listings destroys the evidence needed to investigate abuse patterns, respond to legal holds, and meet GDPR Art. 17 obligations (which require a deliberate erasure decision, not automatic deletion on report). CWE-778 (Insufficient Logging) applies: if the record is gone, you cannot determine whether the report was legitimate, who submitted the listing, or whether the reporter is gaming the system to suppress competitors.
Severity rationale
Medium because hard deletion on report removes audit trails and creates GDPR Art. 17 compliance gaps, but the primary impact is operational rather than an immediate security breach.
Remediation
Move reported listings to a 'suspended' status rather than deleting them. Keep the row and the report record intact for moderator review:
// app/api/listings/[id]/report/route.ts
await db.$transaction([
db.listingReports.create({
data: { listing_id: listingId, reason, details, reported_by: req.auth?.userId ?? 'anonymous' }
}),
db.listings.update({
where: { id: listingId },
data: { status: 'suspended' }
})
])
return Response.json({ message: 'Report received. Listing hidden pending review.' })
In the admin moderation queue, show suspended listings alongside their reports. Moderators should have three options: reinstate (set status = 'approved'), permanently reject (status = 'rejected'), or escalate for legal review — never auto-delete on report submission.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the User Submissions & Moderation Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-778 — Insufficient Logging
- gdpr · Art. 17 — Right to Erasure — soft-delete preserves audit trail for dispute resolution
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-submissions-moderation·automated