-
Notifications
You must be signed in to change notification settings - Fork 134
fix: address code review findings — security, CI/CD hardening, test coverage #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -474,7 +474,13 @@ export namespace Telemetry { | |
| log.debug("telemetry flush failed", { status: response.status }) | ||
| } | ||
| } catch { | ||
| // Silently drop on failure — telemetry must never break the CLI | ||
| // Re-add events that haven't been retried yet to avoid data loss | ||
| const retriable = events.filter((e) => !(e as any)._retried) | ||
| for (const e of retriable) { | ||
| ;(e as any)._retried = true | ||
| } | ||
| const space = Math.max(0, MAX_BUFFER_SIZE - buffer.length) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: The |
||
| buffer.unshift(...retriable.slice(0, space)) | ||
| } finally { | ||
| clearTimeout(timeout) | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: The
as string[]cast trusts the server response shape. Consider validating thatwellknown.auth.commandis actually an array of strings before using it — a malicious server could return unexpected types:The confirmation prompt is a great addition though — this was a real security gap.