DX | 31-08-2026 | Release - #2718
Conversation
DX | 12-08-2026 | Release | Back-merge
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
…piry
The oauthRefreshInFlight mutex was assigned via an async IIFE:
this.oauthRefreshInFlight = (async () => { ... })();
In JavaScript the IIFE body executes synchronously before the assignment
completes. The full chain compareOAuthExpiry → refreshToken → initSDK →
managementSDKClient → createAPIClient → compareOAuthExpiry has no await
yields, so the second call sees oauthRefreshInFlight as null and starts
another refresh cycle — leading to unbounded recursion and a RangeError:
Maximum call stack size exceeded.
Fix 1: replace the IIFE assignment with new Promise so the guard is set
synchronously before any nested code can re-enter compareOAuthExpiry.
Fix 2: add skipTokenValidity: true in initSDK so createAPIClient does not
call compareOAuthExpiry again (which would deadlock on the in-flight
promise while that promise is waiting for initSDK to complete).
The outer management client used by commands is created after
compareOAuthExpiry resolves, so it always receives the fresh access token.
Concurrent async callers and the login flow are unaffected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The 401 branch was recursing with the same stale error and an unincremented counter — allowing unbounded retries. Add the same maxRetryCount guard used by the 429/408 branch: attempt one token refresh, then print a clear error and exit if the 401 persists. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(auth): prevent synchronous re-entrant recursion in compareOAuthExpiry
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
No description provided.