Skip to content

fix(security): @hey-api/openapi-ts updated due dependabot warnings - #13487

Merged
WebReflection merged 2 commits into
mainfrom
dependabot-hey-api-openapi-ts
Aug 27, 2026
Merged

fix(security): @hey-api/openapi-ts updated due dependabot warnings#13487
WebReflection merged 2 commits into
mainfrom
dependabot-hey-api-openapi-ts

Conversation

@WebReflection

Copy link
Copy Markdown
Contributor

What

Bumps @hey-api/openapi-ts from 0.90.10 to 0.97.3 in packages/sdk/js and regenerates the committed SDK (packages/sdk/js/src/v2/gen).

Why

Resolves Dependabot advisory GHSA-hhx9-57xq-r5rw / CVE-2026-48819 (prototype pollution, CWE-1321): the buildClientParams template copied into every generated SDK wrote unknown $<slot>___proto__ keys directly into the slot object, letting $query___proto__ substitute the params.query prototype chain. Fixed in 0.97.3 by building slots with Object.create(null). The regenerated core/params.gen.ts now carries the fix.

Changes

  • packages/sdk/js/package.json + bun.lock: @hey-api/openapi-ts 0.90.100.97.3
  • packages/sdk/js/src/v2/gen/**: regenerated SDK (includes the null-prototype params fix)
  • packages/sdk/js/script/build.ts: removed the now-obsolete SseFn codegen patch (the bug it worked around is fixed upstream in 0.97.3)
  • packages/opencode/test/server/httpapi-sdk.test.ts: adapted to the regenerated client typing where request/response are now optional (kilocode_change-marked)
  • .changeset/hey-api-security-update.md: patch changeset for @kilocode/sdk

Verification

  • SDK regen + build: bun ./packages/sdk/js/script/build.ts (patches apply, tsc clean)
  • SDK tests: 7 pass; httpapi-sdk.test.ts: 21 pass
  • bun turbo typecheck (all packages except kilo-jetbrains): 29/29 pass — JetBrains needs a Java 21 toolchain not present on this machine
  • bun run lint: 0 errors
  • Extension: typecheck + 4218 unit tests pass
  • bun run script/check-opencode-annotations.ts --worktree: clean

@WebReflection
WebReflection force-pushed the dependabot-hey-api-openapi-ts branch from 2c25b51 to f9ddb78 Compare August 26, 2026 17:33
@kilo-code-bot

kilo-code-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (15 files)
  • .changeset/hey-api-security-update.md
  • bun.lock
  • packages/opencode/test/server/httpapi-sdk.test.ts
  • packages/sdk/js/package.json
  • packages/sdk/js/script/build.ts
  • packages/sdk/js/src/v2/gen/client/client.gen.ts
  • packages/sdk/js/src/v2/gen/client/types.gen.ts
  • packages/sdk/js/src/v2/gen/client/utils.gen.ts
  • packages/sdk/js/src/v2/gen/core/bodySerializer.gen.ts
  • packages/sdk/js/src/v2/gen/core/params.gen.ts
  • packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts
  • packages/sdk/js/src/v2/gen/core/types.gen.ts
  • packages/sdk/js/src/v2/gen/core/utils.gen.ts
  • packages/sdk/js/src/v2/gen/sdk.gen.ts
  • packages/sdk/js/src/v2/gen/types.gen.ts

Reviewed by grok-4.6 · Input: 126.1K · Output: 17.2K · Cached: 937.5K

Review guidance: REVIEW.md from base branch main

// to do with HTTP errors, and any consumer that calls `.return()` or returns
// from a mock generator gets type-checked against the wrong shape. Drop the
// arg so TReturn defaults to void.
const sseTypesPath = "./src/v2/gen/client/types.gen.ts"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So with the update this bug is not present anymore? Or why can we remove this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's in Changes:

removed the now-obsolete SseFn codegen patch (the bug it worked around is fixed upstream in 0.97.3)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think it's low risk to keep this in but I usually take a chance to remove indirect 3rd party related patches any time, specially when we changed/bumped their version, to be sure we avoid side effects introduced by the patch maybe applied somewhere else (before, 'cause it's not even a global replacement)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thanks for clarifying

@WebReflection
WebReflection merged commit 9eb9681 into main Aug 27, 2026
31 checks passed
@WebReflection
WebReflection deleted the dependabot-hey-api-openapi-ts branch August 27, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants