You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add tamper evidence collector and related functionality
- Implemented `createTamperEvidenceCollector` to assess browser tampering risks.
- Added `evaluateTamperEvidence` function to analyze various indicators of tampering.
- Introduced `createStabilityMonitor` for tracking component drift in identity verification.
- Created `USE_CASE_PRESETS` for managing different privacy and risk profiles.
- Developed `createExplainableReport` to generate detailed reports on identity and risk assessments.
- Implemented replay protection mechanisms in `createReplayToken` and `verifyReplayToken`.
- Added network risk evaluation capabilities with `evaluateNetworkRisk` and static network adapter.
- Comprehensive test suite for tamper evidence, stability monitoring, and replay protection.
- Defined TypeScript types for server-related functionalities.
The server package adds replay protection, server-only hashing, result verification, and network risk adapters. It is intended for backend use and is not included in the browser global bundle.
Bot detection is evidence-based. Strong signals such as WebDriver exposure, known automation globals, headless user agents, and impossible browser dimensions increase the score. Weaker inconsistencies such as language mismatches, impossible hardware ranges, plugin structure anomalies, patched permissions APIs, and empty Chromium globals are reported as evidence without being treated as proof by themselves.
129
161
162
+
Tamper evidence is also evidence-based. `browser.tamperEvidence` reports patched native APIs, platform/client-hints mismatches, zero screen dimensions, suspicious language lists, and patched canvas serialization. It is report-only by default and should be combined with server verification before enforcement.
163
+
130
164
Private-mode detection is intentionally conservative. Modern browsers do not expose a universal incognito flag, so `browser.privacyMode` reports likelihood, score, confidence, and evidence from storage availability, IndexedDB behavior, quota estimates, and persistence state.
131
165
132
166
## Privacy Profiles
@@ -137,6 +171,15 @@ Private-mode detection is intentionally conservative. Modern browsers do not exp
137
171
138
172
Policy controls include consent gates, sensitivity limits, active collector permission, allow/deny lists, category filters, and optional value redaction.
139
173
174
+
Use-case presets are available through `useCase` or `createUseCasePreset()`:
175
+
176
+
- `privacy-first`
177
+
- `analytics-lite`
178
+
- `login-risk`
179
+
- `checkout-risk`
180
+
- `bot-defense`
181
+
- `fraud-defense`
182
+
140
183
Identity controls are separate from policy controls:
141
184
142
185
- `identity.includeNonHashable`: include report-only components in the hash for diagnostics or custom deployments.
@@ -155,6 +198,8 @@ The browser demo in [examples/browser.html](examples/browser.html) renders two r
155
198
156
199
Both reports include all collected capabilities and calculation data. Use the `extended` profile in the demo to exercise the full collector pack and confirm that report-only changes do not move the stable visitor ID.
157
200
201
+
The debug inspector in [examples/inspector.html](examples/inspector.html) accepts an `IdentifyResult` or full demo report JSON and explains identity components, report-only components, tamper, bot, and private-mode evidence.
202
+
158
203
## Verification
159
204
160
205
`npm run verify` runs the full quality gate:
@@ -163,7 +208,7 @@ Both reports include all collected capabilities and calculation data. Use the `e
163
208
- declaration validation through TypeScript;
164
209
- Node tests with 100% line, branch, and function coverage for `src/**/*.js`;
165
210
- Playwright browser tests in Chromium, Firefox, and WebKit;
0 commit comments