audit.yml's three blocking bun-audit legs (web, sdk, plugin-kit) were all red on
main. Ten findings in sdk and plugin-kit, eight in web; every one of them a
transitive dependency, none reachable by bumping a direct dep.
web already carried the right mechanism — an `overrides` block whose `undici` and
`fast-uri` pins had simply gone stale — so it needed four bumps, not a new idea:
undici 7.28.0 -> ^7.29.0 and fast-uri 3.1.4 -> ^3.1.5 for the reported advisories,
plus postcss ^8.5.10 -> ^8.5.25 and brace-expansion ^5.0.8 -> ^5.0.9 for two more
that were published after the failing run and would have gone red on the next
audit anyway. All four stay inside their current major.
sdk and plugin-kit were harder and the fix deserves an explanation. Their single
finding is undici 8.7.0/8.8.0 pulled in by @effect/platform-node, a devDependency
pinned at 4.0.0-beta.98. That dependency already declares `undici: ^8.7.0`, which
permits the fixed 8.10.0 — the vulnerable version survives purely as a stale
lockfile resolution. Nothing bumps it in place: `bun update` only walks direct
dependencies, `bun install --force` preserves a resolution that still satisfies
its range, and every platform-node release through beta.103 declares the same
`^8.7.0`, so moving the dep changes nothing. Bun rejects the scoped form outright
("Bun currently does not support nested resolutions"), so a flat `overrides` entry
is the only mechanism available, and it necessarily also moves sdk's top-level
undici from 7.x to 8.x.
That is safe here, and was verified rather than assumed. The only source use is
sdk/src/config.ts, which does `new Agent({ connect: { ca } })` behind a dynamic
import and a try/catch with a documented plain-fetch fallback; `Agent` and its
`connect` option are unchanged between undici 7 and 8. sdk typechecks and its 72
tests pass against 8.10.0; plugin-kit typechecks and its 20 tests pass. Both trees
now dedupe to a single undici 8.10.0.
Consumers are deliberately untouched: `overrides` apply only at the root of the
tree that declares them and are not honored when the package is installed as a
dependency, so sdk's published `optionalDependencies: { undici: "^7.0.0" }` is
left alone — a consumer resolves the latest 7.x, which is the fixed 7.29.0. The
override governs this repo's own tree, which is exactly what audit.yml checks.
Worth knowing: sdk's dev tree therefore exercises undici 8 while consumers get 7.
One trap found on the way. Running `bun install` over plugin-kit's existing
lockfile emitted a lockfile with two byte-identical `@punktfunk/host` entries —
its `file:../sdk` dependency crossed with the new override — and bun then refuses
its own output with "Error loading lockfile: InvalidPackageKey". That reads as a
tooling error rather than a finding, so it would have taken the audit gate down
while looking like something else entirely. Regenerating the lockfile from scratch
produces a valid single entry; all three lockfiles are checked for duplicate keys.
Also worth recording, because it nearly shipped: deleting the pinned nested entry
from a lockfile makes `bun audit` report "No vulnerabilities found" while the
vulnerable copy is still installed on disk. bun audit reads the lockfile, not
node_modules. That is a vacuous green, not a fix, and was rejected.
Verified: `bun audit` clean in all three trees; web builds and typechecks (its
typecheck needs the build first, which generates routeTree.gen); sdk 72/72 and
plugin-kit 20/20 tests pass.
65 lines
1.6 KiB
JSON
65 lines
1.6 KiB
JSON
{
|
|
"name": "@punktfunk/plugin-kit",
|
|
"version": "0.2.0",
|
|
"description": "Effect-based framework for punktfunk plugins: lifecycle runtime, config/state, sync engine, UI serving, CLI scaffold, and browser helpers.",
|
|
"type": "module",
|
|
"license": "MIT OR Apache-2.0",
|
|
"homepage": "https://git.unom.io/unom/punktfunk/src/branch/main/plugin-kit",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://git.unom.io/unom/punktfunk.git",
|
|
"directory": "plugin-kit"
|
|
},
|
|
"bugs": {
|
|
"url": "https://git.unom.io/unom/punktfunk/issues"
|
|
},
|
|
"keywords": ["punktfunk", "plugin", "framework", "effect"],
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./react": {
|
|
"types": "./dist/react/index.d.ts",
|
|
"default": "./dist/react/index.js"
|
|
},
|
|
"./wire": {
|
|
"types": "./dist/wire.d.ts",
|
|
"default": "./dist/wire.js"
|
|
},
|
|
"./theme.css": "./dist/theme.css"
|
|
},
|
|
"files": ["dist", "README.md"],
|
|
"publishConfig": {
|
|
"registry": "https://git.unom.io/api/packages/unom/npm/"
|
|
},
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit",
|
|
"build": "tsc -p tsconfig.build.json && cp src/theme.css dist/theme.css",
|
|
"test": "bun test",
|
|
"prepublishOnly": "bun run build"
|
|
},
|
|
"peerDependencies": {
|
|
"effect": "^4.0.0-beta.98",
|
|
"@punktfunk/host": "^0.1.2",
|
|
"react": "^19.2.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"react": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@punktfunk/host": "file:../sdk",
|
|
"@types/bun": "^1.3.0",
|
|
"@types/react": "^19.2.16",
|
|
"effect": "4.0.0-beta.99",
|
|
"typescript": "^5.9.3"
|
|
},
|
|
"overrides": {
|
|
"undici": "^8.9.0"
|
|
}
|
|
}
|