M1-audit MUST: anonymous recovery-share probes leave no activity evidence (Guid.Empty ActorId FK-fails silently) #74

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

M1-close ponytail-audit finding (issue #65).

GetRecoveryShare.cs:42 logs failed anonymous share retrievals with ActorId = Guid.Empty — FileActivity.ActorId is a non-nullable FK to users, so the insert fails and the fire-and-forget (_ = activity.LogAsync(...)⁠, CancellationToken.None) swallows it. Visible as recurring Failed to log file activity: recovery.share_retrieved ERR lines in every suite run.

Concrete case: an attacker probing GET /api/recovery/share?did=X for many DIDs leaves ZERO server-side evidence — exactly the events worth logging. Same class as the #32 audit-sink bug (fixed with a nullable ActorId there).

Fix: make FileActivity.ActorId nullable (migration, mirroring the #32 pattern), write null for pre-auth events, keep the success path as-is. Also un-swallow: log write failures at Warning.

M1-close ponytail-audit finding (issue #65). GetRecoveryShare.cs:42 logs failed anonymous share retrievals with `ActorId = Guid.Empty` — FileActivity.ActorId is a non-nullable FK to users, so the insert fails and the fire-and-forget (`_ = activity.LogAsync(...)⁠, CancellationToken.None`) swallows it. Visible as recurring `Failed to log file activity: recovery.share_retrieved` ERR lines in every suite run. Concrete case: an attacker probing `GET /api/recovery/share?did=X` for many DIDs leaves ZERO server-side evidence — exactly the events worth logging. Same class as the #32 audit-sink bug (fixed with a nullable ActorId there). Fix: make FileActivity.ActorId nullable (migration, mirroring the #32 pattern), write null for pre-auth events, keep the success path as-is. Also un-swallow: log write failures at Warning.
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#74
No description provided.