chore(ci): commit the frontend-core lockfile so Trivy can scan npm - #2118
Open
pavlo-flamingo wants to merge 5 commits into
Open
pavlo-flamingo wants to merge 5 commits into
pavlo-flamingo wants to merge 5 commits into
Conversation
Trivy's fs scan detects only pom.xml and Cargo.lock — the Scan Code job reports 'Number of language-specific files num=36' with no npm analyzer, so openframe-frontend-core is silently unscanned. The cause is package-lock.json being gitignored: without a lockfile npm's dependency tree cannot be resolved, which also blocks npm audit, the GitHub dependency graph and Dependabot. Un-ignore the lockfile and commit it for openframe-frontend-core, generated from the current manifest with npm install --package-lock-only.
npm ci in the three install steps, so CI and the published build get the tree the lockfile pins instead of re-resolving the ranges on every run, and drift between package.json and the lock fails loudly. Point the setup-node cache key at package-lock.json, and correct the three comments that documented the absent lockfile as a given.
romanivan-flamingo
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Scan Codejob (Trivy) never looks at the frontend. Its log says:No npm analyzer —
openframe-frontend-coreis silently skipped. A green frontend in that report is "not scanned", not "clean".Cause
package-lock.jsonwas gitignored (line 48, inherited from the original UI-Kit migration in ccb885c). Trivy resolves the npm dependency tree from the lockfile; without one it has nothing to analyse. The same gap blocksnpm audit, the GitHub dependency graph and Dependabot alerts.Fix
Un-ignore the lockfile and commit it for
openframe-frontend-core, generated from the current manifest withnpm install --package-lock-only(1289 packages, all resolved from registry.npmjs.org, no local paths).Second commit: install from the lockfile
npm ciin the three install steps (both node jobs intest.yml, the publish job inrelease.yml), the setup-node cache key moved topackage-lock.json, and three comments corrected — they documented the absent lockfile as a given, includingtest.yml's own note that fixing this "would be a repo-wide policy call". This PR makes that call.The npm pin working around the Arborist
edgesOutcrash stays: a missing lockfile is the likely trigger, but that is worth confirming over a few green runs rather than assuming.What CI now says
Verified on this branch: Trivy's npm analyzer runs (
Number of language-specific files num=37,[npm] Detecting vulnerabilities...,dir="openframe-frontend-core/node_modules"), covering the 1037 production entries of the lockfile — Trivy skips the 251 markeddev: true. It reports no npm HIGH/CRITICAL: the lockfile resolves to current patch versions, and the scan runs with--ignore-unfixed.npm ciinstalls cleanly (added 1126 packages), and every check after it — type-check, lint, lint:types, format, test, build, lint:cycles — is green.Scan Codestays red on the same 92 Java/Rust findings it fails on for every PR on main. This PR neither adds to them nor fixes them.Caveats
openframe-frontend-core/package.jsonas of this branch point, and nothing on main has touched that manifest since. If a PR changing those dependencies lands first, rebase this one and regenerate the lockfile — otherwisenpm cifails on main for everyone..github/dependabot.ymlin this repo, so pinned versions will age andScan Codewill eventually go red on npm with no automated bump path. Adding one is the natural follow-up, and it is a separate call because it affects maven and cargo too (24 open Dependabot alerts across the three ecosystems).react-embedding-exampleis left without a lockfile on purpose: it depends on@flamingo-stack/openframe-frontend-coreviafile:.yalc/..., which does not resolve outside a yalc-linked checkout. Its 3 open npm alerts (dev-scopevite) therefore stay outside Trivy's reach.pnpm-lock.yamlstays ignored — the repo installs with npm.npm cion the PR job catches it before release does.