-
Notifications
You must be signed in to change notification settings - Fork 8
feat/mouse movements #2344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/mouse movements #2344
Conversation
There was a problem hiding this 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.
packages/api-express-router/src/endpointAdapter/apiExpressEndpointAdapter.ts
Outdated
Show resolved
Hide resolved
packages/api-express-router/src/endpointAdapter/apiExpressDefaultEndpointAdapter.ts
Outdated
Show resolved
Hide resolved
…ultEndpointAdapter.ts Co-authored-by: Copilot <[email protected]>
…ointAdapter.ts Co-authored-by: Copilot <[email protected]>
…osopo/captcha into behavioural-analysis
No description provided.