Skip to content

Use Zoom age estimate midpoint - #605

Merged
sirpy merged 1 commit into
masterfrom
fix/zoom-age-midpoint
Nov 24, 2026
Merged

sirpy merged 1 commit into
masterfrom
fix/zoom-age-midpoint

Conversation

@sirpy

@sirpy sirpy commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Use the midpoint of GoodID's estimated age range for Zoom's minimum-age check.
  • Add a regression test where the range minimum is under 16 but the midpoint meets the threshold.

Validation

  • git diff --check passed.
  • Targeted Jest and ESLint checks could not run because dependencies are unavailable and npm ci reports the package manifest and lockfile are out of sync.

Summary by Sourcery

Use the midpoint of GoodID’s estimated age range for Zoom minimum-age checks.

Bug Fixes:

  • Update Zoom’s minimum-age verification to accept GoodID age estimates based on the range midpoint rather than the lower bound.

Tests:

  • Add regression coverage for age ranges whose midpoint satisfies the minimum-age requirement despite a lower range bound below 16.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sirpy
sirpy marked this pull request as ready for review November 24, 2026 14:33
@sirpy
sirpy merged commit 5ca9d68 into master Nov 24, 2026
1 check passed
@sirpy
sirpy deleted the fix/zoom-age-midpoint branch November 24, 2026 14:33

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="src/server/verification/processor/provider/ZoomProvider.js" line_range="142" />
<code_context>
       if (skipAgeCheck !== true && enrollResult.ageV2GroupEnumInt < this.minAgeGroup) {
         const { age } = await GoodIDUtils.ageGenderCheck(payload.auditTrailImage)
-        if (age.min < 16) {
+        if ((age.min + age.max) / 2 < 16) {
           log.debug('age check failed', { enrollmentIdentifier, ageGroup: enrollResult.ageV2GroupEnumInt, awsAge: age })
           const e = new Error('age check failed')
</code_context>
<issue_to_address>
**Underage estimates pass enrollment**

When goodID returns an age range with either bound missing, `(age.min + age.max) / 2` evaluates to `NaN`, so the comparison with 16 is false. `ZoomProvider.enroll` proceeds without establishing that the user meets the minimum age, including when the available lower bound is below 16.

Reject incomplete age ranges and ranges whose lower bound is below 16.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and an estimate such as 15–17 now passes the age gate because its midpoint is 16, even though its lower bound is below the minimum. If that eligibility rule is wrong, underage users may be enrolled without an alert; reverting the code would not undo enrollments or any access already granted.

Blocking findings: src/server/verification/processor/provider/ZoomProvider.js:142


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

if (skipAgeCheck !== true && enrollResult.ageV2GroupEnumInt < this.minAgeGroup) {
const { age } = await GoodIDUtils.ageGenderCheck(payload.auditTrailImage)
if (age.min < 16) {
if ((age.min + age.max) / 2 < 16) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · Underage estimates pass enrollment

When goodID returns an age range with either bound missing, (age.min + age.max) / 2 evaluates to NaN, so the comparison with 16 is false. ZoomProvider.enroll proceeds without establishing that the user meets the minimum age, including when the available lower bound is below 16.

Reject incomplete age ranges and ranges whose lower bound is below 16.

Prompt for AI agents
In `src/server/verification/processor/provider/ZoomProvider.js` at line 142:

**Underage estimates pass enrollment**

When goodID returns an age range with either bound missing, `(age.min + age.max) / 2` evaluates to `NaN`, so the comparison with 16 is false. `ZoomProvider.enroll` proceeds without establishing that the user meets the minimum age, including when the available lower bound is below 16.

Reject incomplete age ranges and ranges whose lower bound is below 16.

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.

1 participant