code wiki / _hdl_build / nx_hr_bot_behavior.nx

nx_hr_bot_behavior.nx

buildroot/runtime/_hdl_build/nx_hr_bot_behavior.nx

4585 B55 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic hr
docsdependenciesstructsconstsfunctions

about

nx_hr_bot_behavior.nx -- NISHI HR, visitor module REDESIGNED for PRIVACY + sophistication (operator 2026-06-20: "we are NOT going to log visitors / we don't want IP / we don't want anything; evaluate bots by BEHAVIOR even if they are sophisticated"). SUPERSEDES the UA/IP approach (nx_hr_visitor list-match + nx_hr_visitor_log IP-log), which sophisticated bots defeat (UA spoof + residential-IP rotation) AND which logs PII. This evaluates a visitor purely from EPHEMERAL per-session BEHAVIOR signals -- ZERO IP / UA / identity inputs by construction (privacy by design: nothing about the visitor is stored). Researcher-grounded (sovereign fetch, cited): knowledge/fetched/botbehavior_scraping.raw -- web-scraping countermeasures: CAPTCHA/challenge, fingerprinting, bot-detection, HONEYPOTS (invisible traps humans never touch). [en.wikipedia.org/wiki/Web_scraping] knowledge/fetched/botbehavior_fingerprint.raw -- passive/behavioral fingerprinting signals. [.../Device_fingerprint] knowledge/fetched/botbehavior_bot.raw -- bot taxonomy/threat. [.../Internet_bot] DESIGN: no single signal (a sophisticated bot fakes any one); LAYER them + impose a cost (proof-of-work/JS challenge) -- a bot can spoof a UA but cannot cheaply manufacture real human interaction entropy AND solve a per-session challenge AND stay consistent. Signals are 0..100 (or 0/1), computed live by the front-end and DISCARDED after the verdict. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_hr_bot_behavior.nx nx_hr_bot_behavior_gate.nx

imports: nx_syscalls.nx

imported by: nx_hr_bot_behavior_gate.nx

structs

none

consts

17const HB_ALLOW: i64 = 0
18const HB_CHALLENGE: i64 = 1 // ambiguous -> raise a cost (proof-of-work / interactive challenge), don't block a human
19const HB_BLOCK: i64 = 2
22const HB_BLOCK_THRESH: i64 = 60
23const HB_CHALLENGE_THRESH: i64 = 30

functions

32func hb_bot_score(interaction_entropy: i64, timing_regularity: i64, challenge_solved: i64, sequence_anomaly: i64, honeypot_hit: i64, env_consistent: i64) -> i64
called by 2: hb_evaluatemain
46func hb_verdict(score: i64) -> i64
called by 2: hb_evaluatemain
52func hb_evaluate(interaction_entropy: i64, timing_regularity: i64, challenge_solved: i64, sequence_anomaly: i64, honeypot_hit: i64, env_consistent: i64) -> i64
called by 1: main calls 2: hb_verdicthb_bot_score
55func hb_verdict_name(v: i64) -> *u8 { if v == HB_BLOCK { return "BLOCK" as *u8 } if v == HB_CHALLENGE { return "CHALLENGE" as *u8 } return "ALLOW" as *u8 }