Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ Lanes uses [semantic versioning](https://semver.org), and 0.0.x versions are pre

## Unreleased

### 2026-11-15

- `06:07` **Security**: the site moves `astro` from 7.4.0 to 7.4.7 (GHSA-r3h5-4585-7x3w), with the transitive packages 7.4.7 requires. The new `site_astro_is_at_or_above_the_fixed_version` test in `crates/lane/tests/deps.rs` reads `site/package-lock.json` and fails when the pin falls below 7.4.7.

### 2026-11-14

- `00:39` **Security**: `rmcp` moves from 3.5.1 to 3.6.0 (RUSTSEC-2026-0461), and `libsqlite3-sys` from 0.38.2 to 0.39.0, which bundles SQLite 3.54.0 (RUSTSEC-2026-0459). `libsqlite3-sys` 0.39 needs `rusqlite` 0.41, so that direct dependency moved from 0.40 to 0.41 too; no call sites changed. The new `crates/lane/tests/deps.rs` reads `Cargo.lock` and fails when either pin falls below its fixed version.

### 2026-10-30

- `18:15` **Security**: the install count worker and the site pin fixed releases of npm packages with advisories: undici 6.29.1 (GHSA-2m5v-pch6-74hx, GHSA-qrxm-fqhp-jwvm, GHSA-xjj6-f33q-929c, GHSA-4qv8-2p9j-2685, GHSA-9fm3-97px-rjf6, GHSA-4w7w-5xrc-9h26, GHSA-55wc-3pg8-jfw6, GHSA-f72v-6w45-q472) and fast-uri 2.4.8 (GHSA-w74x-v6f9-j3xg, GHSA-wjr9-j795-jxcr).

### 2026-10-19

- `16:45` **Changed**: benchmark 1 measures wall time and disk in separate passes, so a full run fits a night or two per disk instead of days. The time pass runs 1 warmup and 10 runs back to back, removing the copies between runs without waiting. The disk pass runs 3 times per measurement, each run starting and ending on a settled disk, and goes first so the time pass's deletes never reach its numbers. The results file says which pass each number came from. `--pass time|disk|both` (`-Pass`) runs one or both, and `--disk-runs` (`-DiskRuns`) sets the disk runs. (`1fc6de1`)
Expand Down
27 changes: 21 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ etcetera = "0.11"
libc = "0.2"
ratatui = "0.30"
reflink-copy = "0.1"
rmcp = { version = "3.5", default-features = false, features = ["server", "transport-io"] }
rusqlite = { version = "0.40", features = ["bundled"] }
rmcp = { version = "3.6", default-features = false, features = ["server", "transport-io"] }
rusqlite = { version = "0.41", features = ["bundled"] }
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
tokio = { version = "1", features = ["rt"] }
Expand Down
71 changes: 71 additions & 0 deletions crates/lane/tests/deps.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//! Dependency pins that carry a security advisory, read from the workspace lockfiles.
//!
//! `Cargo.lock` is what an installed `lane` is built from, and `site/package-lock.json` is what
//! the website is built from, so those are the files a fix has to change. The test names the
//! fixed versions, so a stale lockfile fails here before a release ships it.

use std::path::PathBuf;

/// The version of `name` in a `Cargo.lock`, as written between quotes.
fn version_of(lock: &str, name: &str) -> String {
let needle = format!("[[package]]\nname = \"{name}\"\nversion = \"");
let start = lock
.find(&needle)
.unwrap_or_else(|| panic!("no `{name}` package in Cargo.lock"));
let rest = &lock[start + needle.len()..];
rest[..rest.find('"').expect("a closed version string")].to_string()
}

/// The version of the `node_modules/<name>` entry in an npm `package-lock.json`.
fn npm_version_of(lock: &str, name: &str) -> String {
let needle = format!("\"node_modules/{name}\": {{");
let start = lock
.find(&needle)
.unwrap_or_else(|| panic!("no `{name}` package in package-lock.json"));
let rest = &lock[start + needle.len()..];
let version = rest
.find("\"version\": \"")
.map(|i| &rest[i + "\"version\": \"".len()..])
.expect("a version in the package entry");
version[..version.find('"').expect("a closed version string")].to_string()
}

/// `a` at or above `b`, comparing the numeric `major.minor.patch` parts.
fn at_least(a: &str, b: &str) -> bool {
let parts = |v: &str| {
let mut it = v.split('.').map(|p| p.parse::<u64>().unwrap_or(0));
(
it.next().unwrap_or(0),
it.next().unwrap_or(0),
it.next().unwrap_or(0),
)
};
parts(a) >= parts(b)
}

#[test]
fn locked_packages_are_at_or_above_the_fixed_versions() {
let lock =
std::fs::read_to_string(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../Cargo.lock"))
.expect("Cargo.lock is readable");

// RUSTSEC-2026-0461 and RUSTSEC-2026-0462 (rmcp) and RUSTSEC-2026-0459 (libsqlite3-sys's
// bundled SQLite). Keep these floors in step with the advisories.
for (name, floor) in [("rmcp", "3.6.0"), ("libsqlite3-sys", "0.39.0")] {
let version = version_of(&lock, name);
assert!(
at_least(&version, floor),
"{name} {version} is below the fixed {floor}; bump it in Cargo.lock"
);
}
}

#[test]
fn site_astro_is_at_or_above_the_fixed_version() {
// GHSA-r3h5-4585-7x3w is fixed in astro 7.4.7. Keep this floor in step with the advisory.
let version = npm_version_of(include_str!("../../../site/package-lock.json"), "astro");
assert!(
at_least(&version, "7.4.7"),
"astro {version} is below the fixed 7.4.7; bump it in site/package-lock.json"
);
}
10 changes: 5 additions & 5 deletions services/install-count/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions services/install-count/test/deps.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { describe, expect, it } from "vitest";
import { readFileSync } from "node:fs";

describe("security pins", () => {
// The install-count worker's lockfile must keep undici on the advisory-fixed
// release (GHSA-2m5v-pch6-74hx, GHSA-qrxm-fqhp-jwvm, GHSA-xjj6-f33q-929c,
// GHSA-4qv8-2p9j-2685, GHSA-9fm3-97px-rjf6, GHSA-4w7w-5xrc-9h26,
// GHSA-55wc-3pg8-jfw6, GHSA-f72v-6w45-q472).
it("locks undici to 6.29.1", () => {
const lock = JSON.parse(readFileSync(new URL("../package-lock.json", import.meta.url), "utf8"));
const undici = lock.packages?.["node_modules/undici"];
expect(undici?.version).toBe("6.29.1");
});
});
Loading
Loading