Scaffolding: Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.2.3 ships vulnerable version of jQuery

Created on 29 May 2019  路  13Comments  路  Source: dotnet/Scaffolding

Steps to reproduce:

  1. Use Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.2.3 in a project covered by Azure Component Governance

Expected behavior:

Not have an alert from Component Governance

Actual behavior:

Receive alert as following:

jQuery before 3.4.0, as used in Drupal, Backdrop CMS, and other products, mishandles jQuery.extend(true, {}, ...) because of Object.prototype pollution. If an unsanitized source object contained an enumerable proto property, it could extend the native Object.prototype.

The vulnerability could be tracked down to Templates\Identity\wwwroot\lib\jquery\dist

bug 3 - Done

Most helpful comment

I updated bootstrap 3 and 4 since both seemed to be using jquery 3.3.1

All 13 comments

@vijayrkn @danroth27

@mkArtakMSFT

@vijayrkn @danroth27 @mkArtakMSFT @HaoK - To fix this, we'll need to update the scaffolded content under wwwroot/ for identity scaffolding. I think we'd want to stay in sync with other identity content providers - you all would know more about the content than me.

We actually go through a bunch of dependency updates at the moment. @ryanbrandenburg is the jQuery dependency being updated too?

@HaoK are you handling the Identity UI updates?

Sure but I haven't done this before, are we just updating the scaffolded files to jquery 3.4?

That should be all that's necessary - just the bootstrap3 files under the wwwroot dir, here:
https://github.com/aspnet/Scaffolding/tree/master/src/VS.Web.CG.Mvc/Templates/Identity/Bootstrap3/wwwroot
If the list of files to serve up changes, corresponding changes will need to be made in the config file here:
https://github.com/aspnet/Scaffolding/blob/master/src/VS.Web.CG.Mvc/Identity/bootstrap3_identitygeneratorfilesconfig.json
But if the file list remains the same, no changes will need to be made there.

I updated bootstrap 3 and 4 since both seemed to be using jquery 3.3.1

Merged

@HaoK - Which branch was this merged? Is this a 3.0 change?

It was merged back in Jun into master https://github.com/aspnet/Scaffolding/pull/1011

Thanks!

@HaoK When is the next release going to be? The one on /releases is still from Feb.

Was this page helpful?
0 / 5 - 0 ratings