Incomplete Patch Leaves USB-Agent Registration Endpoint Exposed to TPM Verification Bypass
A critical security fix addressing TPM verification bypass remains partially unapplied, leaving the USB-agent registration endpoint vulnerable to the same flaw that Issue #2 originally identified. The schema change required to enforce mandatory EK certificate submission was only applied to one request model, while the corresponding handler endpoint retained its fallback path for unverified registration.
The vulnerability centers on the `RegisterRequest` schema in `schemas/requests.py`, where `ek_cert_pem` still defaults to an empty string rather than enforcing a required value. In contrast, `SelfRegisterRequest` was correctly updated with no default, making the field mandatory. The handler in `handlers/registration.py` still contains conditional logic that logs a warning and proceeds with registration using only the self-reported `ek_fingerprint` when no EK material is provided—meaning TPM verification is bypassed entirely for requests hitting this code path.
This means the critical vulnerability described in Issue #2 can still be exploited through the USB-agent registration endpoint, despite the fix being marked as merged. Any client targeting this specific endpoint can register without providing valid TPM endorsement credentials, undermining the trust model the system is designed to enforce. The incomplete schema update allows the handler's fallback path to remain active, creating a documented but unpatched attack surface. Security reviewers should treat this as an open finding pending the schema correction and handler logic update for `RegisterRequest`.