Skip to content

feat: allow opt-in CAPTCHA scoring enforcement - #133

Merged
cport1 merged 1 commit into
mainfrom
codex/captcha-candidate-enforcement
Nov 23, 2026
Merged

cport1 merged 1 commit into
mainfrom
codex/captcha-candidate-enforcement

Conversation

@cport1

@cport1 cport1 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an explicit scoringPolicy option to DetectionEngine, Captcha, createCaptchaEndpoints, and the inherited Express/Fastify/Next CAPTCHA adapter options
  • keep weighted-mean-v1 as the unchanged default and reject unknown policy names
  • allow noisy-or-floors-v1 to determine the returned verdict, CAPTCHA success, and token issuance while preserving comparison telemetry
  • extend the captured replay to prove enforced scores equal the previously observed candidate scores
  • document the opt-in and add it to the unreleased changelog

Safety evidence

The hash-pinned FCaptcha v1.51.3 captured slice remains balanced:

  • keyboard-only, touch, DevTools-open, and privacy-extension controls: allowed by default, enforced policy, and FCaptcha
  • linear approach, teleport click, instant keyboard, and scripted typing agents: accepted below the current success threshold, blocked by the enforced policy and FCaptcha

This remains opt-in so applications can compare the policies on their own traffic before changing token decisions.

Verification

  • 644/644 @webdecoy/node tests passed
  • package CJS/ESM and TypeScript declarations built successfully
  • Edge compatibility passed for src/index.ts and src/vercel.ts
  • existing synthetic/cadence parity and the eight-case captured enforcement replay passed
  • lint passed with 0 errors (9 pre-existing warnings)
  • all target-controlled execution ran in a read-only, network-disabled, empty-environment container with resource limits

Refs WebDecoy/app#1946

@cport1
cport1 merged commit 0346709 into main Nov 23, 2026
2 checks passed
@cport1
cport1 deleted the codex/captcha-candidate-enforcement branch November 23, 2026 19:04
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