Skip to content

add new bot detection methods - #370

Open
buixor wants to merge 1 commit into
masterfrom
bot-challenge_detection-modules
Open

buixor wants to merge 1 commit into
masterfrom
bot-challenge_detection-modules

Conversation

@buixor

@buixor buixor commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Copilot AI lite review requested due to automatic review settings September 10, 2026 07:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 thread challenge/codecs-v1.js
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 thread challenge/codecs-v1.js
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 thread challenge/fonts-v1.js
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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants