Skip to content

Commit 33c714c

Browse files
Merge branch 'main' into v5
2 parents 3ede7b0 + 7e589fc commit 33c714c

83 files changed

Lines changed: 1251 additions & 207 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: "true"
18+
- name: Use Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20.x'
22+
cache: 'yarn'
23+
cache-dependency-path: '**/yarn.lock'
24+
25+
- name: Install
26+
run: yarn install --frozen-lockfile
27+
28+
- name: Lint
29+
run: yarn lint

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Agents
22

3+
See [CLAUDE.md](./CLAUDE.md) for project-wide conventions (code style, file naming, API route handlers, auth, PR workflow, etc.). Follow it as if it were part of this file.
4+
35
## Cursor Cloud specific instructions
46

57
### Overview

CHANGELOG.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Changed
11-
- Redesigned the app layout with a new collapsible sidebar navigation, replacing the previous top navigation bar. [#1097](https://github.com/sourcebot-dev/sourcebot/pull/1097)
12-
- Expired offline license keys no longer crash the process. An expired key now degrades to the unlicensed state. [#1109](https://github.com/sourcebot-dev/sourcebot/pull/1109)
10+
### Added
11+
- Added warning message that fires on startup when host environment contains env vars that simple-git flags as unsafe. [#1193](https://github.com/sourcebot-dev/sourcebot/pull/1193)
12+
- Added a loading skeleton to the latest commit info bar in the code browser. [#1195](https://github.com/sourcebot-dev/sourcebot/pull/1195)
1313

1414
### Fixed
1515
- Add missing schema changes introduced in [#1170](https://github.com/sourcebot-dev/sourcebot/pull/1170). [#1176](https://github.com/sourcebot-dev/sourcebot/pull/1176)
16+
- 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)
17+
- Bumped transitive `fast-uri` dependency to `^3.1.2`. [#1181](https://github.com/sourcebot-dev/sourcebot/pull/1181)
18+
- Upgraded `simple-git` to `3.36.0` to address CVE-2026-6951. [#1183](https://github.com/sourcebot-dev/sourcebot/pull/1183)
19+
- 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)
20+
- Upgraded `ip-address` to `^10.2.0` to address CVE-2026-42338. [#1189](https://github.com/sourcebot-dev/sourcebot/pull/1189)
21+
- 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)
22+
23+
### Changed
24+
- Reduced the log verbosity of the worker by changing various log messages from info to debug. [#1179](https://github.com/sourcebot-dev/sourcebot/pull/1179)
25+
- [EE] Switched symbol hover detection to use Lezer highlight tags, broadening identifier coverage. [#1194](https://github.com/sourcebot-dev/sourcebot/pull/1194)
26+
- Improved git history and blame performance on large repositories. [#1198](https://github.com/sourcebot-dev/sourcebot/pull/1198)
27+
- Redesigned the app layout with a new collapsible sidebar navigation, replacing the previous top navigation bar. [#1097](https://github.com/sourcebot-dev/sourcebot/pull/1097)
28+
- Expired offline license keys no longer crash the process. An expired key now degrades to the unlicensed state. [#1109](https://github.com/sourcebot-dev/sourcebot/pull/1109)
1629

1730
## [4.17.1] - 2026-05-04
1831

CLAUDE.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,89 @@ Images added to `.mdx` files in `docs/` should be wrapped in a `<Frame>` compone
263263
</Frame>
264264
```
265265

266+
## Fixing CVEs
267+
268+
When fixing a CVE in a transitive dependency, prefer a real top-level upgrade over a forced `resolutions` override.
269+
270+
1. **Trace the dependency chain to a package in your own `package.json`.** Run:
271+
272+
```bash
273+
yarn why <vulnerable-package> --recursive
274+
```
275+
276+
"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`.
277+
278+
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:
279+
280+
```bash
281+
yarn up <intermediate-or-vulnerable-pkg>
282+
# or, to refresh many at once:
283+
yarn dedupe
284+
```
285+
286+
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.
287+
288+
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`.
289+
290+
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 `>=`:
291+
292+
```json
293+
"resolutions": {
294+
"<pkg>@npm:<existing-source-range>": "^<patched>"
295+
}
296+
```
297+
298+
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"`.
299+
300+
### Branch naming for CVE fixes
301+
302+
Use a **package-keyed** branch name, not a CVE-keyed one:
303+
304+
```
305+
cursor/cve/<package>
306+
```
307+
308+
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.
309+
310+
### Batching CVEs that share a package
311+
312+
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.
313+
314+
1. **Extract** `<package>` and `<min-patched-version>` from the Linear issue (the Dependabot-sourced body lists both — affected package and fixed version).
315+
316+
2. **Look for a sibling PR**:
317+
318+
```bash
319+
gh pr list --state open --search '<package> in:title' --json number,title,headRefName
320+
```
321+
322+
3. **Decide based on the result**:
323+
324+
- **Sibling PR exists and its branch already pins ≥ `<min-patched-version>`**:
325+
- `gh pr checkout <number>`
326+
- **Edit** the existing CHANGELOG line for this PR — append this CVE ID to the comma-separated list. Do not add a new CHANGELOG line.
327+
- `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).
328+
- Do not transition the Linear issue manually — leave it for the merge to close.
329+
- **Do not open a new PR.**
330+
331+
- **Sibling PR exists but its pin is too low to cover this CVE**:
332+
- Check out the branch.
333+
- Bump the resolution / package version higher to cover both.
334+
- **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.
335+
- Do not transition the Linear issue manually — leave it for the merge to close.
336+
337+
- **No sibling PR exists**:
338+
- Create a new `cursor/cve/<package>` branch and open the PR as usual.
339+
340+
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.
341+
342+
### CHANGELOG and PR conventions for CVE fixes
343+
344+
- CHANGELOG entry (under `[Unreleased] → Fixed`): `Upgraded \`<pkg>\` to \`^x.y.z\` to address CVE-A, CVE-B, .... [#<PR>]`
345+
- **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.
346+
- PR title format: `chore: upgrade <pkg> to ^x.y.z to address CVE-A, CVE-B, ...` (list every CVE the PR resolves).
347+
- Keep entries short. The CVE IDs are enough.
348+
266349
## Branches and Pull Requests
267350

268351
When creating a branch or opening a PR, ask the user for:

docs/api-reference/sourcebot-public.openapi.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,10 @@
599599
"type": "string",
600600
"description": "The hash of the commit that last modified the lines in this range."
601601
},
602+
"path": {
603+
"type": "string",
604+
"description": "The file path as it existed at the attributing commit. May differ from the current path due to renames."
605+
},
602606
"startLine": {
603607
"type": "integer",
604608
"minimum": 0,
@@ -614,6 +618,7 @@
614618
},
615619
"required": [
616620
"hash",
621+
"path",
617622
"startLine",
618623
"lineCount"
619624
]

docs/docs/configuration/idp.mdx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,32 @@ in the GitHub identity provider config.
6969

7070
When asked to provide a callback url, provide `<sourcebot_url>/api/auth/callback/github` (ex. https://sourcebot.coolcorp.com/api/auth/callback/github)
7171

72+
<Frame>
73+
<img src="/images/github_app_callback_url.png" alt="GitHub App callback URL configuration" />
74+
</Frame>
75+
76+
Select "Request user authorization (OAuth) during installation"
77+
78+
<Frame>
79+
<img src="/images/github_app_request_user_auth.png" alt="GitHub App request user authorization during installation" />
80+
</Frame>
81+
7282
Set the following fine-grained permissions in the GitHub App:
7383
- `“Email addresses” account permissions (read)`
74-
- `"Metadata" repository permissions (read)` (only needed if using permission syncing)
84+
85+
<Frame>
86+
<img src="/images/github_app_perm_email.png" alt="Email addresses account permission set to Read-only" />
87+
</Frame>
88+
- `"Metadata" repository permissions (read)` (only needed if using [permission syncing](/docs/features/permission-syncing))
89+
90+
<Frame>
91+
<img src="/images/github_app_perm_metadata.png" alt="Metadata repository permission set to Read-only" />
92+
</Frame>
93+
- `"Contents" repository permissions (read)` (only needed if using the app to [authenticate a connection](/docs/connections/github#github-app))
94+
95+
<Frame>
96+
<img src="/images/github_app_perm_contents.png" alt="Contents repository permission set to Read-only" />
97+
</Frame>
7598
</Tab>
7699
<Tab title="GitHub OAuth App">
77100
Follow [this guide](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) by GitHub to create an OAuth App.
77.6 KB
Loading
35.5 KB
Loading
31.3 KB
Loading
34.6 KB
Loading

0 commit comments

Comments
 (0)