Skip to content

fix: fail closed when proof-of-life has no burst frames - #441

Open
northersubair wants to merge 3 commits into
ChainForgee:mainfrom
northersubair:fix/proof-of-life-selfie-only-fail-closed
Open

fix: fail closed when proof-of-life has no burst frames#441
northersubair wants to merge 3 commits into
ChainForgee:mainfrom
northersubair:fix/proof-of-life-selfie-only-fail-closed

Conversation

@northersubair

Copy link
Copy Markdown

Summary

Selfie-only requests (no burst frames) previously passed liveness because the burst_required flag defaulted to satisfied when no frames were supplied, collapsing the anti-fraud signal to "a face is present".

Make liveness evidence a mandatory precondition: without burst frames, is_real_person is always false with a clear reason. Burst-based requests are scored on actual blink/head-movement evidence.

Closes #431

Testing

  • Selfie-only request (no burst frames) returns is_real_person: false
  • Selfie-only request reason mentions liveness
  • Empty burst list treated as selfie-only
  • Burst with blink/movement can pass; burst without liveness fails

Checklist

  • Tests added or updated for new/changed behavior
  • Existing tests pass
  • No secrets, keys, or seed phrases committed
  • Follows the coding conventions in the relevant service README
  • PR is focused on a single concern

northersubair and others added 3 commits August 20, 2026 13:57
Selfie-only requests (no burst frames) previously passed liveness
because the burst_required flag defaulted to satisfied when no
frames were supplied, collapsing the anti-spoon signal to 'a face
is present'.

Make liveness evidence a mandatory precondition: without burst
frames, is_real_person is always false with a clear reason.  Burst-
based requests are scored on actual blink/head-movement evidence.

Closes ChainForgee#431
The conftest was replacing proof_of_life with a MagicMock at module
level, causing all tests to get MagicMock objects instead of real
classes. The cascade classifier loading happens in __init__ (not at
module level), so the stub is unnecessary with mocked cv2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proof-of-life passes a single static selfie: burst-free requests report is_real_person true with only face detection

2 participants