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

Does tableExport.min.js include the latest secure version of xlsx? #382

Open
sdespont opened this issue Jan 23, 2025 · 2 comments
Open

Does tableExport.min.js include the latest secure version of xlsx? #382

sdespont opened this issue Jan 23, 2025 · 2 comments

Comments

@sdespont
Copy link

I was wondering if the latest version of tableExport.min.js includes the most recent release of the xlsx library hosted on SheetJS.

I'm asking because versions of xlsx prior to 0.20 contain known vulnerabilities, and I want to ensure that the latest, more secure version is being used.

Thanks in advance for your help!

@hhurz
Copy link
Owner

hhurz commented Jan 23, 2025

tableExport.min.js does not contain any external libraries such as xlsx directly. The code for exporting tables relies on external libraries, such as xlsx, which must be included separately. This means that if you use tableExport, you have to include xlsx manually in your project if you want to use the export function for Excel (XLSX). In this case, you can ensure that you always use the latest and most secure version of xlsx by integrating it yourself.

@sdespont
Copy link
Author

sdespont commented Jan 24, 2025

@hhurz thanks for the answer. I asked the question because yarn audit rise known vulnerabilities for xlsx <0.20 and because this lib no longer uses NPM, but SheetJS the installed version is 0.18.5.

BUT I don't actually use this library, the export I do is a simple XLS and doesn't need this plugin.

Therefore, I don't want this unused library to be automatically installed along with all its own dependencies, which would cause a security violation warning during an audit.

Because as you say this plugin is optional and needs to be installed specifically, wouldn't it be a good idea to move it to the optionalDependencies section of the package.json?

"optionalDependencies": {
  "xlsx": ">=0.16.0"
}

What do you think?

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

2 participants