From 429b3424f28e344c6585b1a9ad77d43acef75856 Mon Sep 17 00:00:00 2001 From: dirtydishes Date: Fri, 12 Jun 2026 18:59:01 -0400 Subject: [PATCH] fix tmp audit finding --- bun.lock | 4 +- ...2026-06-12-1855-resolve-tmp-cve-audit.html | 366 ++++++++++++++++++ package.json | 2 +- 3 files changed, 369 insertions(+), 3 deletions(-) create mode 100644 docs/turns/2026-06-12-1855-resolve-tmp-cve-audit.html diff --git a/bun.lock b/bun.lock index 9b60caa..0b7d3ab 100644 --- a/bun.lock +++ b/bun.lock @@ -176,7 +176,7 @@ "@electron/node-gyp": "^10.2.0-electron.2", "postcss": "^8.5.15", "tar": "^7.5.15", - "tmp": "^0.2.5", + "tmp": "^0.2.6", }, "packages": { "@biomejs/biome": ["@biomejs/biome@2.4.16", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.16", "@biomejs/cli-darwin-x64": "2.4.16", "@biomejs/cli-linux-arm64": "2.4.16", "@biomejs/cli-linux-arm64-musl": "2.4.16", "@biomejs/cli-linux-x64": "2.4.16", "@biomejs/cli-linux-x64-musl": "2.4.16", "@biomejs/cli-win32-arm64": "2.4.16", "@biomejs/cli-win32-x64": "2.4.16" }, "bin": { "biome": "bin/biome" } }, "sha512-x9ajFh1zChVybCiM3TN6OD4phAqLgtPZjFrZF+aTMYCPjwBO+k529TX7PPsAqtGNLeV4UgzwQnowEgS7bGmzcA=="], @@ -1175,7 +1175,7 @@ "terser-webpack-plugin": ["terser-webpack-plugin@5.6.0", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", "jest-worker": "^27.4.5", "schema-utils": "^4.3.0", "terser": "^5.31.1" }, "peerDependencies": { "webpack": "^5.1.0" } }, "sha512-Eum+5ajkaOhf5KbM26osvv21kLD7BaGqQ1UA4Ami4arYwylmGUQTgHFpHDdmJod1q4QXa66p0to/FBKID+J1vA=="], - "tmp": ["tmp@0.2.5", "", {}, "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow=="], + "tmp": ["tmp@0.2.7", "", {}, "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw=="], "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], diff --git a/docs/turns/2026-06-12-1855-resolve-tmp-cve-audit.html b/docs/turns/2026-06-12-1855-resolve-tmp-cve-audit.html new file mode 100644 index 0000000..8379559 --- /dev/null +++ b/docs/turns/2026-06-12-1855-resolve-tmp-cve-audit.html @@ -0,0 +1,366 @@ + + + + + + Turn Report: Resolve tmp CVE Audit Finding + + + +
+
+

Resolve tmp CVE Audit Finding

+

Created 2026-06-12 18:55 America/New_York for islandflow.

+
+ branch: lavender/resolve-forgejo-security-issues + scope: dependency security + audit: clean +
+
+ +
+
+

Summary

+

Updated the workspace dependency override for tmp so Bun resolves a patched version for the desktop packaging chain. The current audit finding, GHSA-ph9p-34f9-6g65, is no longer present: bun audit reports no vulnerabilities.

+
+ +
+

Changes Made

+
    +
  • Changed the root overrides.tmp range from ^0.2.5 to ^0.2.6.
  • +
  • Regenerated bun.lock with bun install, resolving tmp to 0.2.7.
  • +
  • Checked Forgejo-related access paths for open issue review. Git-over-SSH worked, but Forgejo issue API/web access was blocked or unavailable from this environment.
  • +
+
+ +
+

Context

+

bun audit on current main reported one high-severity vulnerability: tmp <0.2.6, pulled through workspace:@islandflow/desktop via @electron-forge/cli. The advisory describes path traversal risk through unsanitized prefix/postfix handling.

+

A previous Forgejo security branch already attempted this remediation, but that remote branch/PR also contains unrelated standup and Beads/documentation commits. This branch was rebuilt from forgejo/main in a clean worktree so the PR contains only the security fix and this task record.

+
Forgejo issue enumeration could not be completed directly: fj issue search and authenticated REST calls hit Cloudflare 1010, the old git.dirtydishes.dev host resolves to 0.0.0.0, and git.deltaisland.io returned generic 404s for web issue routes. The local package audit was still checked end to end.
+
+ +
+

Important Implementation Details

+
    +
  • The direct dependency source is transitive, so the safest narrow remediation is the existing root override.
  • +
  • The range starts at ^0.2.6, the first non-vulnerable version according to the audit rule, while the lockfile currently resolves tmp@0.2.7.
  • +
  • No runtime application code changed. This is a package graph and lockfile correction.
  • +
+
+ +
+

Relevant Diff Snippets

+

The rendered diff below is generated with @pierre/diffs/ssr using preloadPatchFile({ patch, options: {} }). Each SSR fragment is contained inside a declarative Shadow DOM root so Diffs styles cannot affect the rest of the report.

+
+
+
+
+
+ +
+

Expected Impact for End-Users

+

No interface or workflow behavior should change. The practical effect is reduced exposure to the known tmp path traversal advisory in the desktop build/tooling dependency graph.

+
+ +
+

Validation

+
    +
  • bun audit: passed, no vulnerabilities found.
  • +
  • bun test: passed, 250 tests across 41 files.
  • +
  • git diff --check -- docs/turns/ package.json bun.lock: passed.
  • +
  • bun run check: failed on pre-existing Biome import-order diagnostics in unrelated source/test files. No dependency-fix files were implicated.
  • +
+
+ +
+

Issues, Limitations, and Mitigations

+
    +
  • Forgejo issue list access was incomplete. CLI/API/web issue enumeration was blocked or unavailable from this environment. Mitigation: the local security audit was run from clean main, and the only active audit finding was fixed.
  • +
  • Full Biome check is not green on current main. It reports import-order fixes across existing files outside this change. Mitigation: the targeted security audit and full test suite passed, and the PR avoids broad formatting churn.
  • +
  • The fix relies on an override because tmp is transitive through Electron Forge tooling. Mitigation: the lockfile records the resolved patched version.
  • +
+
+ +
+

Follow-up Work

+
    +
  • Once Forgejo issue access is available, cross-check the open issue list against this PR and close/comment on the matching security ticket.
  • +
  • Retire or close the older polluted lavender/address-cve-tmp@0.2.5 PR/branch if this clean PR supersedes it.
  • +
  • Run a separate formatting PR for the existing Biome import-order backlog if bun run check should become a merge gate.
  • +
+
+
+
+ + diff --git a/package.json b/package.json index 7dc2533..a7789a7 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "overrides": { "postcss": "^8.5.15", "tar": "^7.5.15", - "tmp": "^0.2.5", + "tmp": "^0.2.6", "@electron/node-gyp": "^10.2.0-electron.2" }, "dependencies": { -- 2.49.1