Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

build(npm): improve state of npm audit and vulnerabilities #11343

Closed
Splaktar opened this issue Jun 27, 2018 · 7 comments · Fixed by #11360
Closed

build(npm): improve state of npm audit and vulnerabilities #11343

Splaktar opened this issue Jun 27, 2018 · 7 comments · Fixed by #11360
Assignees
Labels
has: Pull Request A PR has been created to address this issue P2: required Issues that must be fixed. resolution: fixed type: build
Milestone

Comments

@Splaktar
Copy link
Member

Bug, enhancement request, or proposal:

Security audit compliance

Steps to reproduce the issue:

Detailed Reproduction Steps:

  1. npm audit

What is the expected behavior?

There should be a minimal, near zero, amount of known vulnerabilities in the libraries used by AngularJS Material, even for builds.

What is the current behavior?

found 140 vulnerabilities (63 low, 44 moderate, 31 high, 2 critical) in 6293 scanned packages
run npm audit fix to fix 47 of them.
86 vulnerabilities require semver-major dependency updates.
7 vulnerabilities require manual review. See the full report for details.

What is the use-case or motivation for changing an existing behavior?

Security audit compliance

Which versions of AngularJS, Material, OS, and browsers are affected?

  • AngularJS Material: 1.1.9

Is there anything else we should know? Stack Traces, Screenshots, etc.

@Splaktar Splaktar added type: build P2: required Issues that must be fixed. labels Jun 27, 2018
@Splaktar Splaktar added this to the 1.1.11 milestone Jun 27, 2018
@Splaktar Splaktar self-assigned this Jun 27, 2018
@Splaktar
Copy link
Member Author

gulp-sass is one of the big issues atm. It's tracked separately in #11270.

@Splaktar
Copy link
Member Author

Opened avevlad/gulp-connect#256.

@Splaktar
Copy link
Member Author

Splaktar commented Jun 27, 2018

Looked into upgrading to Gulp 4.0.0, but there are major breaking changes that will require some significant effort to resolve. They want you to use named functions now instead of named tasks from the task registry. This means that our process for registering all tasks from files at the start will need some changes. Also the way dependencies is handled is totally different, moving from a list of task string names to a new gulp.series and gulp.parallel syntax.

By not upgrading to Gulp 4.0.0, we keep the following vulnerabilities

  • +4 High
  • +1 Low

This post is fairly helpful on the more straightforward parts of the migration.

@Splaktar
Copy link
Member Author

Splaktar commented Jun 27, 2018

Looked into upgrading Karma to 2.0.4 but that gives about 150 test failures due to Error: 'afterEach' should only be used in 'describe' function. It looks like we must be using that in some it blocks.

By not upgrading to Karma 2.0.4, we keep the following vulnerabilities

  • +3 High
  • -13 Moderate
  • +8 Low

Splaktar added a commit to DevIntent/material that referenced this issue Jun 27, 2018
Splaktar added a commit to DevIntent/material that referenced this issue Jun 27, 2018
@Splaktar
Copy link
Member Author

I got down to around found 37 vulnerabilities (17 low, 10 moderate, 10 high) but while I could run the docs site in dev mode, I was still seeing 150-180 test failures. Will investigate more later...

@Splaktar
Copy link
Member Author

Splaktar commented Jul 5, 2018

OK, I've got the tests passing and the warnings down to found 32 vulnerabilities (17 low, 5 moderate, 10 high). Note that this means that all critical warnings are resolved.

Splaktar added a commit that referenced this issue Jul 5, 2018
@Splaktar Splaktar added the has: Pull Request A PR has been created to address this issue label Jul 5, 2018
mmalerba pushed a commit that referenced this issue Jul 9, 2018
Splaktar added a commit that referenced this issue Jul 31, 2018
Splaktar added a commit that referenced this issue Aug 2, 2018
@Splaktar
Copy link
Member Author

PR #11527 opened to update gulp-connect to the latest version now that avevlad/gulp-connect#256 is fixed.

There's a somewhat related gulp-connect issue that was opened for the event-stream vulnerability: avevlad/gulp-connect#259

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue P2: required Issues that must be fixed. resolution: fixed type: build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant