How to reveal folderpaths to detected-as-vulnerable package.json's in nested folders? #493
-
|
In our monorepo there are many nested folders having their own package.json. When I run globally-installed cve-lite on the root folder of my monorepo working copy, and include --verbose, the output does not indicate in which package.json the detected vulnerabilities exist. This prevents me from updating those package.json's and pushing them to the monorepo. Instead the suggested commands seem they would have the effect of updating the global package.json (which is outside the root of my monorepo working copy) and prevents me from sharing the fixes. Or, perhaps I misunderstand and using the suggested "npm install" commands that have no "-g" will update all package.json's that reference the indicated package? If so, it would be good education to add that tip in your README.md (because I have not come across such information after more than a decade of using npm). |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 27 replies
-
|
Thanks for the detailed write-up. This is exactly the kind of feedback that helps. The workspace-scoped fix commands you are describing landed in v1.18.1 (released yesterday). When CVE Lite detects that a direct dependency lives in a workspace package rather than the root, the generated fix command now includes the workspace qualifier - Could you upgrade and try again? npm install -g cve-lite-cli@latest
cve-lite . --verboseIf the fix commands still look like bare |
Beta Was this translation helpful? Give feedback.
-
|
Good news - multi-folder support is coming in the next release. I have a branch ready if you want to try it out now: npm install -g OWASP/cve-lite-cli#feature/issue-496-multi-folder-scanWhen CVE Lite finds no lockfile at the project root but discovers two or more lockfiles in subfolders, it automatically switches to multi-folder mode. You do not need any flags - it detects the layout on its own. In that mode it:
One thing worth knowing: when CVE Lite scans a folder and finds a lockfile there, it stops recursing into that folder's subdirectories. This prevents double-counting packages that appear in both a workspace root lockfile and a nested one. Workspace monorepos (where the root Let me know how it goes. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
It looks to me that your alpha is working... |
Beta Was this translation helpful? Give feedback.


The permission error is because
sudo npm install -ginstalls the binary as root, so running it as a regular user is blocked. Two options:Option 1 — run it with sudo:
sudo cve-lite . --verboseOption 2 — fix the permissions once:
Then run normally:
cve-lite . --verboseOption 2 is cleaner going forward.