Bot Detection Without
the Vendor Tax
Own your fraud signals. <secure-telemetry-provider> wraps any <secure-form> and attaches a cryptographically-signed behavioral envelope to every submission. No third-party SDKs. No CAPTCHA friction. No per-transaction pricing. Just raw signals your backend can act on.
Existing Solutions Make the Wrong Trade-offs
Enterprise bot detection is dominated by expensive SaaS platforms that add friction, share your users' data with third parties, and give you a black-box score you can't audit.
Vendor Lock-in and Cost
Arkose Labs, reCAPTCHA Enterprise, and DataDome charge per-transaction or per-session. At scale that cost becomes significant. Switching vendors means re-integrating your entire fraud stack.
Third-party Data Sharing
Every CAPTCHA call ships your users' behavioral data to an external server outside your control. That raises GDPR/CCPA exposure and creates a data relationship you didn't explicitly design.
Black-box Scoring
You receive a pass/fail verdict you cannot inspect or appeal. When the vendor changes their model, your false positive rate changes without warning and you have no recourse beyond contacting support.
Three Steps, Zero Third Parties
Every signal is collected inside the browser, signed locally with SubtleCrypto, and verified server-side with a shared key. No external calls. No latency. No cost per submission.
Collect
From the moment the page loads, the provider monitors automation flags, DOM mutations, injected scripts, and user interaction patterns.
MutationObserver (script injection)
mousemove / keydown / pointerdown
Sign
On form submit, signals are bundled with a nonce and timestamp then signed with HMAC-SHA-256 via the Web Crypto API. The signature prevents casual forgery.
sig = HMAC-SHA-256(key, payload)
envelope → event.detail._env
Verify
Your backend re-computes the HMAC using the shared key. A valid signature means the envelope was not tampered with. You own the risk decision logic.
riskScore(signals) → allow / challenge / reject
your rules, your thresholds
Nine Behavioral Signals
All signals are heuristic. A sufficiently motivated attacker can spoof them. The value is raising the cost and effort of scripted attacks, not providing cryptographic proof of humanity.
| Signal | Type | Description | Risk if true |
|---|---|---|---|
webdriverDetected | boolean | navigator.webdriver === true — set by Selenium, Playwright, Puppeteer | Critical |
headlessDetected | boolean | HeadlessChrome user-agent string or missing Chrome APIs in a Chrome UA context | Critical |
domMutationDetected | boolean | Script tags were added to the DOM after page load via MutationObserver | High |
injectedScriptCount | number | Count of script elements injected after initial page parse | High |
suspiciousScreenSize | boolean | Screen dimensions are zero or less than 100 × 100 px — typical of headless configs | High |
pointerType | "mouse" | "touch" | "pen" | "none" | Pointer type recorded from first pointerdown event; none = no pointer interaction | Medium |
mouseMovementDetected | boolean | At least one mousemove event recorded since page load | Low alone |
keyboardActivityDetected | boolean | At least one keydown event recorded since page load | Low alone |
Your Rules, Your Thresholds
The component delivers signed signals. What you do with them is entirely up to you. Here are three common patterns.
webdriverDetected or headlessDetected are near-certain automation signals. Reject immediately — no CAPTCHA, no challenge, no retry.
Two or more suspicious signals (no mouse movement, no keyboard, unusual screen, injected scripts) — trigger an additional verification step or hold for manual review.
Assign weights to each signal and compute a composite score. Route high-risk submissions to a fraud review queue while allowing low-risk submissions straight through.
type RiskDecision int
const (
Allow RiskDecision = iota
Challenge // step-up verification
Reject // hard block
)
func Score(env EnvironmentalSignals) (int, RiskDecision) {
score := 0
// Automation — near-certain signals
if env.WebdriverDetected { score += 50 }
if env.HeadlessDetected { score += 40 }
// Suspicious environment
if env.SuspiciousScreenSize { score += 30 }
// DOM tampering
if env.InjectedScriptCount > 0 {
score += env.InjectedScriptCount * 10
}
// No human interaction
if !env.MouseMovementDetected &&
!env.KeyboardActivityDetected {
score += 20
}
switch {
case score >= 50:
return score, Reject
case score >= 20:
return score, Challenge
default:
return score, Allow
}
}How We Compare
Secure-UI gives you the signal layer. You supply the decision logic. No black box. No vendor relationship. No recurring cost.
| Capability | Secure-UI | Arkose Labs | reCAPTCHA Enterprise |
|---|---|---|---|
| Bot / automation detection | ✓ Heuristic signals | ✓ ML model | ✓ ML model |
| User friction (CAPTCHA) | None | Interactive challenges | Checkbox / image select |
| Third-party data sharing | None — self-hosted | Vendor servers | Google servers |
| Per-transaction cost | Zero | Enterprise pricing | Volume pricing |
| Open, inspectable signals | Full access | Opaque score only | Opaque score only |
| Custom risk logic | Complete control | Vendor-managed rules | Limited tuning |
| Tamper-evident signals | ✓ HMAC-SHA-256 | ✓ Signed token | ✓ Signed token |
| Zero runtime dependencies | ✓ | External SDK required | External SDK required |
| Privacy regulation risk | Minimal — no PII | Third-party processing | Third-party processing |
Verify in Any Language
HMAC-SHA-256 is a standard primitive available in every major language. Verification is three lines of logic.
Reconstruct the payload
Re-assemble nonce + "." + issuedAt + "." + JSON(signals) using the values from the submitted envelope.
Verify the signature
Compute HMAC-SHA-256(key, payload) server-side. Compare using a constant-time equality function to prevent timing attacks.
Score and decide
Apply your risk scoring logic to the verified signals. Reject, challenge, or allow based on your threat model and tolerance for false positives.
Treat empty signatures as lower trust
On HTTP (non-secure context), SubtleCrypto is unavailable and the signature will be an empty string. Treat unsigned submissions as untrusted rather than rejected.
package telemetry
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
)
type Envelope struct {
Nonce string `json:"nonce"`
IssuedAt string `json:"issuedAt"`
Environment EnvironmentalSignals `json:"environment"`
Signature string `json:"signature"`
}
type EnvironmentalSignals struct {
WebdriverDetected bool `json:"webdriverDetected"`
HeadlessDetected bool `json:"headlessDetected"`
DomMutationDetected bool `json:"domMutationDetected"`
InjectedScriptCount int `json:"injectedScriptCount"`
SuspiciousScreenSize bool `json:"suspiciousScreenSize"`
PointerType string `json:"pointerType"`
MouseMovementDetected bool `json:"mouseMovementDetected"`
KeyboardActivityDetected bool `json:"keyboardActivityDetected"`
PageLoadToFirstKeystroke int `json:"pageLoadToFirstKeystroke"`
LoadToSubmit int `json:"loadToSubmit"`
}
// Verify checks the HMAC-SHA-256 signature on the envelope.
// Returns ErrInvalidSignature if the signature does not match.
func Verify(env Envelope, signingKey string) error {
if env.Signature == "" {
return fmt.Errorf("unsigned envelope — treat as low trust")
}
signalsJSON, err := json.Marshal(env.Environment)
if err != nil {
return fmt.Errorf("marshal signals: %w", err)
}
payload := env.Nonce + "." + env.IssuedAt + "." +
string(signalsJSON)
mac := hmac.New(sha256.New, []byte(signingKey))
mac.Write([]byte(payload))
expected := hex.EncodeToString(mac.Sum(nil))
if !hmac.Equal([]byte(expected), []byte(env.Signature)) {
return fmt.Errorf("signature mismatch")
}
return nil
}What Is — and Is Not — Collected
The provider collects only behavioral metadata. No keystroke content, no form values, no PII, and no device identifiers are ever included in the envelope.
Collected (behavioral metadata)
- Whether any mouse movement occurred (boolean)
- Whether any keyboard activity occurred (boolean)
- Pointer type on first interaction (mouse / touch / pen / none)
- Whether automation flags are present in the browser
- Whether DevTools appears open (window size heuristic)
- Whether the screen dimensions look suspicious
- Count of script tags injected after page load
Never collected
- Keystroke content or timing sequences
- Any form field values or input data
- IP address or geolocation
- Canvas fingerprint or WebGL hash
- Installed fonts, plugins, or extensions
- Device identifiers (IMEI, MAC, etc.)
- Any data transmitted to third-party servers
Start Collecting Signals Today
Drop <secure-telemetry-provider> around any <secure-form>. No configuration required. Signing key is optional but recommended for production.