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

Security vuln. in serialize-javascript via rollup-plugin-terser #2505

Closed
nomaed opened this issue Dec 15, 2019 · 2 comments
Closed

Security vuln. in serialize-javascript via rollup-plugin-terser #2505

nomaed opened this issue Dec 15, 2019 · 2 comments

Comments

@nomaed
Copy link

nomaed commented Dec 15, 2019

NPM audit report:

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Cross-Site Scripting                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ serialize-javascript                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=2.1.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ jspm                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ jspm > rollup-plugin-terser > serialize-javascript           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1426                            │
└───────────────┴──────────────────────────────────────────────────────────────┘

Seems like rollup-plugin-terser already patched in master branch, but I don't believe that a version has been released yet:
TrySound/rollup-plugin-terser#57

@nomaed
Copy link
Author

nomaed commented Dec 15, 2019

rollup-plugin-terser@5.1.3 was released 3 days ago:
https://www.npmjs.com/package/rollup-plugin-terser

nomaed added a commit to nomaed/jspm-cli that referenced this issue Dec 27, 2019
The current rollup-plugin-terser depends on serialize-javascript with a
security vulnerability. This has been patched in version
rollup-plugin-terser v5.1.3

Resolve jspm#2505
nomaed added a commit to nomaed/jspm-cli that referenced this issue Dec 27, 2019
The current rollup-plugin-terser depends on serialize-javascript with a
security vulnerability. This has been patched in version
rollup-plugin-terser v5.1.3

Resolve jspm#2505
nomaed added a commit to nomaed/jspm-cli that referenced this issue Dec 27, 2019
The current rollup-plugin-terser depends on serialize-javascript with a
security vulnerability. This has been patched in version
rollup-plugin-terser v5.1.3

Resolve jspm#2505
nomaed added a commit to nomaed/jspm-cli that referenced this issue Dec 28, 2019
The current rollup-plugin-terser depends on serialize-javascript with a
security vulnerability. This has been patched in version
rollup-plugin-terser v5.1.3

Resolve jspm#2505
@nomaed
Copy link
Author

nomaed commented Dec 28, 2019

I created a PR in which the version of the plugin is updated: #2507
It is a new major release for the plugin, but it looks like everything builds and tests are passing too, so I hope this is fine.

While doing that, I noticed that typescript wouldn't build the package due to 3 (small) errors, none of them are of any functional significance.

I also noticed that the entire lib directory is in .gitignore but is also committed to the repository, so while these files are generated on every build, git shows a lot of noise because it sees these are modified files. I created a new PR that removes these files from the repo, and adds tsc build before running mocka for tests, because tests rely on built artifact. IMO it will also make sure that when running automated tests in travis, it will ensure that the sources are built properly. See #2508

I don't know if this has any other affects, I assume that perhaps a pre-publish is also needed for npm now.

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

Successfully merging a pull request may close this issue.

2 participants