Repository navigation
Outpost in SDK - #15417
Outpost in SDK#15417
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
2 issues found across 86 files
Confidence score: 2/5
client.tscan send authorization headers and customer data over plaintextws://whenbaseUrluseshttp://. Reject non-HTTPS base URLs or require an explicit opt-in.event.tscan accept out-of-range calendar dates becauseDate.parsenormalizes them, putting events in the wrong bucket. Validate the timestamp’s calendar components before accepting it.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="sdk/generator/typescript/template/src/outpost/event.ts">
<violation number="1" location="sdk/generator/typescript/template/src/outpost/event.ts:38">
P2: `Date.parse` normalizes out-of-range calendar dates, so invalid timestamps can silently aggregate into the wrong bucket. Validate the timestamp’s calendar components before accepting it.</violation>
</file>
<file name="sdk/generator/typescript/template/src/outpost/client.ts">
<violation number="1" location="sdk/generator/typescript/template/src/outpost/client.ts:159">
P1: Custom agent: **Flag Security Vulnerabilities**
This fallback sends the authorization headers and customer data over plaintext `ws://` whenever `baseUrl` uses `http://`. Reject non-HTTPS base URLs or require an explicit test-only insecure opt-in instead of silently downgrading to `ws://`.</violation>
</file>
Requires human review: Auto-approval blocked because this review re-detected 3 unresolved issues already reported by Cubic.
View guided diff | Turn on auto-fix | Re-trigger cubic
| await withTimeout(this.synced.promise); | ||
| const [url, request] = this.options.client.buildRequest("GET", "/v1/outpost/"); | ||
| const endpoint = new URL(url); | ||
| endpoint.protocol = endpoint.protocol === "https:" ? "wss:" : "ws:"; |
There was a problem hiding this comment.
P1: Custom agent: Flag Security Vulnerabilities
This fallback sends the authorization headers and customer data over plaintext ws:// whenever baseUrl uses http://. Reject non-HTTPS base URLs or require an explicit test-only insecure opt-in instead of silently downgrading to ws://.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At sdk/generator/typescript/template/src/outpost/client.ts, line 159:
<comment>This fallback sends the authorization headers and customer data over plaintext `ws://` whenever `baseUrl` uses `http://`. Reject non-HTTPS base URLs or require an explicit test-only insecure opt-in instead of silently downgrading to `ws://`.</comment>
<file context>
@@ -0,0 +1,446 @@
+ await withTimeout(this.synced.promise);
+ const [url, request] = this.options.client.buildRequest("GET", "/v1/outpost/");
+ const endpoint = new URL(url);
+ endpoint.protocol = endpoint.protocol === "https:" ? "wss:" : "ws:";
+ this.websocket = new WebSocket(endpoint, {
+ headers: Object.fromEntries(new Headers(request.headers)),
</file context>
| ) { | ||
| throw new TypeError("Event timestamps must include a timezone"); | ||
| } | ||
| const timestamp = input.timestamp === undefined ? Date.now() : Date.parse(input.timestamp); |
There was a problem hiding this comment.
P2: Date.parse normalizes out-of-range calendar dates, so invalid timestamps can silently aggregate into the wrong bucket. Validate the timestamp’s calendar components before accepting it.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At sdk/generator/typescript/template/src/outpost/event.ts, line 38:
<comment>`Date.parse` normalizes out-of-range calendar dates, so invalid timestamps can silently aggregate into the wrong bucket. Validate the timestamp’s calendar components before accepting it.</comment>
<file context>
@@ -0,0 +1,64 @@
+ ) {
+ throw new TypeError("Event timestamps must include a timezone");
+ }
+ const timestamp = input.timestamp === undefined ? Date.now() : Date.parse(input.timestamp);
+ if (!Number.isFinite(timestamp)) throw new TypeError("Invalid event timestamp");
+ return {
</file context>
There was a problem hiding this comment.
All reported issues were addressed across 18 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 4 unresolved issues from previous reviews.
View guided diff | Turn on auto-fix | Re-trigger cubic
84b1303 to
ec75fb3
Compare
There was a problem hiding this comment.
1 issue found across 13 reviewed files. 11 files intentionally excluded from review.
Confidence score: 3/5
- In
sdk/generator/typescript/template/src/outpost/client.ts, the fractional cutoff can reject writes for the bucket starting at12:00:00, losing usage until the next bucket. Truncate to whole seconds to match the Python SDK.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="sdk/generator/typescript/template/src/outpost/client.ts">
<violation number="1" location="sdk/generator/typescript/template/src/outpost/client.ts:501">
P1: This fractional cutoff rejects writes for the bucket starting at `12:00:00` when `cold_until` is `12:00:00.000001`, losing usage until the next bucket. Truncate to whole seconds, matching the Python SDK.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This reverts commit 635fc6f71ad82880cd489bbc0991ca104e19bc73.
ec75fb3 to
da35dde
Compare
There was a problem hiding this comment.
0 issues found across 10 reviewed files. 9 files intentionally excluded from review.
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 6 unresolved issues from previous reviews.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 3 unresolved issues from previous reviews.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 3 unresolved issues from previous reviews.
View guided diff | Turn on auto-fix | Re-trigger cubic
Uh oh!
There was an error while loading. Please reload this page.