有关node_modules和安全性的一般问题

时间:2019-10-17 10:53:59

标签: npm yarn node-modules

在网上找不到任何东西,可能不是问题,但我想我要在这里确认。

我们在许多WordPress网站上运行Wordfence安全插件,最近看到了这个“关键问题”的报道:

Filename: wp-content/themes/theme-name/node_modules/webpack-assets-manifest/test/fixtures/client.js
File Type: Not a core, theme, or plugin file from wordpress.org.
Details: This file appears to be installed or modified by a hacker to perform malicious activity. 
If you know about this file you can choose to ignore it to exclude it from future scans. 
The matched text in this file is: require('./Ginger.jpg');

The issue type is: Backdoor:PHP/req_img.3645
Description: A backdoor known as req_img

首先,对我来说,这看起来并不像是后门,尤其是据我所知,除非我运行npm(或yarn),否则不会执行node_modules的内容。这比我想的还要严重吗?

第二,在服务器上运行npm / yarn时,默认情况下,node_modules文件夹具有chmod 775(drwxrwxr-x)。可以这样保留它还是我们应该采取任何行动?

0 个答案:

没有答案