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

Update vulnerable wrap-ansi dependency #310

Closed
Sindhura3 opened this issue Nov 16, 2021 · 9 comments · Fixed by #255 or #321
Closed

Update vulnerable wrap-ansi dependency #310

Sindhura3 opened this issue Nov 16, 2021 · 9 comments · Fixed by #255 or #321

Comments

@Sindhura3
Copy link

Sindhura3 commented Nov 16, 2021

One of the packages: wrap-ansi (3.0.0 - 6.1.0) depends on vulnerable versions of string-width and strip-ansi. Please merge PR, update dev depdencies, and do a release.

@radomirbosak
Copy link

Also this one: #293

@shavo007
Copy link

hi all +1 on this. its failing our security scanning currently due to this issue. thanks.

@radomirbosak
Copy link

Unfortunately, this wasn't resolved. Only @types/wrap-ansi was upgraded, not wrap-ansi itself.

@RodEsp
Copy link
Contributor

RodEsp commented Nov 24, 2021

Thanks @radomirbosak, you're totally right.
The PR for that is #293, as you said, but our automated tests aren't passing so it'll require a little more time to look into it.

@RodEsp RodEsp reopened this Nov 24, 2021
@Swaagie
Copy link

Swaagie commented Nov 25, 2021

@RodEsp correct me if wrong, but it seems that #293 failed on engine requirements (e.g. minimum node@12) and both GHA workflows as well as circle CI got updated more recently to only run against 12, 14 and latest. Might just take a simple action rerun to get tests to pass.

@RodEsp
Copy link
Contributor

RodEsp commented Nov 25, 2021

Hey @Swaagie, you're right that the GitHub actions are failing due to incorrect versions of node but the CircleCI tests have already been updated and are giving a different error.

Are you able to see the CircleCI job logs?

@Swaagie
Copy link

Swaagie commented Nov 26, 2021

Yea I noticed that failure as well. I suspect this requires an update to the .mocharc.json config, see mochajs/mocha#4726. These options are not well documented yet. I'm happy to make an independent PR that fixes this.

@Swaagie
Copy link

Swaagie commented Nov 26, 2021

Actually the real issue here is that wrap-ansi>8 moved to only expose ESM. If this plugins aims to consume this major version it should change require('wrap-ansi') to import ... from 'wrap-ansi'. That change likely has larger implications though.

According to the vulnerability audit using ansi-regex>=5.0.1 should be good. Going to make a PR to use wrap-ansi@6.2 as that depends on strip-ansi@6 which use the designated version of ansi-regex: https://github.com/chalk/strip-ansi/releases/tag/v6.0.1

@Swaagie
Copy link

Swaagie commented Nov 26, 2021

See #321

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