feat: enhance fingerprinting system with audio_v2, canvas_v2, WebGL2, and spoofing detection#91
feat: enhance fingerprinting system with audio_v2, canvas_v2, WebGL2, and spoofing detection#91Copilot wants to merge 6 commits into
Conversation
Agent-Logs-Url: https://github.com/IntegerAlex/fingerprint-oss/sessions/468aec40-8202-4659-95bf-c8644f4f9774 Co-authored-by: IntegerAlex <84370725+IntegerAlex@users.noreply.github.com>
…bGL2, spoofing detection Agent-Logs-Url: https://github.com/IntegerAlex/fingerprint-oss/sessions/468aec40-8202-4659-95bf-c8644f4f9774 Co-authored-by: IntegerAlex <84370725+IntegerAlex@users.noreply.github.com>
…t Uint8Array hashing Agent-Logs-Url: https://github.com/IntegerAlex/fingerprint-oss/sessions/468aec40-8202-4659-95bf-c8644f4f9774 Co-authored-by: IntegerAlex <84370725+IntegerAlex@users.noreply.github.com>
…plementation Agent-Logs-Url: https://github.com/IntegerAlex/fingerprint-oss/sessions/468aec40-8202-4659-95bf-c8644f4f9774 Co-authored-by: IntegerAlex <84370725+IntegerAlex@users.noreply.github.com>
❌ Deploy Preview for clever-starlight-3034ea failed. Why did it fail? →
|
❌ Deploy Preview for fingerprint-oss failed. Why did it fail? →
|
|
|
There was a problem hiding this comment.
Pull request overview
This PR extends the fingerprinting pipeline by adding an optional enhanced namespace to SystemInfo, collecting additional (noise-stabilized / higher-entropy) signals and a spoofing/headless score while keeping existing outputs and hashing behavior backward-compatible.
Changes:
- Adds
src/enhanced.tswithaudio_v2,canvas_v2,webgl2, spoofing detection, and entropy scoring, plus an aggregatecollectEnhancedFingerprint(). - Extends
SystemInfotyping to includeenhanced?: EnhancedFingerprintInfo. - Wires enhanced collection into
getSystemInfo()and re-exports the new APIs/types viasrc/index.ts.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/enhanced.ts | Implements enhanced signal collection (audio/canvas/WebGL2) + spoofing scoring + entropy estimates. |
| src/types.ts | Adds new enhanced interfaces and attaches enhanced? to SystemInfo. |
| src/systemInfo.ts | Calls collectEnhancedFingerprint() and stores result under systemInfo.enhanced. |
| src/index.ts | Exposes enhanced functions/constants/types as named exports and on the default export object. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
…aths, camelCase keys, non-enumerable enhanced, parallel collection, viewport guard Agent-Logs-Url: https://github.com/IntegerAlex/fingerprint-oss/sessions/84a490dd-5714-45ad-a17a-6e48d30f8eea Co-authored-by: IntegerAlex <84370725+IntegerAlex@users.noreply.github.com>
Agent-Logs-Url: https://github.com/IntegerAlex/fingerprint-oss/sessions/84a490dd-5714-45ad-a17a-6e48d30f8eea Co-authored-by: IntegerAlex <84370725+IntegerAlex@users.noreply.github.com>
Applied all review comments in commit
|
| // baseline async signals (incognito, adBlocker, audio, webGL, cores). | ||
| const enhancedPromise = collectEnhancedFingerprint(); | ||
|
|
There was a problem hiding this comment.
🟠 High src/systemInfo.ts:174
If any intermediate await (e.g., detectIncognito() at line 178) throws before line 256, enhancedPromise is never awaited, causing an unhandled promise rejection when collectEnhancedFingerprint() eventually rejects. This can crash Node.js configured with --unhandled-rejections=throw. Consider chaining .catch(() => {}) to enhancedPromise immediately after creation to suppress unhandled rejection warnings.
// Start enhanced collection early so it runs in parallel with the
// baseline async signals (incognito, adBlocker, audio, webGL, cores).
- const enhancedPromise = collectEnhancedFingerprint();
+ const enhancedPromise = collectEnhancedFingerprint().catch(() => undefined);
// Check for incognito mode
const incognitoMode = await detectIncognito();🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file src/systemInfo.ts around lines 174-176:
If any intermediate `await` (e.g., `detectIncognito()` at line 178) throws before line 256, `enhancedPromise` is never awaited, causing an unhandled promise rejection when `collectEnhancedFingerprint()` eventually rejects. This can crash Node.js configured with `--unhandled-rejections=throw`. Consider chaining `.catch(() => {})` to `enhancedPromise` immediately after creation to suppress unhandled rejection warnings.
Evidence trail:
src/systemInfo.ts lines 175-178 (enhancedPromise creation and first intermediate await), lines 185, 207, 210, 217 (additional intermediate awaits), line 255 (where enhancedPromise is finally awaited), src/incognito.ts line 372 (`main().catch(reject)` showing detectIncognito can reject)
There was a problem hiding this comment.
I'm working on the fix now. Adding .catch(() => undefined) to enhancedPromise to suppress unhandled rejection warnings.
There was a problem hiding this comment.
I was unable to create the branch macroscope/copilot/enhance-fingerprinting-system. This may be due to your branch protection rules. For more information, see the documentation at https://docs.macroscope.com/fix-it-for-me.
|
@macroscopeapp review |
|
@macroscope-app review |
|
Review in progress. Results will be posted when complete. |
|
@macroscope-app review |
|
Review in progress. Results will be posted when complete. |
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR introduces a significant new fingerprinting feature with ~700 lines of new code including audio fingerprinting via OfflineAudioContext, noise-stabilized canvas fingerprinting, WebGL2 signal collection, and spoofing/headless detection. As a substantial new capability with new public API surface, it warrants human review. Additionally, there is an unresolved high-severity comment identifying a potential unhandled promise rejection bug. You can customize Macroscope's approvability policy. Learn more. |
src/enhanced.tswith new fingerprinting functionssrc/types.tswith new enhanced interfacessrc/systemInfo.tsto collect enhanced datasrc/index.tsstable.set(frames[0].data)— the ternary was redundant since both branches returneddata0[i]Note
Add enhanced fingerprinting signals (audio_v2, canvas_v2, WebGL2, spoofing detection) to fingerprint collection
getEnhancedAudioFingerprintusingOfflineAudioContextwith noise-injection detection viagetChannelData/copyFromChannelcomparison.getEnhancedCanvasFingerprintthat renders multiple frames and applies per-byte majority voting to stabilise pixel noise before hashing.getEnhancedWebGL2Infocollecting implementation limits, shader precision, and a hashed extension list from a WebGL2 context.detectSpoofingthat aggregates headless/anti-fingerprinting indicators (e.g. missingwindow.chrome,navigator.webdriver, software renderer, screen heuristics) into a weighted score.collectEnhancedFingerprintand attached as a non-enumerableenhancedproperty onSystemInfo, so JSON serialization andObject.keys()are unaffected.Macroscope summarized 29726a1.