Skip to content

fix(deps): resolve install warnings and audit vulnerabilities - #5252

Merged
diegosouzapw merged 6 commits into
cheaper-inference:release/v3.8.40from
yunaamelia:fix/deps-warnings-and-audit
Jun 28, 2026
Merged

diegosouzapw merged 6 commits into
cheaper-inference:release/v3.8.40from
yunaamelia:fix/deps-warnings-and-audit

Conversation

@yunaamelia

Copy link
Copy Markdown
Contributor

Summary

Fixes the warnings surfaced by npm install, a runtime Cannot find module crash on omniroute serve, and the 4 moderate npm audit advisories.

1. omniroute serve crash — missing runtime module

bin/cli/commands/serve.mjs imports ../../../scripts/build/runtime-env.mjs at runtime, but that file was not in the files allow-list, so the published npm package omitted it:

✖ Cannot find module '.../scripts/build/runtime-env.mjs' imported from '.../bin/cli/commands/serve.mjs'

Added scripts/build/runtime-env.mjs to files. Verified with npm pack --dry-run that the tarball now contains it.

2. Deprecated stub type packages

Removed @types/keytar and @types/bcryptjs — both are deprecated stubs; keytar and bcryptjs ship their own type definitions. npm run typecheck:core still passes.

3. 4 moderate audit vulnerabilities (js-yaml DoS)

The advisories came from the dev-only lockfile-lint → lockfile-lint-api@5.9.2 → @yarnpkg/parsers@3.0.3 → js-yaml@3.14.2 chain (GHSA-h67p-54hq-rp68). lockfile-lint-api has no version free of both that advisory and GHSA-7cfr-5cjf-32p4, so a scoped override is used instead:

"@yarnpkg/parsers": { "js-yaml": "^4.2.0" }

js-yaml 4.x drops safeLoad (used only by the yarn syml parser), but the gate runs lockfile-lint with --type npm on package-lock.json, so that path is never exercised.

Testing

  • npm audit → found 0 vulnerabilities
  • npm install → no @types/keytar/@types/bcryptjs deprecation warnings
  • npm run check:lockfile → ✔ No issues detected (proves the js-yaml override doesn't break lockfile-lint)
  • npm run typecheck:core → passes
  • npm pack --dry-run → includes scripts/build/runtime-env.mjs

Notes

Remaining transitive deprecations (prebuild-install, boolean, glob@10) are pulled by upstream packages and can't be resolved here without risky overrides.

diegosouzapw and others added 3 commits June 28, 2026 10:23
…-inference#5228)

apt-get upgrade -y in the base stage pulls security-patched trixie
packages at build time, and npm install -g npm@latest refreshes the
globally-bundled undici/tar inside the npm CLI. Together these clear the
subset of GitHub container-scan CVE alerts that have an upstream fix
available.

None of the flagged CVEs are in the application dependency tree (app
already resolves undici@8.5.0 / tar@7.5.16, both fixed); they live in
the node:24-trixie-slim base layer and npm's own internals, and none are
reachable from the proxy request surface at runtime. CVEs without a
published fix (local-only TOCTOU, etc.) remain until the distro patches
them and the image is rebuilt.
…se) (cheaper-inference#5234)

The advisory Trivy image scan uploaded every HIGH/CRITICAL into the
Security tab without ignore-unfixed, flooding it with ~150 unfixable
base-image OS CVEs (Debian trixie packages with no upstream patch,
overwhelmingly local-only and not reachable from the proxy request
surface). Operators cannot act on those, so they are pure noise.

Add ignore-unfixed:true to the advisory step so it mirrors the existing
CRITICAL blocking gate and surfaces only actionable, fixable
vulnerabilities. Wire trivyignores to a new repo-root .trivyignore that
documents the accepted-risk policy and is the single auditable home for
the rare fixable CVE we must temporarily accept (none at present).

Takes effect on the next release image build (Trivy only runs on tag
builds, not main pushes); fixed CVEs drop out of the SARIF and GitHub
auto-resolves the corresponding alerts.
- Add scripts/build/runtime-env.mjs to the published "files" list. serve.mjs
  imports it at runtime, but it was excluded from the npm package, causing
  'Cannot find module .../scripts/build/runtime-env.mjs' on `omniroute` serve.
- Drop deprecated stub type packages @types/keytar and @types/bcryptjs; the
  keytar and bcryptjs packages ship their own type definitions.
- Override js-yaml to ^4.2.0 under @yarnpkg/parsers to clear 4 moderate
  js-yaml DoS advisories (GHSA-h67p-54hq-rp68) pulled in via the lockfile-lint
  dev dependency chain. The npm-type lockfile gate never exercises the yarn
  syml/safeLoad path, and `npm run check:lockfile` still passes.
@yunaamelia
yunaamelia requested a review from diegosouzapw as a code owner June 28, 2026 18:57
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the unused type definitions @types/bcryptjs and @types/keytar from the dependencies, overrides the js-yaml dependency version for @yarnpkg/parsers to ^4.2.0 (updating it to 4.3.0 in the lockfile), and updates various package-lock entries to mark dependencies as optional instead of devOptional. Additionally, it registers the build script scripts/build/runtime-env.mjs in the package files list. No review comments were provided, and there is no feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.40 June 28, 2026 20:07
diegosouzapw and others added 3 commits June 28, 2026 17:34
…ries

Removing the deprecated @types/bcryptjs and @types/keytar stub packages from
package.json leaves their dependency-allowlist.json entries stale. The
check:deps stale-enforcement gate fails ("violação corrigida; REMOVA a
entrada") until they are removed. Drop both entries so check:deps is green
on the merge into release.

Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
…340→1347

Base-red inherited from cheaper-inference#5250 (codex local_shell drop), which added a
regression test to executor-codex.test.ts but was merged with --admin so the
frozen file-size baseline was never bumped. Syncing release/v3.8.40 into this
PR surfaces the violation (1347 > frozen 1340). Reconcile the frozen cap to
the current size so Fast Quality Gates is green.

Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
@diegosouzapw
diegosouzapw merged commit 2932145 into cheaper-inference:release/v3.8.40 Jun 28, 2026
7 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Jun 29, 2026
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…r-inference#5252)

Integrated into release/v3.8.40 — deprecated stub types removed, Trivy ignore-unfixed, js-yaml override; allowlist + file-size baseline reconciled.
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.

2 participants