Documentation
¶
Overview ¶
Package sensor ships the browser attestation script (spec §6 L3/L4) and parses its reports. Stdlib-only leaf.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Report ¶
type Report struct {
Webdriver bool `json:"webdriver"`
Languages int `json:"languages"`
Timezone string `json:"tz"`
PointerEvents int `json:"pointer_events"`
}
Report is what the sensor posts to /__merlon/attest. Minimal L4 telemetry (plan ruling 1): presence of real pointer activity plus a non-headless environment profile is the M3 consistency signal.
func ParseReport ¶
ParseReport reads a size-capped JSON report: the read is capped at maxReportBytes (4 KiB) and anything larger is rejected with "sensor: report too large"; decode errors pass through unwrapped. Callers treat any error as a bad report — handlers/challenge.go maps them all to 400.
func (*Report) Consistent ¶
Consistent reports whether the environment looks like a real interactive browser: not webdriver-flagged, languages and timezone present, and at least one pointer event observed during the sampling window.