Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm reports high severity issue in gltf-transform/cli dependency chain #674

Closed
hybridherbst opened this issue Sep 7, 2022 · 3 comments
Closed
Labels
bug Something isn't working dependencies Pull requests and issues related to dependencies package:cli

Comments

@hybridherbst
Copy link

Describe the bug
npm complains about high-severity issues in @gltf-transform/cli:

image

To Reproduce
Steps to reproduce the behavior:

  1. install @gltf-transform/cli

Expected behavior
No high-severity errors, these are scary, and then things break when people actually run the audit fix...

@hybridherbst hybridherbst added the bug Something isn't working label Sep 7, 2022
@donmccurdy
Copy link
Owner

Hi @hybridherbst!

I'll have to admit I take pretty dim view of npm audit (see “npm audit: Broken by design”). I've never seen it catch an actual vulnerability in a project I've worked on, in many years of reading its audits. The "high severity" threat model is typically:

If you are using {library} in a production server, loading arbitrary data sent by from malicious users, and then passing that data into {unspecified method} of {dependency}, then your server might be slowed down by very complex Regular Expression, effectively taking the server offline.

It will flag these DDoS errors on everything, including dependencies used only by the developer when compiling the project, where no end-user input is possible.


More practically — if you're processing inputs from untrusted users in a privileged production server environment, be very careful, and validate all inputs. There are various risks here that go beyond what glTF-Transform can realistically protect against (see: "JPEG malware"). I can say more about this privately, if applicable. If you are not processing inputs from untrusted users, your main concern is a dependency being replaced by malware, and these will be stripped from npm, not flagged in audits.

glTF-Transform is configured with Renovate, and dependencies are automatically updated when compatible bug and security fixes are available. At any given time there will probably be some warnings from npm audit of varying severity, but as new versions of the vulnerable dependencies are released, they will be pulled into this project.

At the moment, it appears that my dependency on Caporal is the root of most of these audit warnings. I've nudged them about the issue (mattallty/Caporal.js#243) but can't be sure when/if that will be updated.

Aside, I would encourage using the glTF-Transform programmatic API, rather than the CLI, in a server environment. This will improve performance, and eliminates many dependencies.

@donmccurdy donmccurdy added dependencies Pull requests and issues related to dependencies package:cli bug Something isn't working and removed bug Something isn't working labels Sep 7, 2022
@hybridherbst
Copy link
Author

hybridherbst commented Sep 7, 2022

Thanks for the elaborate response! I generally agree on npm audit but it seems some people are looking very carefully at the "high severity" things being logged by npm.

I'd like to get rid of the /cli dependency, but I think I must be missing something; I opened

for that.

@donmccurdy
Copy link
Owner

Unfortunately it seems that I can't do much directly about this, unless someone responds on the Caporal thread. I don't see any reason to believe there is a real vulnerability, just the usual npm noise, though I do understand why clients would want a clean npm audit.

Unless a more appealing CLI framework than Caporal appears (i haven't found one so far), I think the time is probably better spent on trying to support KTX2/Basis compression without requiring a CLI environment, so I'll close this issue in favor of:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests and issues related to dependencies package:cli
Projects
None yet
Development

No branches or pull requests

2 participants