@anonympins/fingerprint 0.3.5 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,43 @@
1
+ ## Version 0.3.7
2
+
3
+ ### 📊 Prometheus Metrics & Monitoring (JS/PHP)
4
+ - **Prometheus metrics export support**:
5
+ - Implemented a metrics generator using the standard Prometheus format (`text/plain`).
6
+ - Exported active configuration indicators: weight (`fingerprint_security_weight`) and thresholds (`fingerprint_security_threshold`).
7
+ - Real-time export of Auto-Tuner performance metrics: false positive rate (`fingerprint_autotuning_false_positive_rate`) and false negative rate (`fingerprint_autotuning_false_negative_rate`).
8
+ - Secured access via a customizable authorization callback (`metricsAuthorizationCallback`) supporting blocking and secure redirects.
9
+
10
+ ### ⚙️ Background Pareto-Optimal TTL Tuning (JS)
11
+ - **Non-blocking asynchronous optimization**:
12
+ - Added `runBackgroundTtlOptimization`, which runs periodically in the background without blocking the event loop.
13
+ - Utilized a multi-objective genetic algorithm to dynamically calculate a Pareto front of optimal TTLs based on suspicion scores.
14
+ - Implemented instant linear interpolation from the optimization cache for efficient ticket TTL assignment (`determineOptimalTicketTtl`).
15
+
16
+ ### 🚀 Maintenance
17
+ - **Repository cleanup**:
18
+ - Removed obsolete temporary specification files (`enhancements.md`).
19
+
20
+ ## Version 0.3.6
21
+
22
+ ### 🛡️ Sybil Protection & Auto-Tuner Hardening (JS/PHP)
23
+ - **Auto-Tuner Freeze Vulnerability Fix (Anti-Flood)**:
24
+ - Resolved a vulnerability allowing an attacker to indefinitely freeze the auto-tuner by flooding it with simple requests (`request_passed`), causing the high-confidence log ratio to plummet below the 5% threshold.
25
+ - Enhanced `sanitizeTrafficData` to balance, shuffle, and cap the proportion of clean logs (`request_passed`) relative to suspicious logs.
26
+ - Added an absolute fallback trigger condition (`MIN_HIGH_CONFIDENCE_COUNT = 10`) in the optimizer to bypass the 5% minimum ratio when a sufficiently strong signal is present.
27
+ - **Defense Against Sybil Attacks (Data Poisoning)**:
28
+ - Limited the contribution of each `deviceId` to a maximum of 2% of the total dataset within the traffic sanitizer, preventing a single attacker from manipulating safety threshold optimization calculations.
29
+ - **Cryptographic Securing of Challenge Context (HMAC)**:
30
+ - Systematic HMAC-SHA256 signing of the challenge payload (`clientSecret`, `cpuTarget`, `fingerprint`, `memDifficulty`, `originalPath`, and client IP) using the global secret.
31
+ - Strict validation of challenge context integrity upon submission to counter injection or storage tampering attacks.
32
+
33
+ ### ✨ New Features & Improvements
34
+ - **Sequential Path Enumeration Detection (Scraping)**:
35
+ - Integrated a detection system for requests with identical, incremental structures (e.g., `/product/1`, `/product/2`, `/product/3`).
36
+ - Automatically applies an enumeration penalty score (`enumerationScore`) of 80% of the pattern weight during unique sequential requests on the same URL pattern.
37
+ - **Network Roaming Tolerance & Strict Hardware Identity**:
38
+ - Upgraded `isTicketValid` to tolerate legitimate user IP changes (roaming) within the same network block (IPv4/IPv6 subnet).
39
+ - Automatic fallback to robust hardware identity validation (`deviceId` and `deviceHash` cryptographically verified via HMAC) if the user completely switches networks (e.g., moving from Wi-Fi to 4G).
40
+
1
41
  ## Version 0.3.5 (Hotfix)
2
42
 
3
43
  ### 🛡️ Critical Fixes & Security Hardening:
@@ -93,7 +133,7 @@ This release marks a major expansion of the library, introducing a full-featured
93
133
 
94
134
  ### ✨ New Features
95
135
 
96
- * **Full PHP Support**: The library is now available for PHP 7.4+ with a feature set equivalent to the Node.js version.
136
+ * **Full PHP Support**: The library is now available for PHP 8.0+ with a feature set equivalent to the Node.js version.
97
137
  * **Direct Integration**: A `DirectFingerprint` class allows for easy integration into any PHP application, including legacy codebases, by interacting directly with PHP's superglobals.
98
138
  * **PSR-15 Middleware**: A `FingerprintMiddleware` is provided for modern, framework-agnostic integration with applications that follow PSR-7, PSR-15, and PSR-17 standards (e.g., Slim, Laminas).
99
139
  * **Pluggable Datastores**: The PHP version supports the same pluggable store architecture, allowing state to be persisted in Redis, databases, or other external systems.