-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Vulnerability in dependency #563
Comments
Hi @damiarita, Not much we can do on our side... and no "proper" solution is available yet. The following PR could solve the issue if merged/released: nodejs/node-gyp#1718 Another solution could be to use Dart Sass instead of Node Sass (since the # Remove node-sass and replace it by sass
$ yarn remove node-sass
$ yarn add --dev sass // webpack.config.js
const Encore = require('@symfony/webpack-encore');
Encore.enableSassLoader(options => {
// The following line won't be needed anymore when
// the next version of sass-loader is released
options.implementation = require('sass');
}); |
Hi, I followed the steps. But I get the same issue as in #422 This is the error: I have tried both require('sass'); and require('dart-sass'); |
@damiarita You may be using an old version of Encore, support for Dart Sass was added in 0.24.0. |
@damiarita did you get a resolution here? I tried using sass as described here, even with webpack-encore 0.27.0, but it still says Error: Install node-sass to use enableSassLoader() |
I think the best option is to drop Encore.enableSassLoader(options => {
options.implementation = require('sass');
}) |
Odd, I still get the error even after changing it. Seems like it's a dependency of encore still |
@geoff-maddock Could you share a repro? I just tested it and it seems to work fine for a minimal setup: // webpack.config.js
const Encore = require('@symfony/webpack-encore');
Encore
.disableSingleRuntimeChunk()
.setOutputPath('build')
.setPublicPath('/build')
.enableSassLoader(options => {
options.implementation = require('sass');
})
.addEntry('scss', './style.scss')
;
module.exports = Encore.getWebpackConfig();
Also there isn't any vulnerability issue anymore with
|
Hi,
Recently, the vulnerability https://nodesecurity.io/advisories/803 appeared
I use webpack encore and enableSassLoader() this forces me to add node-sass which as this dependency chain: node-sass > node-gyp > tar
This is my yarn edit result
$ yarn audit
yarn audit v1.13.0
│ high │ Arbitrary File Overwrite │
│ Package │ tar │
│ Patched in │ >=4.4.2 │
│ Dependency of │ node-sass │
│ Path │ node-sass > node-gyp > tar │
│ More info │ https://nodesecurity.io/advisories/803 │
1 vulnerabilities found - Packages audited: 12330
Severity: 1 High
Done in 2.21s.
This is my result of yarn why tar
$ yarn why tar
yarn why v1.13.0
[1/4] Why do we have the module "tar"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
=> Found "node-pre-gyp#[email protected]"
info This module exists because "@symfony#webpack-encore#webpack-dev-server#chokidar#fsevents#node-pre-gyp" depends on it.
Done in 1.41s.
Is it possible to have sass-loader use a more modern tar version?
The text was updated successfully, but these errors were encountered: