protobuf.js icon indicating copy to clipboard operation
protobuf.js copied to clipboard

Using `eval` triggers security warning in the terminal

Open dodanex opened this issue 7 months ago • 4 comments

Getting this warning in the terminal:

WARN  node_modules/@protobufjs/inquire/index.js (12:18): Use of eval in "node_modules/@protobufjs/inquire/index.js" is strongly discouraged as it poses security risks and may cause issues with minification.

Can the eval function be avoided?

dodanex avatar Apr 08 '25 14:04 dodanex

The eval() statement is no longer in the github source tree, but we need a new public of @protobufjs/inquire, which hasn't been published in at least 5 years.

@mkruskal-google , not sure you can do this, or if someone else is more apropos.

Can you or some other owner bump the version for that package and publish a new version? All the references seem to be to ^1.1.0, so just publishing a new build as 1.1.1 should allow people to avoid eval() with resorting to local package "overrides" to replace the functionality.

Thanks!

efer-ms avatar May 16 '25 23:05 efer-ms

Yep, it got removed in #1941 in December but there hasn't been a new release cut. https://www.npmjs.com/package/@protobufjs/inquire

dynst avatar May 20 '25 19:05 dynst

This prevents using firebase in cloudflare workers with opennextjs. A new cut would be lovely.

xrendan avatar Jun 06 '25 10:06 xrendan

FYI... I have published a version of the package under a different name, so you can override the package in the root package.json of your project.

With something like this:

"overrides": {
    "protobufjs": {
      "@protobufjs/inquire": "npm:[email protected]"
    }
}

The package is identical to the inquire packge here, other than changes to the package.json to have a different name and version, etc.

You could also override by pointing to the github repo: https://github.com/efer-ms/protobufjs_inquire where I made it the root package.

This can work until we get a proper package published here.

efer-ms avatar Jun 06 '25 15:06 efer-ms

This would be very helpful.

mjones-vsat avatar Jul 08 '25 19:07 mjones-vsat

As @efer-ms suggested, please bump the package version of @protobufjs/inquire and deploy it, so that the change you introduced in v7.5.0 can take effect. You're almost there, just cross the finish line 🙏

mablay avatar Sep 18 '25 07:09 mablay