Skip to content

Commit e6fc545

Browse files
Merge branch 'main' into cursor/fix-cve-2026-44665-3caf
2 parents a28b994 + 82660ef commit e6fc545

4 files changed

Lines changed: 70 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Fixed blame gutter commit navigation to use the file path as it existed at the attributing commit, so clicking a blame line whose commit predates a rename resolves to the correct historical path. [#1178](https://github.com/sourcebot-dev/sourcebot/pull/1178)
1313
- Bumped transitive `fast-uri` dependency to `^3.1.2`. [#1181](https://github.com/sourcebot-dev/sourcebot/pull/1181)
1414
- Upgraded `simple-git` to `3.36.0` to address CVE-2026-6951. [#1183](https://github.com/sourcebot-dev/sourcebot/pull/1183)
15+
- Upgraded `hono` to `^4.12.18` to address CVE-2026-44455, CVE-2026-44456, CVE-2026-44457, CVE-2026-44458. [#1186](https://github.com/sourcebot-dev/sourcebot/pull/1186)
1516
- Upgraded `fast-xml-builder` to `^1.2.0` to address CVE-2026-44664, CVE-2026-44665. [#1184](https://github.com/sourcebot-dev/sourcebot/pull/1184)
1617

1718
### Changed

CLAUDE.md

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,26 +255,84 @@ Images added to `.mdx` files in `docs/` should be wrapped in a `<Frame>` compone
255255

256256
When fixing a CVE in a transitive dependency, prefer a real top-level upgrade over a forced `resolutions` override.
257257

258-
1. **Trace the dependency chain** to find which top-level package in `package.json` brings in the vulnerable transitive dep:
258+
1. **Trace the dependency chain to a package in your own `package.json`.** Run:
259259

260260
```bash
261261
yarn why <vulnerable-package> --recursive
262262
```
263263

264-
2. **Prefer bumping the top-level dependency** to a version whose transitive tree no longer includes the vulnerable version. This is a real, supported upgrade and avoids forcing a version on a consumer that may not expect it.
264+
"Top-level" means a package **literally listed in this repo's root or workspace `package.json`** under `dependencies`, `devDependencies`, or `peerDependencies` — not just any ancestor in the chain. If the chain is `vulnerable-pkg → mid-pkg → top-pkg`, do not stop at `mid-pkg`; keep walking until you reach `top-pkg`.
265265

266-
3. **Fall back to a `resolutions` override** only if no top-level bump resolves it (no compatible version exists, or it would require a breaking major). Match the existing format in `package.json` and pin with `^`, not `>=`:
266+
2. **Check whether the existing ranges already allow a patched version.** Often the lockfile is just stale: every `^x.y.z` range in the chain still admits the patched version, but `yarn.lock` was written before that version existed. In that case, refresh the lockfile entry — no `package.json` change, no `resolutions` override:
267+
268+
```bash
269+
yarn up <intermediate-or-vulnerable-pkg>
270+
# or, to refresh many at once:
271+
yarn dedupe
272+
```
273+
274+
This is the lightest-weight fix: it doesn't force a version, it just bumps the lock to the latest version that satisfies the constraints already in the tree. Verify with `yarn why <vulnerable-package>` afterward — if every instance is now patched, you're done.
275+
276+
3. **If a refresh isn't enough, bump the top-level dependency** to a version whose transitive tree no longer includes the vulnerable version. This is also a real, supported upgrade. Verify the upgrade actually removes the vulnerable version with `yarn why <vulnerable-package>` after running `yarn install`.
277+
278+
4. **Fall back to a `resolutions` override** only if neither a refresh nor a top-level bump resolves it (no compatible version exists in the existing ranges, or a top-level upgrade would require a breaking major). Use the **qualified** form keyed to the existing source range (not a bare key, which overrides every requester unnecessarily), and pin with `^`, not `>=`:
267279

268280
```json
269281
"resolutions": {
270-
"<pkg>@npm:<existing-range>": "^<patched>"
282+
"<pkg>@npm:<existing-source-range>": "^<patched>"
271283
}
272284
```
273285

286+
The `<existing-source-range>` is whatever range is currently requesting the vulnerable version (find it in `yarn.lock`, e.g. `^2.8.3`). Avoid the bare-key form `"<pkg>": "^x.y.z"`.
287+
288+
### Branch naming for CVE fixes
289+
290+
Use a **package-keyed** branch name, not a CVE-keyed one:
291+
292+
```
293+
cursor/cve/<package>
294+
```
295+
296+
Multiple CVEs against the same package commonly land in one upstream release, so package-keyed branches let sibling work join the same PR (see "Batching CVEs" below). Do not include the CVE ID or a Linear issue ID in the branch name.
297+
298+
### Batching CVEs that share a package
299+
300+
CVEs often arrive in clusters because one package release fixes several at once. Before opening a new PR, check whether a sibling PR is already addressing the same package.
301+
302+
1. **Extract** `<package>` and `<min-patched-version>` from the Linear issue (the Dependabot-sourced body lists both — affected package and fixed version).
303+
304+
2. **Look for a sibling PR**:
305+
306+
```bash
307+
gh pr list --state open --search '<package> in:title' --json number,title,headRefName
308+
```
309+
310+
3. **Decide based on the result**:
311+
312+
- **Sibling PR exists and its branch already pins ≥ `<min-patched-version>`**:
313+
- `gh pr checkout <number>`
314+
- **Edit** the existing CHANGELOG line for this PR — append this CVE ID to the comma-separated list. Do not add a new CHANGELOG line.
315+
- `gh pr edit <number>` to append the CVE ID to the title and body, and add a `Fixes <LINEAR-ID>` line to the PR body alongside any existing `Fixes` lines (this auto-links the Linear issue and Linear will mark it Done when the PR merges).
316+
- Do not transition the Linear issue manually — leave it for the merge to close.
317+
- **Do not open a new PR.**
318+
319+
- **Sibling PR exists but its pin is too low to cover this CVE**:
320+
- Check out the branch.
321+
- Bump the resolution / package version higher to cover both.
322+
- **Edit** the existing CHANGELOG line — append this CVE and update the version. Update the PR title and body, and add `Fixes <LINEAR-ID>` to the PR body.
323+
- Do not transition the Linear issue manually — leave it for the merge to close.
324+
325+
- **No sibling PR exists**:
326+
- Create a new `cursor/cve/<package>` branch and open the PR as usual.
327+
328+
4. **Post-flight (race-window backstop)**: After opening a new PR, re-run step 2. If a competing PR with a *lower* number appeared while you were working, close yours, push your CHANGELOG entry and Linear link onto the older PR.
329+
274330
### CHANGELOG and PR conventions for CVE fixes
275331

276-
- CHANGELOG entry (under `[Unreleased] → Fixed`): `Upgraded \`<pkg>\` to \`^x.y.z\` to address CVE-XXXX-XXXXX. [#<PR>]`
277-
- Keep entries short. The CVE ID is enough.
332+
- CHANGELOG entry (under `[Unreleased] → Fixed`): `Upgraded \`<pkg>\` to \`^x.y.z\` to address CVE-A, CVE-B, .... [#<PR>]`
333+
- **One CHANGELOG line per PR**, not per CVE. When the PR addresses multiple CVEs (batched), list all of them comma-separated on a single line.
334+
- PR title format: `chore: upgrade <pkg> to ^x.y.z to address CVE-A, CVE-B, ...` (list every CVE the PR resolves).
335+
- Keep entries short. The CVE IDs are enough.
278336

279337
## Branches and Pull Requests
280338

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"brace-expansion@npm:^5.0.2": "^5.0.5",
5050
"brace-expansion@npm:^1.1.7": "^1.1.13",
5151
"@react-email/preview-server/next": "^16.2.3",
52-
"@modelcontextprotocol/sdk/hono": "^4.12.14",
52+
"@modelcontextprotocol/sdk/hono": "^4.12.18",
5353
"@modelcontextprotocol/sdk/@hono/node-server": "^1.19.13",
5454
"langsmith@npm:>=0.5.0 <1.0.0": "^0.5.19",
5555
"markdown-it@npm:^14.1.0": "^14.1.1",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14609,10 +14609,10 @@ __metadata:
1460914609
languageName: node
1461014610
linkType: hard
1461114611

14612-
"hono@npm:^4.12.14":
14613-
version: 4.12.14
14614-
resolution: "hono@npm:4.12.14"
14615-
checksum: 10c0/78de4c98a9a3da0f067e38dcc4bd27f0d82b45d146ac39f5ca688515ee482c0a2e704d2ac6c1ee91ad17596b7c52b3e4b9483acd9c238d42f6ebcb43414a71b6
14612+
"hono@npm:^4.12.18":
14613+
version: 4.12.18
14614+
resolution: "hono@npm:4.12.18"
14615+
checksum: 10c0/b0b9688fd9e41a1847b077d579dc0e92a28b67c247c6ee7d1e751c0bae269824c30c7773feff1a2874e40ea36a3d2f9d1fc5ba618a28ecdf2ca1b33ed2473864
1461614616
languageName: node
1461714617
linkType: hard
1461814618

0 commit comments

Comments
 (0)