Semantic-ui: Security alert (hoek package)

Created on 18 May 2018  路  5Comments  路  Source: Semantic-Org/Semantic-UI

After running npm install semantic-ui --save and committing my repo to github, I get the following security alert:

screen shot 2018-05-18 at 11 33 55 am

This is related to the hoek package.

Because the install process does not result in a package.json file, but only a package-lock.json, I am not sure how to fix this locally.

Build Tools

Most helpful comment

@blaytenshi Thanks, but npm audit fix requires package.json, which is not provided when I download the semantic-ui distribution according to the directions. To fix things, I had to:

npm audit fix
npm WARN [email protected] requires a peer of gulp@>=4 but none is installed. You must install peer dependencies yourself.
npm WARN The package merge-stream is included as both a dev and production dependency.

+ [email protected]
updated 1 package in 3.976s
fixed 1 of 14 vulnerabilities in 4208 scanned packages
  4 vulnerabilities required manual review and could not be updated

1 out of 14 doesn't seem too good, so let's try npm audit fix --force:

npm audit fix --force
npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN The package merge-stream is included as both a dev and production dependency.

+ [email protected]
+ [email protected]
added 131 packages from 137 contributors, removed 12 packages, updated 30 packages and moved 5 packages in 17.12s
fixed 9 of 14 vulnerabilities in 4151 scanned packages
  5 vulnerabilities required manual review and could not be updated
  2 package updates for 9 vulns involved breaking changes
  (installed due to `--force` option)

Committing the resulting package-lock.json satisfied GitHub, I am no longer getting security vulnerability alerts.

This seems like a lot of work for each person wanting to create a custom theme in semantic ui. Better that the system developers just fix their package.json?

All 5 comments

Are you using create-react-app? I've run into a bunch of security issues related to libraries being used create-react-app recently.

The best way to resolve them, in my experience, is to run npm audit in console/terminal which will tell you where the vulnerabilities are and if you scroll through the entire output, it will tell you the command to run to update the packages so the vulnerability is patched.

@blaytenshi Thanks, this is helpful. But hopefully the semantic ui maintainers will want to remove the security issue from their code as well.

@philipmjohnson You're not wrong, but as @philrykoff points out in https://github.com/Semantic-Org/Semantic-UI/issues/4987#issuecomment-324867725 ...

"While upgrading [a dependency] certainly makes sense if a newer version is available, as long as [they're not used in your] production environment you are not affected."

My npm audit has 18 vulnerabilities, all dependencies of Semantic-UI's build process. As none are public facing, there's no need for concern. Still, it frustrates me how infrequently dependencies are updated ... there's some remarkably obsolete stuff in Semantic-UI's package.json.

@philipmjohnson If you've updated to the latest npm (i believe 6 and above) you can run the command npm audit fix and it should fix most of it for you.

@blaytenshi Thanks, but npm audit fix requires package.json, which is not provided when I download the semantic-ui distribution according to the directions. To fix things, I had to:

npm audit fix
npm WARN [email protected] requires a peer of gulp@>=4 but none is installed. You must install peer dependencies yourself.
npm WARN The package merge-stream is included as both a dev and production dependency.

+ [email protected]
updated 1 package in 3.976s
fixed 1 of 14 vulnerabilities in 4208 scanned packages
  4 vulnerabilities required manual review and could not be updated

1 out of 14 doesn't seem too good, so let's try npm audit fix --force:

npm audit fix --force
npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN The package merge-stream is included as both a dev and production dependency.

+ [email protected]
+ [email protected]
added 131 packages from 137 contributors, removed 12 packages, updated 30 packages and moved 5 packages in 17.12s
fixed 9 of 14 vulnerabilities in 4151 scanned packages
  5 vulnerabilities required manual review and could not be updated
  2 package updates for 9 vulns involved breaking changes
  (installed due to `--force` option)

Committing the resulting package-lock.json satisfied GitHub, I am no longer getting security vulnerability alerts.

This seems like a lot of work for each person wanting to create a custom theme in semantic ui. Better that the system developers just fix their package.json?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

mixerp picture mixerp  路  3Comments

batata004 picture batata004  路  3Comments

guilhermeblanco picture guilhermeblanco  路  3Comments

ghost picture ghost  路  3Comments