Full-codebase-audit 2026-05-30 outputs: - Audit report: 09 - Audits/Full Codebase Audit - 2026-05-30.md - 81 issue files ISSUE-055..135 (decisions + 1 skipped no-brainer). - Scanner docs from scratch (was zero): architecture, data model, API ref, payment flow, operations runbook + repo README. - Doc-sync updates across API reference, data models, flows, design system. - Secret Rotation Runbook (08 - Operations) for the exposed credentials. - Reusable workflow guide (07 - Development) + .claude/workflows/full-codebase-audit.js. Issues remain status:open intentionally — the code fixes are uncommitted-then-committed working-tree changes per repo and aren't "resolved" until merged/deployed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
issue, title, severity, domain, labels, status, created, source
| issue | title | severity | domain | labels | status | created | source | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 068 | Backend: dataCleanupService deletes Payments without provider scoping — risk of destroying escrow records | high | Admin |
|
open | 2026-05-30 | Full Codebase Audit 2026-05-30 |
Backend: dataCleanupService deletes Payments without provider scoping — risk of destroying escrow records
Severity: high Domain: Admin Labels: security, backend, data-loss, escrow
Description
dataCleanupService.ts:121 deletes Payment documents without filtering by provider. Request Network and SHKeeper escrow payments are webhook-driven and can take hours to confirm. Sweeping them deletes the ledger records that webhooks need to reconcile, silently destroying multi-seller cart records.
This matches the project memory note: "Any Payment-collection cleanup/orphan query MUST scope by provider:."
Options
- Scope all payment deletes by provider (exclude
request.network/shkeeperescrow records). - Soft-delete instead of hard delete for payments.
- Disallow payment-collection cleanup entirely from this tool.
Recommendation
Require provider scoping on every payment delete and prefer soft-delete; never sweep escrow-driven records. This is a data-loss risk.
Affected Files
backend/src/services/admin/dataCleanupService.ts:121
References
- Full Codebase Audit 2026-05-30 — DEC-38
- Project memory:
feedback_payment_cleanup_provider_filter.md