feat(security): add security tests for authentication flows (APKT-2904)
Security Tests for Authentication Flows
This PR implements security-focused tests for input validation in the AppKit authentication flows, addressing ticket APKT-2904.
Changes
- Added security tests for email authentication validation in W3mFrameSchema.ts
- Added security tests for social login URI validation in SocialsUtil.ts
- Added security tests for token validation in CloudAuthSIWX.ts
- Added security tests for public methods in W3mFrameProvider.ts
- Added security tests for UI components (w3m-email-login-widget and w3m-social-login-widget)
- Added security tests for AuthConnector validation
Test Coverage
The tests verify that inputs are properly validated, sanitized, and that the system is protected against common attack vectors:
- SQL injection attempts
- XSS injection attempts
- Format validation bypasses
- Malformed inputs
- Length/boundary testing
- Special character handling
Note on Test Failures
Some security tests are intentionally failing to highlight potential security vulnerabilities that should be addressed. These tests serve as documentation of security requirements and can be used as a guide for implementing proper input validation and sanitization in the future.
Link to Devin run
https://app.devin.ai/sessions/1c80e0d446f7467382e4bd68df422b10
Requested by
⚠️ No Changeset found
Latest commit: 2ccfc8c310f68d5693bbd92f98864a19b8904021
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| appkit-demo | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 18, 2025 0:29am |
| appkit-laboratory | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 18, 2025 0:29am |
11 Skipped Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| appkit-basic-ep | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| appkit-basic-example | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| appkit-basic-sign-client-example | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| appkit-basic-up-example | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| appkit-ethers5-bera | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| appkit-nansen-demo | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| appkit-vue-solana | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| appkit-wagmi-cdn-example | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| ethereum-provider-wagmi-example | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| next-wagmi-solana-bitcoin-example | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am | ||
| vue-wagmi-example | ⬜️ Ignored (Inspect) | May 18, 2025 0:29am |
🤖 Devin AI Engineer
I'll be helping with this pull request! Here's what you should know:
✅ I will automatically:
- Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
- Look at CI failures and help fix them
Note: I can only respond to comments from users who have write access to this repository.
⚙️ Control Options:
- [ ] Disable automatic comment and CI monitoring
Coverage Report
| Status | Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔵 | Lines | 76.24% | 26852 / 35216 |
| 🔵 | Statements | 76.24% | 26852 / 35216 |
| 🔵 | Functions | 67.94% | 2266 / 3335 |
| 🔵 | Branches | 83.82% | 5363 / 6398 |
File Coverage
No changed files found.
Tests are failing here, please fix