Skip to content

Conversation

@HughParry
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings January 6, 2026 18:42
@HughParry HughParry changed the title Behavioural analysis feat/mouse movements Jan 6, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds behavioral analysis capabilities to the captcha system by collecting and encrypting user interaction data (mouse movements, touch events, clicks) during captcha completion. The data is transmitted with PoW captcha solutions for bot detection analysis.

Key Changes

  • Added behavioral data collection framework with generic collector interfaces
  • Implemented encryption and storage of packed behavioral data
  • Extended PoW captcha submission to include optional encrypted behavioral data

Reviewed changes

Copilot reviewed 21 out of 25 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/types/src/provider/api.ts Added behavioralData parameter to PoW captcha solution body
packages/types/src/procaptcha/props.ts Added behavioral collector interfaces to FrictionlessState type
packages/types/src/procaptcha-frictionless/props.ts Added behavioral collectors to BotDetectionFunctionResult type
packages/types/src/api/params.ts Added behavioralData API parameter enum
packages/types-database/src/types/provider.ts Added behavioral data storage schema and legacy field support
packages/provider/vite.esm.config.ts Added plugin to copy detection JavaScript files
packages/provider/vite.cjs.config.ts Added plugin to copy detection JavaScript files
packages/provider/src/tests/unit/tasks/powCaptcha/powTasks.unit.test.ts Added test coverage for behavioral data processing
packages/provider/src/tests/unit/tasks/detection/getBehavioralData.unit.test.ts Added tests for behavioral data decryption
packages/provider/src/tasks/powCaptcha/powTasks.ts Implemented behavioral data decryption and storage logic
packages/provider/src/tasks/detection/getBehavioralData.ts Created behavioral data retrieval utility
packages/provider/src/tasks/detection/decodePayload.js Added obfuscated decryption implementation
packages/provider/src/tasks/detection/decodeBehavior.js Added obfuscated behavioral data decoder
packages/provider/src/api/captcha/submitPoWCaptchaSolution.ts Added behavioralData parameter to submission handler
packages/procaptcha/src/modules/Manager.ts Added TODO comment for future image captcha support
packages/procaptcha-pow/src/services/Manager.ts Implemented behavioral data collection and encryption
packages/procaptcha-frictionless/src/customDetectBot.ts Mapped trackers to generic behavioral collectors
packages/procaptcha-frictionless/src/ProcaptchaFrictionless.tsx Passed behavioral collectors to frictionless state
packages/api/src/api/ProviderApi.ts Added behavioralData parameter to API method
packages/api-express-router/src/endpointAdapter/apiExpressEndpointAdapter.ts Changed import from type-only to value import
packages/api-express-router/src/endpointAdapter/apiExpressDefaultEndpointAdapter.ts Changed import from type-only to value import

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HughParry HughParry merged commit 7543d17 into main Jan 8, 2026
9 of 10 checks passed
@HughParry HughParry deleted the behavioural-analysis branch January 8, 2026 10:06
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.

3 participants