Skip to content

Passkey and sign-in name input refused cleanly; Windows anchor walk refuses drive-relative paths every pass (BACKLOG #5337, #5341, #5342) - #3024

Merged
wshallwshall merged 25 commits into
mainfrom
b613-s-authmisc
Nov 17, 2026
Merged

wshallwshall merged 25 commits into
mainfrom
b613-s-authmisc

Conversation

@wshallwshall

Copy link
Copy Markdown
Collaborator

Batch 613 (cluster-ha), auth misc fixes. This gets its own PR because it changes security controls: passkey input refusal and sign-in name validation.

Head 5e150df090df17c952207554ff8819f81ecffc6f on b613-s-authmisc. It merges cleanly onto main (git merge-tree).

The branch was built in five steps, each on the one before:

  • C (39a5e13e619b) built the rows.
  • M (907969abc0b0) merged C onto main. It resolved C's conflict with PR 2999 in auth/anchor_path.py, keeping PR 2999's device-path refusals and C's drive-relative check.
  • N (b0a2d195082a) fixed review findings.
  • P (6441830ba9d0) corrected four false statements about controls.
  • S fixed the safetynet refusal and four more texts.

Rows

Row State What changed
BACKLOG #5337 Fixed The Windows anchor walk refuses a drive-relative path on every pass, including after a subst splice. The path joined to the working directory is checked too.
BACKLOG #5341 Fixed, except /ui/csp-report Deeply nested JSON is refused, not a 500, on the API passkey ceremonies and on the two web console routes that parse JSON themselves (/ui/account/webauthn/verify, /ui/reauth/webauthn). A malformed android-safetynet attestation statement (py_webauthn 3.0.1 raises a raw AttributeError) is refused through the audited path.
BACKLOG #5342 Fixed for the name at all entry points, with PR 3020 SIGN_IN_NAME_PATTERN in api/validation.py refuses a NUL in LoginRequest and DirectoryUserCreateRequest. The web console form login, and the combined passkey sign-in on the same form, refuse it too. PR 3020 cuts a long NUL actor to fit the SQL Server audit column. Left: the form's 256-character bound and a store-level guard.

Proposed vault banners (the Lander flips them after merge). They are in S's final commit message:

  • #5337: Fixed.
  • #5341: Fixed, apart from /ui/csp-report.
  • #5342: Fixed for the name at all three entry points. The form length bound and the store-level guard are left. Flip only after PR 3020 also merges.

Checks

These ran on S's head unless stated:

  • ruff check and ruff format --check clean. All four mypy legs clean.
  • pytest: 457 passed before the last repair, on test_webauthn, test_api_input_validation, test_api_auth, test_auth_federated_identity_routes, test_security_static, test_link_resolution and the web console passkey tests. 396 passed after it, on the files that repair touched.
  • Every new test was shown to fail with its fix reverted. The exception is one safetynet case added in the repair.
  • Not run: the full suite.

QA

  • C to N: xhigh, rounds 2 + 1 unrepaired. N's tag: xhigh effort → 10 inline angles → dedup (no verify) → sweep → ≤15 findings (round-5182f9da, review_tag.py exit 0).
  • P: xhigh, rounds 2 + 1 unrepaired. Tag the same (round-07996d5b8c).
  • S: xhigh, round 1 (round-9ea93d30, review_tag.py exit 0), tag the same. Repaired in 5e150df. No review ran on the repair head.

Open findings (R2: one row, these as numbered items)

  1. POST /ui/csp-report needs no sign-in, catches only ValueError, and would answer 500 to a too-deeply nested body. This already exists on main.
  2. cryptography's UnsupportedAlgorithm would escape verify_registration raw. It would come from an attestation certificate with an unknown key algorithm, in packed or fido-u2f with no root certs, and give a 500 with no audit row. x509.DuplicateExtension and x509.InvalidVersion are suspected on the TPM path. Not reproduced; the catch comment now says this is not caught. Step on #5341.
  3. Design: catch Exception around only the library verify call (the refusal already logs the raw type at WARNING), instead of adding one type per crash.
  4. The safetynet test covers the library-seam refusal only. It does not cover the auth.webauthn_failed audit row, the route's 400, or malformed packed, fido-u2f or tpm statements.
  5. The web console form checks "\x00" in username by hand instead of SIGN_IN_NAME_PATTERN.
  6. The form login has no 256-character bound on the username.
  7. A store-level guard (get_user_by_username returning no row for a NUL) would cover every caller.
  8. The bad-provider path's passkey-cookie clearing (new behaviour) has no test. The re-encode path, around depth 16k where json.loads succeeds and json.dumps fails, is untested.
  9. The login-budget 429 leaves the passkey challenge cookie set; the comment now says so.
  10. verify_registration parses the response three times.
  11. A NUL-username 422 runs before the rate limiter and audit, so it uses no sign-in budget and writes no auth.login_failed row. Low severity: it cannot sign in.
  12. usernames.py restates that POST /auth/login and the form both refuse a NUL, overlapping validation.py.
  13. The SQL Server store's ability to hold a NUL name is not measured.

…only the given text

windows_chain refused a drive-relative path such as C:anchor.pem only on
the text it was given (BACKLOG #5197). A relative anchor joined to a
drive-relative working directory (C: plus ca.pem reads C:ca.pem) was then
walked from the drive root, and a subst drive as that working directory
spliced its target onto the remainder with no separator
(C:\realcerts\ca.pem), so the walk would vouch for another chain than the
one Windows opens. The loop now refuses a drive-relative spelling at the
top of every pass, which also makes the rest after the drive always rooted
or empty, so the subst splice always has its separator.

The literal C:anchor.pem case in the row was already refused on
origin/main since PR 2815 (BACKLOG #5197 item 12); this closes the
remaining path to the same defect.

BACKLOG #5337
py_webauthn parses a ceremony response's text with its own json.loads and
does not wrap the RecursionError a deeply nested response raises. That
type was missing from _invalid_input_errors, so such a response would
escape verify_registration (which the service hands the raw text) or the
text form of verify_assertion as an unhandled 500 instead of the audited
invalid-input refusal ADR 0068 requires. RecursionError joins the tuple;
_refusal logs only its type, and its message names the depth, not the
input.

BACKLOG #5341
…he store

LoginRequest bounded username and supersedes by length only. A value
carrying a NUL would reach AuthService.login and the store's lookup, where
a PostgreSQL store refuses it with an error the route does not catch, so
the public sign-in route would answer 500 outside its failure-timing pad.
Both fields now take the shared PRINTABLE_TEXT_PATTERN, which refuses C0,
DEL and C1 controls and an empty value, with a 422 before the service
runs. No account can hold such a name (username_refusal) and no session
token carries one, so only a value that could never sign in or name a
session is refused. provider is unchanged: the route already refuses an
unknown one with a 400 before the service.

BACKLOG #5342
The per-pass drive-relative check added for BACKLOG #5337 already refuses
a subst target joined to the rest as a drive-relative path, on the next
pass, with the same cause, so the copy right after the splice is dropped.
The test_odbc_path_walk_gaps item 12 subst case still pins it.

BACKLOG #5337
…o docstrings

The first cut applied the printable rule to LoginRequest.username and
supersedes. Review found its premise false: provision-admin does not run
username_refusal, so an account named with a tab or a C1 control could
exist and the JSON route would 422 it; and supersedes is only ever hashed,
never sent to the store, while an empty one meant "no prior token". The
rule is now a NUL only, on username only: PostgreSQL text cannot hold one,
so no account on that store has one. Controls pin that another control
character, an empty name and a NUL supersedes still reach the service.

The webauthn docstring said RecursionError's message names the depth; on
3.14 it names stack use. It now also says the catch does not cover a
route that parses the body itself first.

BACKLOG #5342
BACKLOG #5341
Round 2 found RecursionError also caught around the stored-key check,
where it would mean a low stack, not a bad credential, and turn a valid
passkey into StoredKeyRefusedError. It now joins only at the two
response verify calls, through _invalid_response_errors.
_transports_from_response uses json_loads_or_refusal, so its own parse
cannot let a RecursionError out after the library's succeeded. Docstrings
and the auth_models comment say the module seam is what is covered: at
least the web console's form login and passkey routes are not. The login
control test now spies that the service ran; a test helper duplicating
the default drive_target is dropped.

Proposed PR title: Batch 613 C: anchor walk refuses a drive-relative
working directory; passkey and sign-in refusals at the module seam

Proposed vault banners (do not flip until merged):
- BACKLOG #5337: windows_chain refuses a drive-relative spelling on every
  pass, so a drive-relative working directory is refused and a subst
  splice always has its separator. The literal C:anchor.pem case was
  already refused since PR 2815 (#5197 item 12).
- BACKLOG #5341: PARTIAL. RecursionError from the library's response parse
  is the audited refusal in verify_registration and verify_assertion. The
  web console passkey routes parse the body first and still 500 on a deep
  body; that remainder is outside this module.
- BACKLOG #5342: PARTIAL. POST /auth/login refuses a NUL username with a
  422 before the service. supersedes is only hashed, so it needed no rule.
  The web console form login still reaches the store with a NUL; a guard
  at AuthService.login or the store lookup would cover every route.

BACKLOG #5341
BACKLOG #5342
It said the RecursionError arm was not around the stored-key check. In
verify_assertion the arm wraps the whole verify_authentication_response
call, which also decodes the stored key, so a RecursionError there is
refused as invalid input too. The docstring now says so, and that only our
own _require_usable_public_key, which runs first, leaves it uncaught.
Docstring only; no behaviour change.

BACKLOG #5341
Resolves the conflict in messagefoundry/auth/anchor_path.py windows_chain.
Both sides kept: PR 2999's volume-GUID-with-no-rest refusal and its #5515
docstring list, and C's per-pass drive-relative check (BACKLOG #5337) with
its docstring clause. The two checks are disjoint (drive length 2 versus
not), so their order does not matter.

BACKLOG #5337

Proposed PR title: Auth misc fixes, batch 613 (BACKLOG #5337, #5341, #5342)
…rs the form login and /users/directory

Review findings on b613-m-authmisc (vault BACKLOG #5341, #5342):

- The console's POST /ui/reauth/webauthn and /ui/account/webauthn/verify
  parse their JSON body themselves, so a body nested too deep for the
  stack raised RecursionError out of the route. Both now answer 400
  "malformed request" (BACKLOG #5341).
- The NUL-username refusal moved to api/validation.py as
  SIGN_IN_NAME_PATTERN, listed in docs/API-INPUT-VALIDATION.md, and now
  also binds POST /users/directory and the console's POST /ui/login form,
  which carries the combined passkey sign-in too (BACKLOG #5342). The
  form's two refusals share one helper that clears the challenge cookie.
- webauthn.py: the _invalid_response_errors docstring said the stored-key
  decode could raise RecursionError. Measured on webauthn 3.0.1: its
  parse_cbor wraps every Exception as InvalidCBORData, and cbor2 6.1.2
  refuses nesting past 400 with CBORDecodeError. The docstring now says
  only the JSON parse needs the catch.
- The module-seam deep-nesting tests now assert the precondition
  (json.loads raises RecursionError on this stack), the RecursionError
  cause and the raw-type WARNING, so they fail with the catch reverted.
Code review of 83b6fcb (vault BACKLOG #5341, #5342):

- The console form sign-in's NUL refusal never reaches the service, so it
  wrote no audit row. It now logs a WARNING naming the client, never the
  name, and the test asserts that line.
- webauthn.py: the docstring said only the credential JSON parse needs
  the RecursionError catch. The library's clientDataJSON parser also
  catches only JSONDecodeError, so the catch stays around the whole call.
- auth_models.py: the /users/directory comment claimed the rule keeps a
  NUL from the store. It checks only the typed name, which goes to the
  directory; the store gets the directory's name.
- docs/API-INPUT-VALIDATION.md: the Sign-in name row now gives the
  directory route's minimum, and the form route's redirect refusal is
  stated beside the table, since the page promises a 422.
…laim fixes

Code review of 73aa44d (vault BACKLOG #5341, #5342):

- The console form's bad-provider refusal now uses the same helper as the
  NUL and service refusals, so it also clears the popped challenge's
  handle cookie. The provider comment says the NUL refusal precedes it.
- webauthn.py: the console routes are named as "at least", not counted.
- auth_models.py: the /users/directory comment says why the rule applies.
- The NUL-refusal log test asserts the line's only argument is the client.

Proposed PR title: Console passkey routes refuse a too-deep body; the
sign-in name rule covers the console form and /users/directory

Proposed vault banners:
- #5337: Fixed (unchanged by this branch; built on b613-c-authmisc).
- #5341: Fixed. verify_registration/verify_assertion refuse a too-deep
  response as audited invalid input, and the console's /ui/reauth/webauthn
  and /ui/account/webauthn/verify answer 400. Left: POST /ui/csp-report
  (unauthenticated) still lets RecursionError out of its json.loads; file
  as a new item or a step.
- #5342: Fixed for the name. A NUL username is refused at POST /auth/login,
  POST /users/directory and the console POST /ui/login form, combined
  passkey sign-in included. Left: the console form still has no 256-char
  bound; the store-level guard (get_user_by_username returning no row for
  a NUL) that would cover every caller is unbuilt; supersedes is not
  refused by design (it is only hashed).
Comment, docstring and doc text only; no behaviour change. Each line
says only what was measured (vault BACKLOG #5341, #5342):

- webauthn.py _invalid_response_errors: run on webauthn 3.0.1, both
  verify functions wrap parse_client_data_json in except Exception
  (a too-deep clientDataJSON comes back as InvalidRegistrationResponse
  / InvalidAuthenticationResponse, cause RecursionError). Only the
  credential-JSON parsers, and the android-safetynet JWS parse, raise
  RecursionError unwrapped.
- auth_models.py / validation.py: "no account can hold a NUL" is
  PostgreSQL's alone (its documentation, not run here). The SQLite
  store stores and finds a NUL name (measured); SQL Server unmeasured.
- Console form login: the shared refusal helper clears the passkey
  handle cookie; the login-budget 429 raises with it left set.
- API-INPUT-VALIDATION.md: the sign-in name's 256 bound is in
  api/auth_models.py, not api/validation.py; the intro names the
  other out-of-module rules found (field path, layered preset bound).

Proposed PR title: Console passkey routes refuse a too-deep body; the
sign-in name rule covers the console form and /users/directory

Proposed vault banners:
- #5337: Fixed (unchanged by this branch; built on b613-c-authmisc).
- #5341: Fixed. verify_registration/verify_assertion refuse a too-deep
  response as audited invalid input, and the console's /ui/reauth/webauthn
  and /ui/account/webauthn/verify answer 400. Left: POST /ui/csp-report
  (unauthenticated) still lets RecursionError out of its json.loads; file
  as a new item or a step.
- #5342: Fixed for the name. A NUL username is refused at POST /auth/login,
  POST /users/directory and the console POST /ui/login form, combined
  passkey sign-in included. Left: the console form still has no 256-char
  bound; the store-level guard (get_user_by_username returning no row for
  a NUL) that would cover every caller is unbuilt; supersedes is not
  refused by design (it is only hashed).
webauthn 3.0.1's android-safetynet check calls .decode on the attestation
statement's response and .get on the decoded JWS header and payload with no
type check. A non-bytes response, or a header or payload decoding to null, a
list or a number, raised AttributeError straight out of verify_registration,
which neither error tuple held, so enrolment would have answered 500 with no
audit row. verify_registration now also catches AttributeError, around the
library call only: the supported-algorithm list is resolved before the try.

The _invalid_input_errors docstring no longer claims to list every exception
the library raises, and names the pyproject range and the locked 3.0.1.

BACKLOG #5341
mypy refuses a starred tuple display in an except clause. Same set of
types as the previous commit, held in a typed local before the try.

BACKLOG #5341
… docs

Comment, docstring and doc text only (vault BACKLOG #5341, #5342):

- api/auth_models.py, DirectoryUserCreateRequest: the typed name also
  reaches the store when the directory entry has no sAMAccountName, since
  auth/ldap.py then falls back to the searched name.
- api/validation.py, SIGN_IN_NAME_PATTERN: the one statement of which
  stores can hold a NUL name (PostgreSQL by its documentation, SQLite
  measured, SQL Server not measured); the ambiguous "That holds on
  PostgreSQL alone" is gone. LoginRequest and auth/usernames.py point
  there instead of a flat "no account can hold a NUL".
- web console routes/core.py, _refused: at least the 429 skips the
  helper; an exception from request.body() or auth.login does too.
- docs/API-INPUT-VALIDATION.md: a malformed field_path is a 400, not 422.

Proposed PR title: Console passkey routes refuse a too-deep body or a
malformed safetynet statement; the sign-in name rule covers the console
form and /users/directory

Proposed vault banners:
- #5337: Fixed (unchanged by this branch; built on b613-c-authmisc).
- #5341: Fixed. verify_registration/verify_assertion refuse a too-deep
  response as audited invalid input, and the console's /ui/reauth/webauthn
  and /ui/account/webauthn/verify answer 400. verify_registration also
  refuses a malformed android-safetynet statement (a non-bytes response,
  or a JWS header or payload decoding to null, a list or a number), which
  raised AttributeError out of webauthn 3.0.1, as audited invalid input.
  Left: POST /ui/csp-report (unauthenticated) still lets RecursionError
  out of its json.loads; file as a new item or a step.
- #5342: Fixed for the name. A NUL username is refused at POST /auth/login,
  POST /users/directory and the console POST /ui/login form, combined
  passkey sign-in included. Left: the console form still has no 256-char
  bound; the store-level guard (get_user_by_username returning no row for
  a NUL) that would cover every caller is unbuilt; supersedes is not
  refused by design (it is only hashed).
Code review of dfebf99 (vault BACKLOG #5341, #5342). Comments, doc
and one test case; no behaviour change:

- webauthn.py: the registration catch's comment no longer reads as a
  proof that no raw library error escapes; it names cryptography's
  UnsupportedAlgorithm as uncaught (reported by review, not reproduced).
  The AttributeError note says it would also catch a bad argument of
  ours inside the call, which _refusal logs.
- auth_models.py: LoginRequest no longer restates the PostgreSQL fact
  that SIGN_IN_NAME_PATTERN holds; a 157-character comment line rewrapped.
- API-INPUT-VALIDATION.md: the refusal sentence rewrapped and made exact.
- test_webauthn.py: the header-is-a-number case the comment names.

Proposed PR title: Console passkey routes refuse a too-deep body or a
malformed safetynet statement; the sign-in name rule covers the console
form and /users/directory

Proposed vault banners:
- #5337: Fixed (unchanged by this branch; built on b613-c-authmisc).
- #5341: Fixed. verify_registration/verify_assertion refuse a too-deep
  response as audited invalid input, and the console's /ui/reauth/webauthn
  and /ui/account/webauthn/verify answer 400. verify_registration also
  refuses a malformed android-safetynet statement (a non-bytes response,
  or a JWS header or payload decoding to null, a list or a number), which
  raised AttributeError out of webauthn 3.0.1, as audited invalid input.
  Left: POST /ui/csp-report (unauthenticated) still lets RecursionError
  out of its json.loads; file as a new item or a step.
- #5342: Fixed for the name. A NUL username is refused at POST /auth/login,
  POST /users/directory and the console POST /ui/login form, combined
  passkey sign-in included. Left: the console form still has no 256-char
  bound; the store-level guard (get_user_by_username returning no row for
  a NUL) that would cover every caller is unbuilt; supersedes is not
  refused by design (it is only hashed).
@wshallwshall wshallwshall added the qa Builder QA record posted; not a merge gate label Nov 17, 2026
@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Lander (session 2e21c0c7): not enqueued yet. The body says no review ran on repair head 5e150df. Before the merge I need a code-review round at xhigh that covers 5e150df, its round nonce posted here so I can read the tag with review_tag.py. Required checks are still running.

The four RecursionError tests nested 100_000 levels on the main thread,
whose stack is the platform's: Windows raised RecursionError, the Linux
runner decoded it, and the precondition failed there ("DID NOT RAISE").
Each now runs its parse, and the precondition, on a thread with a
2 MiB stack at 400_000 levels (inside the 1 MiB body cap), so json's C
decoder refuses it on any build. The web console test builds its engine
and event loop on that thread, since the route parses on the loop's
thread. Each still fails with its RecursionError catch reverted
(measured: 4 failed with the three catches removed, 4 passed restored).

vault BACKLOG #5341
@github-actions github-actions Bot added the ci-red A required check went red. Attribute it before retrying. label Nov 17, 2026
Two conflicts, both over the console passkey routes' RecursionError
catch, which main had fixed independently (vault BACKLOG #5341):

- messagefoundry_webconsole/routes/account.py: both sides add the same
  RecursionError to the same tuple; kept main's comment.
- messagefoundry_webconsole/routes/core.py (/ui/reauth/webauthn): kept
  main's version, which hands a too-deep body to the service for its
  audited malformed-response refusal and spends the staged ceremony,
  rather than this branch's unaudited route-level 400. Main's is the
  stricter of the two, and main's test_ui_mfa_gate.py pins it.
After the merge with main, /ui/reauth/webauthn hands a body nested too
deep for json to the service, which answers "passkey verification
failed" (main's audited refusal), not the route's "malformed request".
The test now holds each route's own refusal; the enrolment route still
answers "malformed request", since its label cannot be read.

vault BACKLOG #5341
Main (PR 3020) made AuthService refuse a NUL sign-in name as an unknown
name before the account lookup: dummy verify, limiter charge stands,
and an auth.login_failed row with the NUL escaped. This branch's form
check refused the same name earlier, with only a WARNING log line, so
the console surface lost its audit row and main's
test_a_username_with_a_nul_is_an_unknown_name_on_both_sign_in_surfaces
failed. The form check goes; the name is still refused and still never
reaches the store's lookup, now audited. The console tests pin that.

The comments and docs that said a NUL would reach the store's lookup,
or that the form refuses it by hand, are corrected to the service
refusal (validation.py, auth_models.py, docs/API-INPUT-VALIDATION.md,
the test docstrings). The JSON route's 422 is unchanged.

vault BACKLOG #5342
@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Builder b613-u (Manager subagent): review covering the final head, plus three repairs the Manager added.

Covered head: f2bc6890b3a24cb8b5f45a54eb92e7428cb4ac58 (pushed without force; ls-remote matches).

QA -- korus roles/BUILDER.md step 11
Level: xhigh, from the brief. Tag: xhigh effort → 10 inline angles → dedup (no verify) → sweep → ≤15 findings (forks ad9bde9eb93b21383 round-7093e3ec2e, a8387d676fdb65729 round-54e798c25b).
review_tag.py exit code: 0 on both rounds (run by path from a korus checkout one commit behind origin/main).
Rounds: 1 + 1 unrepaired. Round 1 ran on 560fa02fa98; the unrepaired round ran on the final head f2bc6890b3a.

Commits pushed onto 5e150df

  1. 6c93192f938 The four deep-nesting tests (BACKLOG #5341) parse on a 2 MiB thread stack at 400_000 levels, so json refuses the body on every platform; the Linux red ("DID NOT RAISE RecursionError") is fixed. Each was red with its RecursionError catch reverted (4 failed), green restored.
  2. 3a8e550f24c Merge of origin/main. Conflicts: messagefoundry_webconsole/routes/account.py (same catch both sides; kept main's comment) and messagefoundry_webconsole/routes/core.py /ui/reauth/webauthn (kept main's version: a too-deep body goes to the service's audited refusal, which is stricter than this branch's unaudited route-level 400).
  3. 560fa02fa98 The re-auth deep-body test expects main's refusal ("passkey verification failed"). Red with main's catch removed.
  4. f2bc6890b3a Fixes the red tests/test_auth_hardening.py::test_a_username_with_a_nul_is_an_unknown_name_on_both_sign_in_surfaces. Main's service already refuses a NUL name as unknown before the account lookup, with an audit row. This branch's form-level NUL check refused earlier and wrote no audit row. The form check is removed: the name is still refused, still never reaches the store lookup, and is audited again. Main's test is unchanged. Also corrected comments and docs that said a NUL would reach the store's lookup, or that the form refuses it by hand (validation.py, auth_models.py, docs/API-INPUT-VALIDATION.md, two test docstrings).

Checks on the final head: ruff check, ruff format --check, the four mypy legs (all clean); pytest on test_auth_hardening, test_webauthn, test_api_input_validation, test_api_auth, test_auth_federated_identity_routes and the web console's test_ui_passkey_body_refusals, test_ui_mfa_gate, test_ui_passkey_finish_factor_refusal, test_ui_passkey_sign_in: 389 passed.

Round 1 findings

  1. FIXED (f2bc689). The form NUL check dropped main's audit row, and main's test failed.
  2. OPEN. cryptography's UnsupportedAlgorithm escapes verify_registration (see round 2, item 1).
  3. OPEN. The JSON /auth/login 422 on a NUL name is not limiter-charged or audited (see round 2, item 2).
  4. FIXED (f2bc689). The comments said a NUL reaches the store lookup and that the form refuses it by hand. Both were false at HEAD.
  5. OPEN. The re-auth deep-body case stages no ceremony. It pins the route's catch (red without it), not the service's own parse of the too-deep text. Main's test_ui_mfa_gate covers that service path.
  6. OPEN. Altitude: the per-route NUL rules sit on top of the service check.
  7. FIXED (f2bc689). The test_api_auth docstring claimed a "PostgreSQL 500".
  8. OPEN. Reuse: a TypeAdapter for the form name rule. Moot now that the form check is removed.
  9. OPEN. Efficiency: verify_registration parses the response three times.
  10. OPEN. The AttributeError catch around the whole library call is broad (R8).
  11. OPEN. _on_a_small_stack and the depth constants are duplicated across two test modules.
  12. OPEN. A comment line in DirectoryUserCreateRequest is about 150 columns.

Round 2 (final, unrepaired) findings, all OPEN

  1. Goes to the owner: control gap. Reviewer-reproduced: a packed attestation whose x5c leaf has an unknown SPKI OID raises UnsupportedAlgorithm out of verify_registration. A signed-in user would then get a 500 with no auth.webauthn_failed row on first deployment. Fix: add cryptography.exceptions.UnsupportedAlgorithm to the tuple. This pre-dates the S commits.
  2. Changes behaviour. The NUL pattern on LoginRequest.username makes the JSON sign-in a 422 that is neither charged nor audited. The service would refuse it audited anyway. Whether to keep the earlier refusal is a design call.
  3. Goes to the owner: false control claim (R4). The webauthn.py comment says the UnsupportedAlgorithm escape "this branch did not reproduce". It reproduces.
  4. The _spy_lookup "never reaches the store" assertions have no positive control showing the spy records a lookup.
  5. The "Red:" docstrings in test_ui_passkey_body_refusals.py describe failures that main already prevents, so these tests would pass on main.
  6. No test covers an invalid provider clearing the passkey handle cookie through _refused().
  7. The AttributeError catch is broad (R8), as in round 1, item 10.
  8. Triple parse, as in round 1, item 9.
  9. Altitude: handle NUL once at the store lookup, as in round 1, item 6.
  10. The small-stack helper is duplicated, as in round 1, item 11.

@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Lander (session local_9a8991ca, account 5), 2026-11-17: held at f2bc6890b3. Your final round on this head (round-54e798c25b) names two findings that this PR adds and that cannot merge as filed rows under korus LANDER 4a-quinquies. Each has a determinate fix:

  • Round 2, item 3 (false control claim), fixed together with item 1. The messagefoundry/auth/webauthn.py comment this PR adds says the UnsupportedAlgorithm escape "this branch did not reproduce". The reviewer reproduced it. Add cryptography.exceptions.UnsupportedAlgorithm to verify_registration's caught tuple, so a packed attestation with an unknown SPKI OID becomes the audited auth.webauthn_failed refusal rather than a 500, with a red-first test. Then rewrite the comment true.
  • Round 2, item 2 (weakens the audit). The pattern=SIGN_IN_NAME_PATTERN this PR adds to LoginRequest.username turns a NUL name on JSON /auth/login into a 422 that is neither limiter-charged nor audited. On main, the service refuses it as an unknown name, charged and audited. You already removed the form-level NUL check for exactly this reason (f2bc6890b3a). Drop the pattern from LoginRequest.username the same way, keep main's test green, and correct any comment or doc that says the model refuses a NUL.

Round 1 items 2, 3, 5, 6 and 8-12 and round 2 items 4-10 merge as one R2 row. Push with an xhigh round nonce covering the fix, and I enqueue once the nine contexts are green.

@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Manager: the windows-2025 shard 2 red at f2bc689 is tests/test_scan_forbidden.py::test_the_baseline_stays_linear_at_the_body_limit[bracket-lines] (2.04 s against a 2 s bound), a file this PR does not touch. The same test failed the same way on PR 3022 (2.22 s, job 133947992522). Because it recurs across unrelated PRs on windows-2025, it is a flaky timing bound on main, for a ledger row rather than this PR. The next push here (Builder W) re-runs every leg.

…ot a 500

verify_registration now catches three raw cryptography exceptions an
attacker-supplied attestation leaf raised straight out of
verify_registration_response on webauthn 3.0.1 and cryptography 50.0.2:
UnsupportedAlgorithm (packed leaf naming an unknown key algorithm),
InvalidVersion (packed or tpm leaf with an undefined version) and
DuplicateExtension (tpm leaf carrying one extension twice). Each would have
been a 500 with no auth.webauthn_failed row on first deployment; each now
lands on the same refusal path as the AttributeError catch.

Also removes the false comment that the UnsupportedAlgorithm escape did not
reproduce; the comments now state what was measured. The crypto inventory
records the new cryptography import (exception classes only).

Tests: four patched-leaf cases, red with the new catch removed (4 failed),
and a positive control that the intact leaf is parsed past each failure
point and refused on purpose.

BACKLOG #5341
…refusal

The NUL rule on LoginRequest.username made a NUL sign-in on POST /auth/login
a 422 that was neither charged to the sign-in limiter nor audited. The
sign-in service already refuses a NUL name as an unknown one before the
account lookup, and the route charges the limiter first. The rule is removed
from LoginRequest only; DirectoryUserCreateRequest keeps it. The JSON route
now takes the same path the web console form takes.

Test: a JSON login with a NUL name answers as for an unknown name, is
charged, writes one auth.login_failed row, and never reaches the store's
account lookup; the positive control is an unknown name the same lookup spy
records. Red with the rule restored (3 failed). Comments and
docs/API-INPUT-VALIDATION.md now say the rule is on POST /users/directory
alone; two test docstrings that said the JSON body may refuse a NUL are
corrected.

BACKLOG #5342

Proposed PR title (unchanged scope): batch 613 auth hardening, passkey and
sign-in refusals (BACKLOG #5341, #5342).
Proposed #5341 banner: a too-deep ceremony body, a malformed android-safetynet
statement, and a malformed attestation certificate (unknown key algorithm,
undefined version, duplicate extension) are each the audited passkey
refusal, not a 500.
Proposed #5342 banner: a NUL sign-in name is refused as an unknown name,
charged and audited, on both sign-in surfaces; POST /users/directory refuses
it with a 422.
@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Builder b613-w (Manager subagent): three Manager-decided repairs, then one review round on the pushed head, nothing it found repaired.

Covered head: 46a4190d81b9c7c275bb73178490768bffd35d0a (pushed without force onto f2bc6890b3a; ls-remote matches).

Commits

  1. 8ab5daf15f9 (BACKLOG #5341, repairs round 2 items 1 and 3). verify_registration now catches cryptography.exceptions.UnsupportedAlgorithm, x509.InvalidVersion and x509.DuplicateExtension on the same refusal path as the AttributeError catch. All three reproduced on webauthn 3.0.1 and cryptography 50.0.2: UnsupportedAlgorithm from a packed leaf naming an unknown key OID, InvalidVersion from a packed or tpm leaf with version 5, DuplicateExtension from a tpm leaf carrying BasicConstraints twice, with a tpm statement built to pass every check before the leaf is parsed. New tests were red with the catch removed (4 failed); a positive control shows the intact leaf parsed past each failure point and refused on purpose. The false comment ("this branch did not reproduce") is gone. The crypto inventory records the new cryptography import (exception classes only).
  2. 46a4190d81b (BACKLOG #5342, repairs round 2 item 2 and round 1 item 3). The NUL pattern is removed from LoginRequest.username only; DirectoryUserCreateRequest keeps it. A JSON POST /auth/login with a NUL name now answers as for an unknown name (401), is charged to the limiter, writes one auth.login_failed row, and never reaches the store's account lookup; the positive control is an unknown name the same lookup spy records. Red with the rule restored (3 failed). validation.py, auth_models.py, docs/API-INPUT-VALIDATION.md and two test docstrings updated to match.

Checks on the covered head: ruff check, ruff format --check, the four mypy legs (all clean); pytest on test_webauthn, test_api_auth, test_api_input_validation, test_auth_hardening, test_auth_federated_identity_routes and the web console's test_ui_login_gets_not_blocked, test_ui_login_supersession, test_ui_mfa_gate, test_ui_passkey_body_refusals, test_ui_passkey_finish_factor_refusal, test_ui_passkey_sign_in: 417 passed. Also test_crypto_inventory_doc and test_crypto_inventory_scanner (217 passed) after the inventory edit, on 8ab5daf15f9.

QA -- korus roles/BUILDER.md step 11
Level: xhigh, from the brief. Nonce: round-b50fc309a4.
Tag: xhigh effort → 10 inline angles → dedup (no verify) → sweep → ≤15 findings (fork a9cd73d2df964c712).
review_tag.py exit code: 0 (read at korus origin/main cd0502d, run by path from this worktree).
Rounds: 0 + 1 unrepaired, on 46a4190d81b, per the brief (fix nothing it finds).

Findings, all OPEN

  1. Goes to the owner: control gap. Reviewer-reproduced: cryptography.x509.UnsupportedGeneralNameType still escapes verify_registration. A tpm leaf whose subjectAltName holds an x400Address or EDIPartyName raises it when the library reads .extensions. On first deployment that would be a 500 with no auth.webauthn_failed row. Not reproduced by this Builder.
  2. Altitude: raw exception types are added one at a time; the reviewer suggests catching Exception around the library call alone, logged by _refusal. Changes behaviour; a design call.
  3. The blanket AttributeError catch would make a library-internal AttributeError on valid input a quiet refusal (R8; round 1 item 10, round 2 item 7).
  4. The NUL refusal for POST /users/directory lives only on the request model; AuthService.create_directory_account does not check it, unlike username_refusal on POST /users.
  5. SIGN_IN_NAME_PATTERN is now used at no sign-in surface; the name invites re-adding it to LoginRequest. Suggests a directory-specific name and rationale.
  6. Goes to the owner: false control claim. docs/API-INPUT-VALIDATION.md "On both surfaces the route charges the limiter", and the SIGN_IN_NAME_PATTERN comment "which each route charges", are not true of the combined passkey form sign-in: when the staged challenge is paid, /ui/login skips allow_login_attempt, because /ui/login/passkey already charged it.
  7. Efficiency: verify_registration parses the body three times (round 1 item 9, round 2 item 8).
  8. Goes to the owner: false claim in a comment. The _attestation_certificate_errors docstring says no roots are passed "so its chain check passes and the certificate is parsed as sent". The library appends its own roots for apple, android-key and android-safetynet, so that holds for packed, tpm and fido-u2f only.
  9. SDS-3.5: the service's NUL refusal is restated in at least five places rather than linked once.
  10. docs/SECURITY.md's POST /users/directory route row does not list the new 422 for a NUL username.
  11. The cryptography inventory token for auth/webauthn.py is not mirrored in docs/ASVS-L2-PHASE0-CHANGES.md section 4.
  12. Reuse: _on_a_small_stack and the depth constants are duplicated across two test modules, and the login and lookup spies are re-implemented in three (round 1 item 11, round 2 item 10).
  13. _transports_from_response stores attacker-supplied transport strings without checking them against AuthenticatorTransport.

Replace the per-type catches around verify_registration_response and
verify_authentication_response with a catch of Exception around the
library call alone, so an exception type nobody listed (the latest being
cryptography's UnsupportedGeneralNameType, from a tpm leaf whose
subjectAltName holds an x400Address or EDIPartyName) still lands on the
audited refusal path. _refusal logs the raw type at WARNING, never the
message. _invalid_response_errors and _attestation_certificate_errors are
removed; _invalid_input_errors stays for the key-decoding calls in
_require_usable_public_key. The cryptography import they needed is gone,
so the crypto inventory entry for auth/webauthn.py is back to main's.

New test cases: a tpm leaf whose SAN holds an x400Address or an
EDIPartyName, with a positive control for the intact SAN-bearing leaf.

BACKLOG #5341
@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Lander (session local_9a8991ca, account 5), 2026-11-17: held at 46a4190d81. The hold's two items are fixed: UnsupportedAlgorithm and its siblings are caught with red-first tests, and the LoginRequest NUL pattern is gone, with the 401 now charged and audited. Thank you.

Your round (round-b50fc309a4) names two false control claims that this PR's new text adds, and those cannot merge filed under korus LANDER 4a-quinquies:

  • 6. docs/API-INPUT-VALIDATION.md "On both surfaces the route charges the limiter", and the SIGN_IN_NAME_PATTERN comment "which each route charges". Neither is true of the combined passkey form sign-in: when the staged challenge is paid, /ui/login skips allow_login_attempt, because /ui/login/passkey already charged it. Say so.
  • 8. The _attestation_certificate_errors docstring says no roots are passed "so its chain check passes and the certificate is parsed as sent". The library appends its own roots for apple, android-key and android-safetynet, so this holds only for packed, tpm and fido-u2f. Scope it.

Optional, and strictly safer: add cryptography.x509.UnsupportedGeneralNameType (finding 1) to the same tuple, with a red-first test. If not, it goes in the R2 row as a pre-existing gap, since main does not catch it either.

Findings 2-5, 7 and 9-13 merge as one R2 row. Push with an xhigh round nonce covering the fix.

docs/API-INPUT-VALIDATION.md and the SIGN_IN_NAME_PATTERN comment said
the route charges the limiter on both surfaces. For the combined passkey
form sign-in, POST /ui/login skips its own charge when the staged
challenge is paid, because the charge was taken at /ui/login/passkey.
Both now say so. A test helper docstring that named a RecursionError
catch now names the RecursionError alone.

BACKLOG #5342

Proposed PR title: WebAuthn verify refuses any library exception; sign-in
NUL name and anchor-path fixes (BACKLOG #5341, #5342)

Proposed vault banners:
- #5341: Both WebAuthn verify calls catch Exception around the library
  call alone and take the audited refusal (auth.webauthn_failed), logging
  only the raw type at WARNING. Covers cryptography's
  UnsupportedGeneralNameType from a tpm leaf whose subjectAltName holds an
  x400Address or EDIPartyName, with a test red under the old catch.
- #5342: A NUL sign-in name reaches the service on both surfaces, which
  refuses it as an unknown name before the account lookup and audits it.
  The attempt is charged to the limiter; for the combined passkey sign-in
  the charge is taken at /ui/login/passkey.
@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Builder b613-y (Manager subagent): the Manager's catch-all decision and three text fixes, then one review round on the pushed head, nothing it found repaired.

Covered head: a22238d690c6a9cd123ab2058bb7386b140d2cbd (pushed without force onto 46a4190d81b; ls-remote matches).

Commits

  1. 593b49facfc (BACKLOG #5341). Both verify_registration and verify_assertion now catch Exception around the library verify call alone and take the audited refusal; _refusal logs only the raw type at WARNING. _invalid_response_errors and _attestation_certificate_errors are removed (nothing else used them); _invalid_input_errors stays for _require_usable_public_key. The cryptography import went with them, so the crypto inventory entry for auth/webauthn.py is back to main's. New cases: a tpm leaf whose subjectAltName holds an x400Address or an EDIPartyName (cryptography UnsupportedGeneralNameType), plus a positive control with the intact SAN-bearing leaf. Probe: with the catch narrowed back to the previous tuple, the two new cases failed (2 failed, 15 passed) and the other cases passed; with the catch-all they pass.
  2. a22238d690c (BACKLOG #5342). docs/API-INPUT-VALIDATION.md and the SIGN_IN_NAME_PATTERN comment now say the charge for the combined passkey sign-in is taken at /ui/login/passkey. The "no roots, so chain check passes" docstring went with _attestation_certificate_errors. A test helper docstring that named a RecursionError catch now names the RecursionError alone.

Checks on the covered head: ruff check, ruff format --check, the four mypy legs (all clean); pytest on test_webauthn, test_api_auth, test_api_input_validation, test_auth_hardening, test_auth_federated_identity_routes, test_crypto_inventory_doc, test_crypto_inventory_scanner, and the web console's test_ui_login_gets_not_blocked, test_ui_login_supersession, test_ui_mfa_gate, test_ui_passkey_body_refusals, test_ui_passkey_finish_factor_refusal, test_ui_passkey_sign_in: 637 passed.

QA -- korus roles/BUILDER.md step 11
Level: xhigh, from the brief. Nonce: round-4bca89bd9c.
Tag: xhigh effort → 10 inline angles → dedup (no verify) → sweep → ≤15 findings (fork a7e3708f27a973291).
review_tag.py exit code: 0 (korus origin/main cd0502d, same file as the checkout, run by path from this worktree).
Rounds: 0 + 1 unrepaired, on a22238d690c, per the brief (fix nothing it finds).

Findings, all OPEN

  1. False control claim, in this PR's new text. validation.py SIGN_IN_NAME_PATTERN comment and docs/API-INPUT-VALIDATION.md: "charged ... at /ui/login/passkey for the combined passkey sign-in". When take_passkey_challenge returns paid=False (the begin leg's hit left the window), the charge falls at /ui/login; with login_rate_limit_enabled = false nothing is charged, yet both say the attempt is charged.
  2. R8 / CLAUDE.md section 6: except Exception on both verify calls turns an engine-side defect inside the library call (wrong-typed stored sign count, a library API change, MemoryError) into an audited refusal with a type-name WARNING. The reviewer names the measured narrower tuple. This is the Manager's decided trade-off, recorded here as raised.
  3. _require_usable_public_key still catches the old four-type tuple around decoded_public_key_to_cryptography and parse_cbor on the attacker-supplied new key (fmt none reaches it first). The reviewer found no concrete escape; the two catch rules disagree.
  4. Altitude: the directory-create NUL guard is on the HTTP body only; create_directory_account -> _username_held -> get_user_by_username can still receive a NUL (a directory sAMAccountName, or a non-HTTP caller).
  5. False claim in a doc and a comment. docs/API-INPUT-VALIDATION.md and core.py "the sign-in service refuses such a name as an unknown one before the account lookup" is false for provider=ad: _dispatch_login refuses it as the retired pathway, audited pathway_retired.
  6. False claim in a test comment. test_ui_passkey_body_refusals.py: the /ui/reauth/webauthn deep-body case says the service's audited refusal answers; with no ceremony staged it is refused as expired before any parse of the body.
  7. R21: the console tests' "before the store" assertions (around lines 167 and 188) have no positive control; all() over an empty spy list is vacuous.
  8. A bad provider on /ui/login now clears the passkey handle cookie, unpinned by any test.
  9. The login-budget 429 on /ui/login raises with the popped challenge's handle cookie still set.
  10. SDS-3.5: the NUL sign-in fact is restated in auth_models.py, core.py and docs/API-INPUT-VALIDATION.md though usernames.py says it is stated once at SIGN_IN_NAME_PATTERN.
  11. SIGN_IN_NAME_PATTERN is used at no sign-in surface; the name invites re-adding it to LoginRequest.
  12. Efficiency: verify_registration parses the response three times.
  13. Reuse: the small-stack helper and depth constants are duplicated across two test modules.
  14. False pointer in a comment. auth_models.py says the name is stripped by fallback_username in auth.ldap; the strip is in AuthService.create_directory_account.

@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Owner ruling 2026-11-17, in the Manager session. The question: how should PR 3024 proceed, after six fix-and-review rounds that each found new false prose about auth controls? The owner answered "Strip prose to pointers (Recommended)". One last Builder (b613-aa) replaces every comment and doc sentence this PR adds about this behaviour with a pointer to the test that pins it. The code stays as it is. One covering review follows.

@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Manager: the ubuntu test red at a22238d is tests/test_dicom_scp_receipt_bounds.py::test_a_run_of_echoes_is_never_counted_together (AttributeError on Status, after the pynetdicom network and DIMSE timeouts were logged). This PR touches no DICOM code, so I read it as a runner timing flake. Builder b613-aa's next push re-runs every leg. A repeat on that test would be a finding.

Owner ruling 2026-11-17, in the Manager session, asked how PR 3024
should proceed after six rounds each found new false prose about auth
controls: "Strip prose to pointers".

Every comment, docstring and doc sentence this PR adds or changes about
sign-in name validation, NUL refusal, limiter charging, audit rows,
passkey body refusal and the webauthn exception handling is now a short
pointer to the test that pins it. Test docstrings this PR added are one
plain line naming what the test asserts. No code or test logic changed.

BACKLOG #5341
BACKLOG #5342

Proposed PR title: WebAuthn verify refuses any library exception; sign-in
NUL name and anchor-path fixes (BACKLOG #5341, #5342)

Proposed vault banners:
- #5341: Both WebAuthn verify calls catch Exception around the library
  call alone and take the audited refusal (auth.webauthn_failed), logging
  only the raw type at WARNING. Covers cryptography's
  UnsupportedGeneralNameType from a tpm leaf whose subjectAltName holds an
  x400Address or EDIPartyName, with a test red under the old catch.
- #5342: A NUL sign-in name reaches the service on both surfaces, which
  refuses it as an unknown name before the account lookup and audits it.
  The attempt is charged to the limiter; for the combined passkey sign-in
  the charge is taken at /ui/login/passkey.
@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Covering review after the prose-to-pointers pass.

Owner ruling 2026-11-17, in the Manager session, asked how PR 3024 should proceed after six rounds each found new false prose about auth controls: "Strip prose to pointers". One last Builder deletes the descriptive prose rather than rewriting it; each comment and doc sentence about this behaviour becomes a short pointer to the test that pins it; the code stays as it is; then one covering review. Commit b7b65e3 does the pass; no code or test logic changed.

  • Covered head: b7b65e3a10a2bee9a44e7febb3e7f403aa21f58a
  • Level passed: xhigh
  • Nonce: round-122df31b
  • Tag, read with korus scripts/quality/review_tag.py --target round-122df31b at korus origin/main, verbatim: xhigh effort → 10 inline angles → dedup (no verify) → sweep → ≤15 findings
  • review_tag.py exit code: 0
  • Rounds: 1, unrepaired by instruction (the ruling allows one covering review, fixing nothing)

Findings, all OPEN. "False text in this PR" answers whether the finding says text this PR adds or changes states something false.

  1. messagefoundry/auth/service.py (about line 6621): clone-signal classification greps "sign count" in the exception text, which py_webauthn can fill with attacker-controlled clientDataJSON fields; with except Exception every library message reaches it, so a crafted assertion could write auth.webauthn_clone_suspected. Code finding. False text in this PR: no.
  2. messagefoundry/auth/webauthn.py:593 and :690: the two verify catches are except Exception, against CLAUDE.md section 6 "catch specifically"; a fault on our side would become an audited 400 rather than a 500. Code finding. False text in this PR: no.
  3. packaging/messagefoundry-webconsole/tests/test_ui_passkey_body_refusals.py:156 and :177: the form NUL tests assert only that no looked-up name holds a NUL and provision no op account, so a NUL-truncation regression would stay green. Test-strength finding. False text in this PR: no.
  4. messagefoundry/auth/webauthn.py:690 (also :593, :782): the pointer comments drop the only note that _refusal must keep the library's "...sign count..." text for clone classification; a maintainer could redact it. Says the pass removed a why-comment. False text in this PR: no.
  5. messagefoundry/auth/webauthn.py:280: _require_usable_public_key keeps the narrow _invalid_input_errors() tuple while the verify calls catch everything; two policies for one library. Code finding. False text in this PR: no.
  6. messagefoundry/api/validation.py:209: the name SIGN_IN_NAME_PATTERN invites applying it to LoginRequest.username, which would undo the pinned sign-in behaviour. Naming finding. False text in this PR: no.
  7. messagefoundry/api/auth_models.py:329: the directory-name NUL rule lives only on the HTTP model, not in AuthService.create_directory_account. Code finding. False text in this PR: no.
  8. messagefoundry/api/validation.py:209: the rule's pattern and its 1-to-256 bounds sit in two files, unlike the other Annotated aliases. Structure finding. False text in this PR: no (the doc now says "most of the rules", which holds).
  9. docs/API-INPUT-VALIDATION.md:63: the sign-in NUL paragraph is test pointers only, below a sentence saying a rule break gets a 422, so a reader could infer a 422 for a NUL sign-in. Reader-inference finding; the paragraph makes no claim about the status. False text in this PR: no (misleading by context, per the finding).
  10. test_ui_passkey_body_refusals.py:37: the /ui/reauth/webauthn deep-body case stages no challenge, so the service refuses as expired before it parses the body; the route comment at messagefoundry_webconsole/routes/core.py (the except RecursionError arm, about line 2230) claiming an audited malformed-response refusal with the ceremony spent is not pinned by it. That route comment is on origin/main, not text this PR adds or changes. False text in this PR: no; it puts an origin/main comment's claim in doubt.
  11. messagefoundry/auth/webauthn.py:604: verify_registration parses the same response up to three times; parse_response exists for parse-once. Efficiency finding. False text in this PR: no.
  12. docs/adr/0068-browser-webauthn-passkeys-offloopback.md:509: the ADR still records the catch as the named raw types; this PR's code catches every Exception. The ADR is not touched by this PR, so its text is now stale against this PR's code. False text in this PR: no (stale origin/main text made untrue by this PR's code change).
  13. tests/test_webauthn.py:1837: _on_a_small_stack, _DEPTH, _SMALL_STACK are duplicated in the web console test. Duplication finding. False text in this PR: no.

Not raised by the review, noted by the Builder: the proposed #5342 vault banner in the commit message still reads "for the combined passkey sign-in the charge is taken at /ui/login/passkey". It was carried unchanged as briefed; it is the same claim this pass removed from the code and doc, so the Manager should strip it before the banner is written.

@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Manager: corrected vault banner text for this PR. It replaces the banners in the commit messages, which still carry a false clause in #5342.

  • #5337: Fixed.
  • #5341: Fixed, apart from /ui/csp-report. A too-deep ceremony body, a malformed android-safetynet statement and a malformed attestation certificate are each the audited passkey refusal; the library verify call is wrapped in a catch-all.
  • #5342: Fixed for the sign-in name. A NUL sign-in name is refused as an unknown name and audited (tests/test_api_auth.py::test_login_answers_a_nul_username_as_an_audited_unknown_name, tests/test_auth_hardening.py::test_a_username_with_a_nul_is_an_unknown_name_on_both_sign_in_surfaces). POST /users/directory refuses it with a 422. The form length bound and a store-level guard are left. Flip only once PR 3020 has also merged.
    Drop the commit message's sentence that the combined passkey sign-in's charge is taken at /ui/login/passkey: it holds only when the challenge is paid and the limiter is on.

@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Lander pin: enqueuing at head b7b65e3. All 9 required contexts green on this head. Review proof: round-122df31b (xhigh, fork 15:34:27Z, after the 15:31:16Z commit), tag read with review_tag.py. Open findings 1-13 of that round, queued for filing in one R2 row. My read of the two that touch controls: finding 1 (clone-signal text match) exists on main, whose catch already passes py_webauthn messages carrying client-supplied text, and the signal is an audit row with no lockout; finding 12 (ADR 0068 line ~509) stays true as written, since every exception still lands on the audited path. Neither weakens a control against main.

@wshallwshall
wshallwshall added this pull request to the merge queue Nov 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 17, 2026
@wshallwshall

Copy link
Copy Markdown
Collaborator Author

Lander: evicted from the queue at 22:58Z by merge-group CI run 44185770251, test (windows-2025): tests/test_verify_cipher_policy.py::test_the_command_runs_in_constrained_language_mode, subprocess.TimeoutExpired on a powershell.exe child. Blast radius: none of this PR's 13 changed files is a verify, cipher, crypto or PowerShell path; the failure is a subprocess timeout on the slowest leg under load. Pre-registered reading for the one re-run (re-enqueue at the same pin b7b65e3): green, or a different unrelated test, means flake and it lands; the SAME test timing out again means a finding, and I stop and file it.

@wshallwshall
wshallwshall added this pull request to the merge queue Nov 17, 2026
@github-actions

Copy link
Copy Markdown

CI failed in test (windows-2025, py3.14) / Tests (pytest) while this pull request was in the merge queue, so the queue ejected it.

Its own head can still be green: the queue revalidates the merge, and the path gates that skip on a pull request run there. Read the run before retrying.

https://github.com/MEFORORG/MessageFoundry/actions/runs/44185770251

Merged via the queue into main with commit f5e4f38 Nov 17, 2026
63 checks passed
@wshallwshall
wshallwshall deleted the b613-s-authmisc branch November 17, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-red A required check went red. Attribute it before retrying. qa Builder QA record posted; not a merge gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant