Skip to content

chore(security): bump vite, add per-job permissions in ci.yml#172

Merged
rickcrawford merged 2 commits into
mainfrom
fix/security-vite-and-workflow-perms
May 16, 2026
Merged

chore(security): bump vite, add per-job permissions in ci.yml#172
rickcrawford merged 2 commits into
mainfrom
fix/security-vite-and-workflow-perms

Conversation

@rickcrawford

@rickcrawford rickcrawford commented May 16, 2026

Copy link
Copy Markdown
Contributor

Closes two open security alerts and removes the Node-20 deprecation banner across every workflow.

Dependabot #8: Vite path traversal (CVE-2026-39365)

Bumps ui/package.json vite from ^5.4.10 to ^6.4.2.

  • Advisory: GHSA-4w7w-66w2-5vf9
  • Vulnerable: vite <= 6.4.1 (and 7.0.0-7.3.1, 8.0.0-8.0.4)
  • First patched: 6.4.2 (also 7.3.2, 8.0.5)
  • Severity: medium (CVSS 6.3, CWE-22 path traversal)
  • Impact: dev-server-only; requires the dev server to be reachable on the network. The admin UI is a build-time tool gated behind the embed-admin-ui cargo feature, so production exposure is nil. Fixing as a hygiene baseline.

@vitejs/plugin-react ^4.3.3 is compatible with Vite 6; no other manifest changes. npm run build clean: 26 modules transformed, 145 kB bundle, 218 ms. npm audit reports zero findings.

Code scanning #56: actions/missing-workflow-permissions

Adds explicit permissions: contents: read to all four jobs in .github/workflows/ci.yml (build, release-build, supply-chain, crate-graph). The workflow root already declared the same block (PR #105), but CodeQL prefers defense-in-depth: the per-job block keeps the auth contract explicit even if the root default widens or the job is copied into a different workflow.

Node-20 deprecation removal

GitHub deprecated Node 20 for runner-hosted actions in the September 2025 changelog. Every workflow here was papering over the deprecation with FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 env vars. Bumped to the v5 majors that declare runs.using: node24 natively, then dropped the env shim.

Action Before After
actions/checkout v4 / v4.1.7 v5
actions/upload-artifact v4 / v4.4.0 v5
actions/download-artifact v4 v5
actions/cache v4 v5
actions/github-script v7.0.1 v8

Dropped FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 from ci.yml, release.yml, release-checks.yml, perf-regression.yml, reproducible-build.yml, licensing-conformance.yml, e2e.yml, fixture-freshness.yml, docs-ci.yml, and synthetic.yml.

Test plan

  • npm install && npm run build in ui/ (vite 6.4.2, no audit findings)
  • All 12 workflow YAMLs grepped clean of @v4, @v7.x, and FORCE_JAVASCRIPT_ACTIONS_TO_NODE24
  • CI build/test + CodeQL re-scan auto-closes alert fix: widen e2e startup wait window #56

## Dependabot #8: Vite path traversal (CVE-2026-39365)

Bump ui/package.json `vite` from ^5.4.10 to ^6.4.2. CVE-2026-39365
allows reaching `.map` files outside the project root via `../`
segments under the optimized-deps URL prefix; affects vite versions
<= 6.4.1 (and 7.0.0-7.3.1, and 8.0.0-8.0.4). Vite 6.4.2 patches the
strict-fs allow list to reject path traversal in `.map` handling.

Impact is dev-only (the admin UI is a build-time tool gated behind
the embed-admin-ui cargo feature) and requires the dev server to be
exposed to the network via `--host` or `server.host`, so production
exposure is nil. Bumping anyway: the audit guard is the dependency
hygiene, not a runtime mitigation.

`@vitejs/plugin-react ^4.3.3` is compatible with vite 6; no other
manifest changes needed. `npm run build` clean: 26 modules
transformed, 145 kB bundle, 218 ms.

## Code scanning #56: actions/missing-workflow-permissions

Add explicit per-job `permissions: contents: read` to all four jobs
in .github/workflows/ci.yml (build, release-build, supply-chain,
crate-graph). The workflow root already declared the same
permissions block (PR #105, da30222), but CodeQL's
actions/missing-workflow-permissions rule prefers defense-in-depth:
even when the root default is read-only, a per-job block keeps the
contract explicit if the root is ever widened or the job is copied
into a different workflow.
`actions/checkout@v4` (and pinned `@v4.1.7`) was on Node 20, which
GitHub deprecated for runner-hosted actions. The workflows here
papered over the deprecation with `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24`
env vars per the September 2025 changelog. The proper fix is to bump
to the v5 majors that target Node 24 natively, then drop the env
shim.

Bumped across every workflow:
- actions/checkout v4 -> v5
- actions/upload-artifact v4 -> v5
- actions/download-artifact v4 -> v5
- actions/cache v4 -> v5
- actions/github-script v7 -> v8

Dropped `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24` env vars from
ci.yml, release.yml, release-checks.yml, perf-regression.yml,
reproducible-build.yml, licensing-conformance.yml, e2e.yml,
fixture-freshness.yml, docs-ci.yml, and synthetic.yml; they are
unnecessary once every action declares `runs.using: node24`.

Reference: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
@rickcrawford rickcrawford merged commit 326e78a into main May 16, 2026
10 of 11 checks passed
rickcrawford added a commit that referenced this pull request May 16, 2026
The docs-ci lane (scripts/docs-ci.sh) extracts every fenced rust block
and type-checks it via `rustc --emit=metadata`. Five blocks across
three docs files were authored as pseudocode and never compiled
cleanly. They flagged the docs-ci job as failed on every PR that
touched docs even though docs-ci is not a required gate; PR #172 was
the latest casualty (run 25949658645).

Fixed by adding `,ignore` to the info tag, which the script's
`is_skipped` predicate recognises alongside `no_run`, `skip`,
`compile_fail`, and `edition2024`:

- docs/cloudflare-code-mode.md (1 block): WOR-410 usage example with
  a placeholder construction. Also tightens the placeholder to
  `/* built at startup */;` so it reads as obviously incomplete.
- docs/outbound-peer-pricing.md (1 block): llms.txt parse + iterate
  example that references types out of context.
- docs/adr-ai-hub-format.md (3 blocks): WOR-235 ADR pseudocode for
  the ChatFormat trait, hub types, and streaming event vocabulary.
  These are design sketches, not runnable code.

Local docs-ci is now green: `checked=99 skipped=29 rc=0` (vs
`checked=104 skipped=24 rc=1` before).
@rickcrawford rickcrawford deleted the fix/security-vite-and-workflow-perms branch May 16, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant