Skip to content
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

Fix the vulnerability caused by swagger-ui #254

Closed
1 of 2 tasks
jannyHou opened this issue Jan 30, 2019 · 5 comments
Closed
1 of 2 tasks

Fix the vulnerability caused by swagger-ui #254

jannyHou opened this issue Jan 30, 2019 · 5 comments
Assignees

Comments

@jannyHou
Copy link
Contributor

jannyHou commented Jan 30, 2019

Description

See PR #253, the vulnerability report requires an upgrade from [email protected] to [email protected].

There is breaking change in [email protected] to support OpenAPI 3.0.0. We need to

  • Figure out what's the effort to upgrade dependency swagger-ui from 2 to 3.
  • If the effort is reasonable then do it.
@bajtos
Copy link
Member

bajtos commented Feb 4, 2019

Cross-posting #250 (comment)

Upgrading to swagger-ui@3 is a lot of effort. See #209 for the previous attempt made by @STRML .

The following issue is the biggest blocker:

loopback-swagger need to produce auth metadata - see strongloop/loopback-swagger#65

The pull request also says:

The npm package no longer exports a bundle. I'm not sure if this is intentional. For this reason, I've added a dev-only script to copy from github releases.

I think this is no longer relevant, we are successfully using https://www.npmjs.com/package/swagger-ui-dist in LB4.

@nabdelgadir
Copy link
Contributor

nabdelgadir commented Feb 7, 2019

Proposed by @bajtos:

To fix the vulnerability from swagger-api/swagger-ui#3847:

@jannyHou jannyHou mentioned this issue Feb 7, 2019
2 tasks
@nabdelgadir nabdelgadir self-assigned this Feb 19, 2019
@nabdelgadir
Copy link
Contributor

nabdelgadir commented Feb 25, 2019

It seems like the files where the vulnerability exists in swagger-ui@3 don't exist on swagger-ui@2, so there's no way to backport the patch (also the issue's title, XSS Vulnerability with Swagger UI v3, mentions it's for v3). Since the effort to upgrade the dependency was agreed to be too much, should we close the issue? @strongloop/loopback-maintainers

Edit: if there are no objections, I'll close the issue but we can reopen it if needed.

@nabdelgadir
Copy link
Contributor

I was able to reproduce the issue on a LoopBack 3 application using swagger-ui@2, so I'm reopening this issue.

@nabdelgadir nabdelgadir reopened this Mar 4, 2019
@nabdelgadir nabdelgadir removed this from the February 2019 milestone milestone Mar 4, 2019
@nabdelgadir
Copy link
Contributor

Closing this issue as no vulnerabilities are reported when creating a new LoopBack 3 app or when doing npm install on this repo where [email protected] is a dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants