tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

tfjs-models npm packages have incorrectly defined dependencies

Open pranavosu opened this issue 1 year ago • 3 comments

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
  • TensorFlow.js installed from (npm or script link): npm
  • TensorFlow.js version: https://www.npmjs.com/package/@tensorflow-models/[email protected]
  • CUDA/cuDNN version: N/A

Describe the problem Some of the packages in the tfjs-models repo have transitive dependencies on rimraf > glob > inflight. inflight has a security issue explained here This prevents consumers installing @tensorflow-models/face-detection or a few other models.

Provide the exact sequence of commands / steps that you executed before running into the problem

  • npm i @tensorflow-models/face-detection@latest
  • npm explain inflight
  • affected version of inflight in the dependency tree

Any other info / logs I've created a PR to fix this issue for package consumers - https://github.com/tensorflow/tfjs-models/pull/1543

pranavosu avatar Oct 05 '25 17:10 pranavosu

Hi @pranavosu , Thank you for reporting this issue. I am able to install @tensorflow-models/face-detection; however, the installation is also pulling in [email protected], which is known to have a security issue. I have escalated this issue to the team.

Could you please share the specific error message you are seeing while installing the package?

avmohansai avatar Dec 03 '25 04:12 avmohansai

@avmohansai the error is

Issues with no direct upgrade or patch:
✗ Missing Release of Resource after Effective Lifetime [Medium Severity][https://security.snyk.io/vuln/SNYK-JS-INFLIGHT-6095116] in [email protected]
introduced by @org/[email protected] > @tensorflow-models/[email protected] > [email protected] > [email protected] > [email protected]
No upgrade or patch available

pranavosu avatar Feb 14 '26 15:02 pranavosu

Hi @pranavosu , Thanks for your reply and PR. The [email protected] > is deprecated(Rimraf versions prior to v4 are no longer supported) and it is a known issue, which is already been escalated to the team. Thank you.

avmohansai avatar Feb 16 '26 05:02 avmohansai