M1-audit SHOULD batch: unobserved fire-and-forget logging, duplicate admin approve routes, compose default DB password, dead legacy surfaces #76

Open
opened 2026-11-06 15:19:33 +01:00 by amiryahaya · 0 comments
Owner

M1-close ponytail-audit (issue #65) should-fix batch — triaged into one issue, fix forward:

  1. Fire-and-forget logging swallows failures — _ = activity.LogAsync(..., CancellationToken.None) pattern (DownloadFile, CompleteRecovery, SetupRecovery, DeleteRecoverySetup, GetRecoveryShare success path): write failures are unobserved. Audit evidence per SEC-15 will depend on these. Fix: at minimum log write-failures at Warning (mirrors #74); consider awaited writes for security-event classes.
  2. Duplicate admin approve/reject routes — AdminFeature maps ListRequests/ApproveRequest/RejectRequest on BOTH /api/admin (bare: /api/admin/{id}/approve) AND /api/admin/tenant-requests. Same handlers, so no behavior split — delete the bare mappings (~3 lines).
  3. compose.yml default DB password — Username=failsulit;Password=failsulit in the production stack definition; require env-injected secret (OPS hygiene).
  4. Legacy surfaces kept alive: /api/tenant-requests/* (wallet-era org requests, parallel to /api/org-requests) and /api/credentials/webauthn/* (baseline review: zero server-side verification, superseded by IdP choice) — delete when clients stop calling (fold into the Phase 2/6 migration tasks; note here so they don't silently ship to M2).

Lean note: FileHelper + rename handlers (files vs folders) near-copies — merge candidate for Phase 7 consolidation, not before.

M1-close ponytail-audit (issue #65) should-fix batch — triaged into one issue, fix forward: 1. **Fire-and-forget logging swallows failures** — `_ = activity.LogAsync(..., CancellationToken.None)` pattern (DownloadFile, CompleteRecovery, SetupRecovery, DeleteRecoverySetup, GetRecoveryShare success path): write failures are unobserved. Audit evidence per SEC-15 will depend on these. Fix: at minimum log write-failures at Warning (mirrors #74); consider awaited writes for security-event classes. 2. **Duplicate admin approve/reject routes** — AdminFeature maps ListRequests/ApproveRequest/RejectRequest on BOTH /api/admin (bare: `/api/admin/{id}/approve`) AND /api/admin/tenant-requests. Same handlers, so no behavior split — delete the bare mappings (~3 lines). 3. **compose.yml default DB password** — `Username=failsulit;Password=failsulit` in the production stack definition; require env-injected secret (OPS hygiene). 4. **Legacy surfaces kept alive**: /api/tenant-requests/* (wallet-era org requests, parallel to /api/org-requests) and /api/credentials/webauthn/* (baseline review: zero server-side verification, superseded by IdP choice) — delete when clients stop calling (fold into the Phase 2/6 migration tasks; note here so they don't silently ship to M2). Lean note: FileHelper + rename handlers (files vs folders) near-copies — merge candidate for Phase 7 consolidation, not before.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/failsulit#76
No description provided.