Repository navigation
fix(security): JS check memory budget, re-authentication for new sign-in factors - #728
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in one call goja checks vm.Interrupt only between instructions, so a single "x".repeat(1e9) ran to completion whatever the timeout and could OOM-kill the shared check worker. String.prototype.repeat/padStart/padEnd, Array.prototype.join (rewritten in Go, charged per piece), the typed-array join, Array(n), Array.prototype.fill, Array.from, ArrayBuffer and the typed-array constructors now draw from a 64 MiB per-run budget before they allocate. A refusal throws a RangeError "memory budget exceeded: ..." and, uncaught, the check reports error. Pure-JS allocation loops and string concatenation are still bounded only by the timeout; process isolation is a separate spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ory: the timeout does not stop a native allocation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #728 +/- ##
==========================================
+ Coverage 89.76% 89.77% +0.01%
==========================================
Files 1304 1306 +2
Lines 132584 132987 +403
==========================================
+ Hits 119018 119394 +376
- Misses 13557 13584 +27
Partials 9 9
🚀 New features to boost your workflow:
|
A free length write (a.length = 4e9) made sort/toSorted preallocate length slots, and map/with/toReversed/toSpliced fill a new array of that size in one native call. They are now charged 16 bytes per slot (sort only checked: its buffer is transient). Array-likes are read once through a length snapshot so a getter cannot answer 0 then 4e9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ory: the timeout does not stop a native allocation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
POST /auth/2fa/setup and /auth/passkeys/register/begin now need the current password (or, for an account without one, a sign-in within the last 10 minutes). /auth/2fa/confirm needs the setupToken returned by setup. Setting a first password on a passwordless account needs a recent sign-in. Access tokens carry the primary sign-in time (authTime), copied through refreshes and org switches. Enabling 2FA sends a totp-enabled notice email. New error codes: REAUTHENTICATION_REQUIRED (403), INVALID_SETUP_TOKEN (400). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 2FA setup dialog and the passkey registration ask for the current password first. An account without a password that has not signed in within 10 minutes is told to sign in again, also when setting a first password. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hentication, so a hijacked session can lock out or keep the account Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merged
fclairamb
added a commit
that referenced
this pull request
Oct 31, 2026
🤖 I have created a release *beep* *boop* --- ## [0.43.0](v0.42.1...v0.43.0) (2026-10-31) ### Features * auto-create a personal org for new users, resume OAuth after org creation ([#716](#716)) ([2ae5575](2ae5575)) ### Bug Fixes * **auth:** limit sign-ups per client IP (unconfirmed per day, once a minute) ([#727](#727)) ([b2eb48f](b2eb48f)) * **deps:** update github.com/dop251/goja digest to 032d024 ([#724](#724)) ([025e97a](025e97a)) * **deps:** update go dependencies (non-major) ([#725](#725)) ([5796b1f](5796b1f)) * **deps:** update module github.com/prometheus/common to v0.73.1 ([#720](#720)) ([9bef875](9bef875)) * **deps:** update module github.com/slack-go/slack to v0.33.0 ([#722](#722)) ([ad19df4](ad19df4)) * **security:** bug-report budget for non-members, retention sparing crawl reports ([#715](#715)) ([d929999](d929999)) * **security:** JS check memory budget, re-authentication for new sign-in factors ([#728](#728)) ([a78f954](a78f954)) ### Performance Improvements * **dash0:** load only the active language's translations ([#729](#729)) ([406f211](406f211)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
repeat,padStart/End,join,Array(n),ArrayBufferand typed arrays,fill,Array.from, and the length-drivensort,toSorted,map,with,toReversed,toSpliced). A refused call throws aRangeErrorand the worker keeps running. Spec:specs/done/2026/10/2026-10-31-01-js-checker-memory-budget.md.2fa/confirmrequires asetupToken, and atotp-enablednotice email is sent. dash0 asks for the password first. Spec:specs/done/2026/10/2026-10-31-02-sign-in-factor-enrollment-reauth.md.Breaking API change:
2fa/setupandpasskeys/register/beginrefuse a request withoutcurrentPasswordon accounts with a password;2fa/confirmneedssetupToken. Sessions issued before this have no sign-in time, so passwordless accounts must sign in again once.Known gaps (not covered): string
+doubling,replaceAll,JSON.stringifyandTextEncodercan still amplify; the long-term fix is process isolation of check workers (separate spec).Earlier scan specs (implemented, in
specs/done/2026/10/)2026-10-30-02-bug-report-authenticated-org-membership.md. Signed-in non-members skipped the bug-report screenshot budget. Fixed in fix(security): bug-report budget for non-members, retention sparing crawl reports #715.2026-10-30-03-report-retention-spares-crawl-reports.md. The report retention sweep also deleted website crawl reports. Fixed in fix(security): bug-report budget for non-members, retention sparing crawl reports #715.2026-10-29-01-bug-report-upload-instance-budget.md. Anonymous bug-report screenshots were capped per org, not per instance, and never deleted. Fixed in fix(security): instance-wide budget and retention for anonymous bug-report screenshots #708; Z1 and Z2 are follow-ups.2026-10-28-01-pat-cannot-mint-sessions-or-sign-in-factors.md. A PAT could open sessions in its owner's other orgs and add sign-in factors. Fixed in fix(security): PAT org binding, subscribe throttle, invite lookup, SNMP secret #699.2026-10-28-02-status-subscribe-throttle-and-keep-confirmed.md. Unthrottled subscribe confirm emails, and re-subscribing un-confirmed a subscriber. Fixed in fix(security): PAT org binding, subscribe throttle, invite lookup, SNMP secret #699.2026-10-28-03-invite-lookup-without-org-scan.md. Invite lookup scanned every org. Fixed in fix(security): PAT org binding, subscribe throttle, invite lookup, SNMP secret #699.2026-10-28-04-snmp-community-secret-field.md. The SNMP community was not a secret field. Fixed in fix(security): PAT org binding, subscribe throttle, invite lookup, SNMP secret #699.2026-10-27-01-device-consent-phishing-guard.md. Device-flow consent phishing. Fixed in fix(security): device consent phishing guard and 2FA disable throttle #693.2026-10-27-02-disable-2fa-attempt-throttle.md.DELETE /auth/2fahad no attempt budget. Fixed in fix(security): device consent phishing guard and 2FA disable throttle #693.2026-10-26-02-ai-repair-hold-skips-param-only-secrets.md. Therepair: autohold applied only when the check'ssecretsmap had a value. Fixed in fix(ai): hold every scheduled repair-auto run to its granted hosts #683.2026-10-25-01-ai-repair-grant-dropped-by-reference-resolution.md. The repair grant was compared after${…}references were resolved. Fixed in fix(ai): hold the repair: auto host grant when the script or env holds a reference #678; U1 closed the remaining gap.2026-10-24-01-ai-repair-auto-apply-partial-runtime-host.md.repair: autoapplied a candidate that kept a literal host and added one built at runtime. Fixed in feat(ai): hold auto-applied repairs to the previous version's hosts (+ scan specs) #663.2026-10-23-02-ai-loop-secret-relay-through-model.md. AI loops relayed an encoded secret through the model.2026-10-22-01-ai-script-secret-host-guard-runtime.md. AI runs with real secrets were only host-checked by regex.2026-10-20-01-sender-response-body-caps.md. Notification senders and RabbitMQ read responses uncapped.2026-10-19-01-a2a-response-size-cap.md. A2A responses were read uncapped.2026-10-18-01-plugin-schema-file-ref.md. Plugin schema$refcould load local files.2026-10-17-01-postgres-check-connection-config.md. Postgres conninfo escaping and fallback to the worker'sPG*env.2026-10-16-15-pat-cache-revocation.md. The PAT cache outlived revocation.2026-10-16-14-totp-on-federated-sign-in.md. No TOTP on federated sign-in.2026-10-16-13-atomic-auth-attempt-counters.md. Auth attempt counters were not atomic.2026-10-16-12-mcp-tokens-rejected-on-rest.md. MCP OAuth tokens worked on REST.2026-10-16-11-slack-signature-fail-closed.md. Slack signature check failed open.2026-10-16-10-discovery-scans-egress-guard.md. Discovery scans were outside the egress policy.2026-10-16-09-js-check-nested-docker-guard.md. A JSdockersub-check bypassed the gate.2026-10-16-08-status-page-components-cross-org.md. Status-page components could be edited across orgs.2026-10-16-07-guard-status-subscriber-and-publication-webhooks.md. Subscriber and publication webhooks were not guarded.2026-10-16-06-accept-invite-existing-account.md. Accepting an invite logged in as an existing account.2026-10-16-05-kubeconfig-exec-and-incluster.md. KubeconfigexecandinClusterwere allowed.2026-10-16-04-mysql-dsn-injection.md. MySQL DSN injection.2026-10-16-03-env-secret-reference-allowlist.md. No allowlist for${env:}references.2026-10-16-02-token-purpose-separation.md. Purpose tokens were accepted as access tokens.2026-10-16-01-microsoft-signin-unverified-email-linking.md. Microsoft nOAuth email linking.🤖 Generated with Claude Code