Skip to content

Bump golang.org/x/crypto from 0.24.0 to 0.45.0 in /openapi/go#5

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/openapi/go/golang.org/x/crypto-0.45.0
Open

Bump golang.org/x/crypto from 0.24.0 to 0.45.0 in /openapi/go#5
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/openapi/go/golang.org/x/crypto-0.45.0

Conversation

@dependabot
Copy link
Copy Markdown

@dependabot dependabot Bot commented on behalf of github Jan 6, 2026

Bumps golang.org/x/crypto from 0.24.0 to 0.45.0.

Commits
  • 4e0068c go.mod: update golang.org/x dependencies
  • e79546e ssh: curb GSSAPI DoS risk by limiting number of specified OIDs
  • f91f7a7 ssh/agent: prevent panic on malformed constraint
  • 2df4153 acme/autocert: let automatic renewal work with short lifetime certs
  • bcf6a84 acme: pass context to request
  • b4f2b62 ssh: fix error message on unsupported cipher
  • 79ec3a5 ssh: allow to bind to a hostname in remote forwarding
  • 122a78f go.mod: update golang.org/x dependencies
  • c0531f9 all: eliminate vet diagnostics
  • 0997000 all: fix some comments
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.45.0.
- [Commits](golang/crypto@v0.24.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Jan 6, 2026
ehsan6sha added a commit that referenced this pull request May 19, 2026
Three security/correctness fixes for the issuer endpoints, closing
the open audit items on functionland/fula-api#14.

## Finding #1 (CRITICAL) — Registration replay

`POST /auth/register-mode-b` and `/auth/register-mode-c` previously
accepted a CLIENT-generated challenge and verified only the Ed25519
signature over it. The challenge was never tracked as single-use, so
anyone who captured a valid registration request body could replay
it to mint fresh JWTs forever. Severity is amplified by the design
choice that JWTs have no `exp` claim (DT-1): each replay produced
a perpetually-valid token, killable only by rotating `JWT_SECRET`.

Fix: extended the existing `POST /auth/challenge` endpoint to accept
a `purpose` parameter (`'sign-in'` | `'register-mode-b'` | `'register-mode-c'`)
defaulting to `'sign-in'` for back-compat. The two register endpoints
now consume the challenge from the in-memory store the same way
`/auth/sign-in` already does: `challengeStore.takeIfValid(uid, 'register-mode-{b,c}')`
then `crypto.timingSafeEqual` against the submitted bytes. Replay of
a captured body fails at the first step (challenge already consumed)
and returns HTTP 401 `CHALLENGE_INVALID`.

Sign-in callers still trigger USER_NOT_FOUND when the target uid is
unknown; register callers skip that check because they're creating
the user.

## Finding #4 (IMPORTANT) — `has_mode_a` was wrong

The `register-mode-b` response had a `has_mode_a: boolean` field
intended to surface "this OAuth identity already has a Mode A vault
that the new Mode B sign-up is SEPARATE from". The previous logic
counted `seed_users` rows with the same `oauth_sub` — which detects
"another seed-based vault", NOT "a Mode A account". Mode A users
live in `webui_users` keyed by `SHA-256(lowercase(email))`, never in
`seed_users`.

Fix: replaced `checkModeAExistsForOauthSub(oauthSub)` with
`checkModeAExistsForEmail(email)` that does a direct PK lookup on
`webui_users` using `emailToUserId(verifiedOauthEmail)`. Captures
the OAuth-verified email alongside the sub in the existing Google /
Apple verification block. Apple's relay-email behavior on subsequent
sign-ins (no email returned after first sign-in) is an acceptable
false-negative — `has_mode_a = false` is the safe default.

The FxFiles client wires the result into a "Existing vault detected"
warning dialog on the Mode B sign-up success path so the user knows
their new Maximum-security vault is independent of their existing
Standard-security one (Gemini advisor 2026-05-18).

## Finding #5 (IMPORTANT) — `encrypted_email = NULL` audit

Mode B / Mode C `webui_users` rows used to be inserted with
`encrypted_email = NULL`. Codex flagged this as a downstream risk:
any future code that reads the column without null-guards could
misattribute or crash for these users. A grep across the codebase
found only INSERT sites for the column today, but the surface area
is non-trivial (admin tools, future SELECT joins, possible backup /
audit scripts).

Fix per maintainer's direction: store the AES-256-GCM-encrypted
`effective_user_id_hex` in the column instead of NULL. "Email is
essentially user-id all over the system" — treating the canonical
seed-user-id as the email gives downstream code a non-null
opaque value to work with. The actual OAuth email of a Mode B user
is NOT persisted (the OAuth binding still lives only in
`seed_users.oauth_sub`), so this change does NOT introduce new PII
exposure.

## Tests

`tests/seedAuth.test.ts`:
- AUDIT-1 replay: register a uid via the new server-issued-challenge
  flow, replay the captured body, expect 401 CHALLENGE_INVALID.
- AUDIT-5 encrypted_email non-null: register Mode C, query
  `webui_users.encrypted_email`, assert non-null and non-empty.

Existing 15 tests updated to use the new `obtainRegisterChallenge`
helper (call `/auth/challenge` with the appropriate purpose before
registering) — they previously passed client-generated nonces and
would now fail with `CHALLENGE_INVALID`. Total: 17 vitest cases.

Tests skip on machines without PostgreSQL — same pattern as the
existing `api.test.ts`. Run via `npm test` against a populated DB.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants