Gate tokens on per-device rate; require human key holds for the keyboard exemption - #52
Merged
Merged
Conversation
…lds for the keyboard exemption An automated client on the public demo verified invisible mode every few seconds and received a token each time. The keyboard-only accessibility exemption accepted key events with no pointer as a keyboard user, and the per-minute rate limit only produced a detection in a category weighing 0.01. Per-device rate gate: after 10 verifications in a minute from one page instance on one device at one address the token is withheld with reason rate_limited. Keyed on the widget instance as well as address and fingerprint so identical machines behind one address do not share a budget; no instance id means no gate. Keyboard exemption: when hold data is present, three or more holds averaging under 20ms deny the exemption and the session scores as pointerless. No hold data keeps it. The widget reports keyHoldSamples and keyHoldAvg (durations only, never the key). Bench keyboard personas now hold keys like people. Applied to Go, Node and Python with ten new tests each. Bench gate: human FPR 0.00% (0/126), agent TPR 97.33%. Playwright and E2E suites pass. Claude-Session: https://claude.ai/code/session_0198hVg9KALKecyEFDhsDxdg
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.
What and why
An automated client was observed on the public demo verifying invisible mode every few seconds and receiving a token each time. Two things let it through: the keyboard-only accessibility exemption accepted key events with no pointer as proof of a keyboard user, and the per-minute rate limit only produced a detection in a category that carries almost no weight.
reason: rate_limited. Keyed on the widget instance as well as address and fingerprint, so identical machines behind one address do not share a budget. A client that reports no instance id is not gated. Applied to Go, Node, and Python.Validation
run-bench.js --gate: human FPR 0.00% (0/126), agent TPR 97.33%, PASS.Compatibility
rate_limited, documented in the README.Follow-up
https://claude.ai/code/session_0198hVg9KALKecyEFDhsDxdg