Skip to content

Commit 41418dc

Browse files
Merge branch 'main' into cursor/fix-SOU-995-d3b3
2 parents 9dc4296 + ad7f9f6 commit 41418dc

4 files changed

Lines changed: 96 additions & 58 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ 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)
16+
- Upgraded `ip-address` to `^10.2.0` to address CVE-2026-42338. [#1189](https://github.com/sourcebot-dev/sourcebot/pull/1189)
17+
- 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)
1518
- Added `postcss` resolutions override to force all instances to `^8.5.10` to address CVE-2026-41305. [#1191](https://github.com/sourcebot-dev/sourcebot/pull/1191)
1619

1720
### 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: 28 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -13496,13 +13496,13 @@ __metadata:
1349613496
linkType: hard
1349713497

1349813498
"express-rate-limit@npm:^8.2.1":
13499-
version: 8.3.2
13500-
resolution: "express-rate-limit@npm:8.3.2"
13499+
version: 8.5.1
13500+
resolution: "express-rate-limit@npm:8.5.1"
1350113501
dependencies:
13502-
ip-address: "npm:10.1.0"
13502+
ip-address: "npm:^10.2.0"
1350313503
peerDependencies:
1350413504
express: ">= 4.11"
13505-
checksum: 10c0/5b64d0691071086cdb8cfc6bcd5e761f5687cf4fabdebfe2a043ea5b4d31443637181e7be71e7ffabce76aee816daee62c1ca83250045847957da408a129f650
13505+
checksum: 10c0/bcd89bb916376f38858b2623cc486bc9a91124ff3c7dee038fafc4c03949db72b0ddc796ade17cc43af3f16af314b689dd3c6557996d8e007791151335b0f7f7
1350613506
languageName: node
1350713507
linkType: hard
1350813508

@@ -13678,11 +13678,12 @@ __metadata:
1367813678
linkType: hard
1367913679

1368013680
"fast-xml-builder@npm:^1.1.5":
13681-
version: 1.1.5
13682-
resolution: "fast-xml-builder@npm:1.1.5"
13681+
version: 1.2.0
13682+
resolution: "fast-xml-builder@npm:1.2.0"
1368313683
dependencies:
13684-
path-expression-matcher: "npm:^1.1.3"
13685-
checksum: 10c0/b814ba5559cb3140de46d2846045607ab4d4c0bfc312a49d22c91efb9f7cd7004971314841e5823eeb467a5bf403e3ade8371b7912200e111df027d42ae51715
13684+
path-expression-matcher: "npm:^1.5.0"
13685+
xml-naming: "npm:^0.1.0"
13686+
checksum: 10c0/84bb105cd04e91d6dcb746c4dbaeb12903b510e7ab9a06ffde55b5a582e005559a87d84467f18a655c6c4baf098f696fd74cee3cbe1aea9d01385907768ba32d
1368613687
languageName: node
1368713688
linkType: hard
1368813689

@@ -14608,10 +14609,10 @@ __metadata:
1460814609
languageName: node
1460914610
linkType: hard
1461014611

14611-
"hono@npm:^4.12.14":
14612-
version: 4.12.14
14613-
resolution: "hono@npm:4.12.14"
14614-
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
1461514616
languageName: node
1461614617
linkType: hard
1461714618

@@ -14925,20 +14926,10 @@ __metadata:
1492514926
languageName: node
1492614927
linkType: hard
1492714928

14928-
"ip-address@npm:10.1.0":
14929-
version: 10.1.0
14930-
resolution: "ip-address@npm:10.1.0"
14931-
checksum: 10c0/0103516cfa93f6433b3bd7333fa876eb21263912329bfa47010af5e16934eeeff86f3d2ae700a3744a137839ddfad62b900c7a445607884a49b5d1e32a3d7566
14932-
languageName: node
14933-
linkType: hard
14934-
14935-
"ip-address@npm:^9.0.5":
14936-
version: 9.0.5
14937-
resolution: "ip-address@npm:9.0.5"
14938-
dependencies:
14939-
jsbn: "npm:1.1.0"
14940-
sprintf-js: "npm:^1.1.3"
14941-
checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc
14929+
"ip-address@npm:^10.1.1, ip-address@npm:^10.2.0":
14930+
version: 10.2.0
14931+
resolution: "ip-address@npm:10.2.0"
14932+
checksum: 10c0/5a00aada6e922c9c69dfc800ed5d0fa3348675ebdeed0e1575f503f27ca385b5f534363c9af7ad1daf64c1f1409388cdd3cc2e9b9b0fe1c924a431378d55075a
1494214933
languageName: node
1494314934
linkType: hard
1494414935

@@ -15469,13 +15460,6 @@ __metadata:
1546915460
languageName: node
1547015461
linkType: hard
1547115462

15472-
"jsbn@npm:1.1.0":
15473-
version: 1.1.0
15474-
resolution: "jsbn@npm:1.1.0"
15475-
checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96
15476-
languageName: node
15477-
linkType: hard
15478-
1547915463
"jsdom@npm:^25.0.1":
1548015464
version: 25.0.1
1548115465
resolution: "jsdom@npm:25.0.1"
@@ -18053,13 +18037,6 @@ __metadata:
1805318037
languageName: node
1805418038
linkType: hard
1805518039

18056-
"path-expression-matcher@npm:^1.1.3":
18057-
version: 1.2.0
18058-
resolution: "path-expression-matcher@npm:1.2.0"
18059-
checksum: 10c0/86c661dfb265ed5dd1ddd9188f0dfbecf4ec4dc3ea6cabab081d3a2ba285054d9767a641a233bd6fd694fd89f7d0ef94913032feddf5365252700b02db4bf4e1
18060-
languageName: node
18061-
linkType: hard
18062-
1806318040
"path-expression-matcher@npm:^1.5.0":
1806418041
version: 1.5.0
1806518042
resolution: "path-expression-matcher@npm:1.5.0"
@@ -20564,12 +20541,12 @@ __metadata:
2056420541
linkType: hard
2056520542

2056620543
"socks@npm:^2.8.3":
20567-
version: 2.8.4
20568-
resolution: "socks@npm:2.8.4"
20544+
version: 2.8.9
20545+
resolution: "socks@npm:2.8.9"
2056920546
dependencies:
20570-
ip-address: "npm:^9.0.5"
20547+
ip-address: "npm:^10.1.1"
2057120548
smart-buffer: "npm:^4.2.0"
20572-
checksum: 10c0/00c3271e233ccf1fb83a3dd2060b94cc37817e0f797a93c560b9a7a86c4a0ec2961fb31263bdd24a3c28945e24868b5f063cd98744171d9e942c513454b50ae5
20549+
checksum: 10c0/2d4350c31142b0931eb1758825b426bcbf4bfb5eed682ca48bc46dc9e7d1930ec366ea574ad49fc6c1fd9e9e17ce243be0ef13e31fc4b0319d9093f1fb19743c
2057320550
languageName: node
2057420551
linkType: hard
2057520552

@@ -20641,13 +20618,6 @@ __metadata:
2064120618
languageName: node
2064220619
linkType: hard
2064320620

20644-
"sprintf-js@npm:^1.1.3":
20645-
version: 1.1.3
20646-
resolution: "sprintf-js@npm:1.1.3"
20647-
checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec
20648-
languageName: node
20649-
linkType: hard
20650-
2065120621
"ssri@npm:^12.0.0":
2065220622
version: 12.0.0
2065320623
resolution: "ssri@npm:12.0.0"
@@ -22606,6 +22576,13 @@ __metadata:
2260622576
languageName: node
2260722577
linkType: hard
2260822578

22579+
"xml-naming@npm:^0.1.0":
22580+
version: 0.1.0
22581+
resolution: "xml-naming@npm:0.1.0"
22582+
checksum: 10c0/8c7614865361bcb7e53e3e091dac21c567e2b92d447919b2f072775aa9dcfc94a5255bd52fbaa0fd53c93513e53a23a6a835218ad2af512451dbc678392f85fe
22583+
languageName: node
22584+
linkType: hard
22585+
2260922586
"xmlchars@npm:^2.2.0":
2261022587
version: 2.2.0
2261122588
resolution: "xmlchars@npm:2.2.0"

0 commit comments

Comments
 (0)