@svrnsec/pulse 0.7.0 → 0.9.0
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/LICENSE +21 -21
- package/README.md +883 -782
- package/SECURITY.md +27 -22
- package/bin/svrnsec-pulse.js +7 -7
- package/dist/{pulse.cjs.js → pulse.cjs} +6428 -6413
- package/dist/pulse.cjs.map +1 -0
- package/dist/pulse.esm.js +6429 -6415
- package/dist/pulse.esm.js.map +1 -1
- package/index.d.ts +949 -846
- package/package.json +189 -184
- package/pkg/pulse_core.js +174 -173
- package/src/analysis/audio.js +213 -213
- package/src/analysis/authenticityAudit.js +408 -393
- package/src/analysis/coherence.js +502 -502
- package/src/analysis/coordinatedBehavior.js +825 -804
- package/src/analysis/heuristic.js +428 -428
- package/src/analysis/jitter.js +446 -446
- package/src/analysis/llm.js +473 -472
- package/src/analysis/populationEntropy.js +404 -403
- package/src/analysis/provider.js +248 -248
- package/src/analysis/refraction.js +392 -391
- package/src/analysis/trustScore.js +356 -356
- package/src/cli/args.js +36 -36
- package/src/cli/commands/scan.js +192 -192
- package/src/cli/runner.js +157 -157
- package/src/collector/adaptive.js +200 -200
- package/src/collector/bio.js +297 -287
- package/src/collector/canvas.js +247 -239
- package/src/collector/dram.js +203 -203
- package/src/collector/enf.js +311 -311
- package/src/collector/entropy.js +195 -195
- package/src/collector/gpu.js +248 -245
- package/src/collector/idleAttestation.js +480 -480
- package/src/collector/sabTimer.js +189 -191
- package/src/errors.js +54 -0
- package/src/fingerprint.js +475 -475
- package/src/index.js +345 -342
- package/src/integrations/react-native.js +462 -459
- package/src/integrations/react.js +184 -185
- package/src/middleware/express.js +155 -155
- package/src/middleware/next.js +174 -175
- package/src/proof/challenge.js +249 -249
- package/src/proof/engagementToken.js +426 -394
- package/src/proof/fingerprint.js +268 -268
- package/src/proof/validator.js +82 -142
- package/src/registry/serializer.js +349 -349
- package/src/terminal.js +263 -263
- package/src/update-notifier.js +259 -264
- package/dist/pulse.cjs.js.map +0 -1
package/SECURITY.md
CHANGED
|
@@ -9,8 +9,8 @@ We take vulnerabilities seriously and will respond promptly.
|
|
|
9
9
|
|
|
10
10
|
| Version | Supported |
|
|
11
11
|
| ------- | ------------------ |
|
|
12
|
-
| 0.
|
|
13
|
-
| < 0.
|
|
12
|
+
| 0.8.x | :white_check_mark: Security fixes + active development |
|
|
13
|
+
| < 0.8 | :x: Deprecated — critical security vulnerabilities. Upgrade immediately. |
|
|
14
14
|
|
|
15
15
|
## Threat Model
|
|
16
16
|
|
|
@@ -18,12 +18,18 @@ We take vulnerabilities seriously and will respond promptly.
|
|
|
18
18
|
- Automated bots running in cloud VMs / Docker containers with no real hardware
|
|
19
19
|
- Headless browser automation (Puppeteer, Playwright) on virtual machines
|
|
20
20
|
- Credential-stuffing and account-takeover attacks from datacenter IP ranges
|
|
21
|
+
- Click farms (via proof-of-idle thermal cooling analysis)
|
|
22
|
+
- LLM-controlled browser agents (via behavioral biometrics)
|
|
23
|
+
- Coordinated inauthentic behavior (via population-level statistical analysis)
|
|
24
|
+
- Proof replay attacks (via HMAC-signed challenges + atomic nonce consumption)
|
|
25
|
+
- Payload tampering (via BLAKE3 commitment integrity)
|
|
21
26
|
|
|
22
27
|
**What pulse does NOT claim to protect against:**
|
|
23
28
|
- A determined human attacker on real consumer hardware
|
|
24
|
-
- A physical device farm
|
|
29
|
+
- A physical device farm where each device genuinely cools between interactions
|
|
25
30
|
- Kernel-level hooks that spoof `performance.now()` at nanosecond precision
|
|
26
31
|
- Server-side replay attacks when `checkNonce` is not wired (always wire it)
|
|
32
|
+
- GPU passthrough VMs with native hardware clock access
|
|
27
33
|
|
|
28
34
|
## Reporting a Vulnerability
|
|
29
35
|
|
|
@@ -55,32 +61,31 @@ You will receive credit in the changelog unless you prefer to remain anonymous.
|
|
|
55
61
|
## Cryptographic Primitives
|
|
56
62
|
|
|
57
63
|
- **Hashing**: BLAKE3 via `@noble/hashes` — audited, constant-time implementation
|
|
64
|
+
- **Challenge signing**: HMAC-SHA256 over `nonce|issuedAt|expiresAt` with timing-safe comparison
|
|
65
|
+
- **Engagement tokens**: HMAC-SHA256 over fraud-relevant fields with 30-second TTL
|
|
58
66
|
- **Nonce generation**: `crypto.getRandomValues()` / Node.js `webcrypto` — 256 bits of entropy
|
|
59
67
|
- **Webhook signatures**: HMAC-SHA256 — standard authenticated integrity check
|
|
68
|
+
- **API key comparison**: `crypto.timingSafeEqual` — constant-time to prevent timing attacks
|
|
60
69
|
|
|
61
|
-
##
|
|
70
|
+
## Privacy
|
|
62
71
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
### No raw data leaves the browser
|
|
69
|
-
The server receives only a ~1.6 KB statistical summary (means, variances, percentiles).
|
|
70
|
-
Raw timing arrays and mouse coordinates stay on device. This is intentional — it
|
|
71
|
-
limits what a compromised server can learn about the client.
|
|
72
|
-
|
|
73
|
-
### Registry is additive
|
|
74
|
-
The VM classification registry (which vendor a VM is from) is separate from detection.
|
|
75
|
-
A VM can be detected by physics even if its vendor is not in the registry.
|
|
72
|
+
- Raw timing arrays never leave the device — server receives only a ~1.6 KB statistical summary
|
|
73
|
+
- Mouse coordinates are never stored — only timing deltas between events
|
|
74
|
+
- Keystrokes capture only dwell/flight times — key labels are discarded immediately
|
|
75
|
+
- `hardwareId()` is a 128-bit BLAKE3 hash — stable per device, not reversible, not cross-origin linkable
|
|
76
|
+
- No IP addresses are logged by default — integrators should implement their own IP handling policy
|
|
76
77
|
|
|
77
78
|
## Secure Deployment Checklist
|
|
78
79
|
|
|
79
|
-
- [ ] Set `NODE_ENV=production` to
|
|
80
|
-
- [ ]
|
|
81
|
-
- [ ] Set `
|
|
80
|
+
- [ ] Set `NODE_ENV=production` to enforce secret validation at startup
|
|
81
|
+
- [ ] Set `PULSE_CHALLENGE_SECRET` to a cryptographically random 64-char hex string
|
|
82
|
+
- [ ] Set `WEBHOOK_SECRET` to a separate cryptographically random string
|
|
83
|
+
- [ ] Wire `checkNonce` to Redis `DEL` (returns 1 on first use) for atomic replay prevention
|
|
84
|
+
- [ ] Set `REDIS_URL` for multi-instance deployments (in-memory store is single-instance only)
|
|
82
85
|
- [ ] Put the API server behind TLS (nginx / Caddy / ALB)
|
|
83
|
-
- [ ] Set `
|
|
84
|
-
- [ ] Set `minJitterScore`
|
|
86
|
+
- [ ] Set `CORS_ORIGINS` to your exact domain — not `*`
|
|
87
|
+
- [ ] Set `minJitterScore` >= 0.65 for high-value endpoints
|
|
85
88
|
- [ ] Monitor `riskFlags` in webhook payloads for anomaly detection
|
|
89
|
+
- [ ] Use `/health/ready` (not `/health`) for load balancer health checks
|
|
86
90
|
- [ ] Rotate `PULSE_API_KEYS` regularly; use different keys per environment
|
|
91
|
+
- [ ] Review `webhook.dead_letter` log events for delivery failures
|
package/bin/svrnsec-pulse.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* svrnsec-pulse CLI
|
|
4
|
-
* Usage: npx svrnsec-pulse <command> [options]
|
|
5
|
-
*/
|
|
6
|
-
import { run } from '../src/cli/runner.js';
|
|
7
|
-
run(process.argv.slice(2));
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* svrnsec-pulse CLI
|
|
4
|
+
* Usage: npx svrnsec-pulse <command> [options]
|
|
5
|
+
*/
|
|
6
|
+
import { run } from '../src/cli/runner.js';
|
|
7
|
+
run(process.argv.slice(2));
|