Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new H.264 probe can write results after its deadline has already resolved, causing inconsistent fingerprints depending on timing.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adds new client-side signal collection modules intended for the CrowdSec AppSec bot challenge, expanding the available entropy/consistency checks that can be evaluated by downstream rules (e.g., in appsec-config).
Changes:
- Add font metric probing for UI and emoji font stacks, including a system-font-derived family name.
- Add a WebAssembly-based CPU-architecture signal using NaN bit-pattern differences.
- Add H.264 capability probing via MediaCapabilities (plus a WebRTC capability hint).
File summaries
| File | Description |
|---|---|
| challenge/fonts-v1.js | Collects font advance widths (UI + emoji) and a system UI font family string for spoofing detection. |
| challenge/cpu-arch-v1.wat | Provides the WAT source for a tiny WASM module used to extract NaN bit patterns. |
| challenge/cpu-arch-v1.js | Runs embedded WASM and records the NaN bit-pattern signature as a CPU-arch signal. |
| challenge/codecs-v1.js | Probes H.264 support/power efficiency and a WebRTC H.264 capability hint, with a built-in timeout. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+65
to
+76
| .then((info) => { | ||
| fp.custom.cfH264Sup = !!info.supported; | ||
| // powerEfficient reflects real hardware decode, which is the half a | ||
| // spoofed desktop tends to get wrong. | ||
| fp.custom.cfH264Eff = !!info.powerEfficient; | ||
| clearTimeout(timer); | ||
| finish(); | ||
| }) | ||
| .catch(() => { | ||
| clearTimeout(timer); | ||
| finish(); | ||
| }); |
Comment on lines
+22
to
+24
| // Sentinels: false here means "asked and got no", absent means this module | ||
| // never ran. cfRtcH264 is written before the async work so it survives a | ||
| // timeout on the decodingInfo call. |
Comment on lines
+90
to
+96
| const probe = document.createElement("div"); | ||
| probe.style.font = "menu"; | ||
| probe.style.position = "absolute"; | ||
| probe.style.visibility = "hidden"; | ||
| document.body.appendChild(probe); | ||
| fp.custom.cfFontSys = String(getComputedStyle(probe).fontFamily || "").slice(0, 64); | ||
| probe.remove(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
twin for crowdsecurity/hub#1887