| … | … | @@ -236,7 +236,7 @@ export const CursorDriver: ProviderDriver< | |
| 237 | 237 | readCursorUsageLimits( | |
| 238 | 238 | effectiveConfig, | |
| 239 | - | { ...processEnv, CURSOR_API_KEY: apiKey }, | |
| 239 | + | processEnv, | |
🟠 High server/driver.ts:239
With browser sign-in, no explicit API key, and a custom apiEndpoint, usage-limit discovery can send the host account’s auth.json accessToken to that endpoint as a bearer credential. Passing processEnv to readCursorUsageLimits allows it to fall back to that file token, and the reader does not restrict file credentials to the default Cursor endpoint; restrict automatically discovered file tokens to the default endpoint or require an explicitly supplied token for custom endpoints.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @packages/provider-cursor/src/server/driver.ts around line 239: |
| 2 | |
| 3 | With browser sign-in, no explicit API key, and a custom `apiEndpoint`, usage-limit discovery can send the host account’s `auth.json` `accessToken` to that endpoint as a bearer credential. Passing `processEnv` to `readCursorUsageLimits` allows it to fall back to that file token, and the reader does not restrict file credentials to the default Cursor endpoint; restrict automatically discovered file tokens to the default endpoint or require an explicitly supplied token for custom endpoints. |