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

Implement service worker modules #499

Closed
ghazale-hosseinabadi opened this issue Mar 11, 2021 · 9 comments
Closed

Implement service worker modules #499

ghazale-hosseinabadi opened this issue Mar 11, 2021 · 9 comments
Labels
venue: W3C Specifications in W3C Working Groups

Comments

@ghazale-hosseinabadi
Copy link

Request for Mozilla Position on an Emerging Web Specification

@annevk
Copy link
Contributor

annevk commented Mar 12, 2021

This is worth prototyping. We'll probably not update the dashboard for this as it's somewhat minor and unless there are other comments I would expect to close this as such next week.

@annevk annevk added the venue: W3C Specifications in W3C Working Groups label Mar 12, 2021
@ghost
Copy link

ghost commented Apr 5, 2021

I think that before we should implement the ability for the service worker to run any number of arbitrary complex scripts, we should think about a security model protecting the users of the application.

Because, imagine that deep down within the dependencies of a service worker module, we have a hidden backdoor that is programmed to run after the service worker completed the installation of the application. The backdoor may be programmed to run one hour after the installation, or two days or even three weeks after the installation, silently waiting for the users to bring their own private documents in places that are now accessible to the application and thus to the spyware/malware that could be deployed from the backdoor.

We have to think on ways able to mitigate this scenario.

@annevk
Copy link
Contributor

annevk commented Apr 12, 2021

@abflow I don't see how that's related. Service worker modules don't change the security properties of service workers. I'm closing this as per earlier comment.

Thanks for asking @ghazale-hosseinabadi!

@annevk annevk closed this as completed Apr 12, 2021
@ghost
Copy link

ghost commented Apr 12, 2021

Service worker modules don't change the security properties of service workers.

What security properties ?

@ghost
Copy link

ghost commented Apr 12, 2021

"Potentially Trustworthy" is not really what can be described as "secure"...

https://html.spec.whatwg.org/multipage/webappapis.html#secure-context

@ghost
Copy link

ghost commented Apr 12, 2021

Here a related proposition: #509

@mangelozzi
Copy link

mangelozzi commented Jan 22, 2022

I think that before we should implement the ability for the service worker to run any number of arbitrary complex scripts, we should think about a security model protecting the users of the application.

Because, imagine that deep down within the dependencies of a service worker module, we have a hidden backdoor that is programmed to run after the service worker completed the installation of the application. The backdoor may be programmed to run one hour after the installation, or two days or even three weeks after the installation, silently waiting for the users to bring their own private documents in places that are now accessible to the application and thus to the spyware/malware that could be deployed from the backdoor.

We have to think on ways able to mitigate this scenario.

Could not the same argument be used against any module imports? The concept of libraries is fundamental to programming.

Many people require to use a library in their service worker to aid using IndexedDB. At the moment one must inline modules to use them, is that not any less secure? If you have a dependency, you are going to add it one way or another, its just about convience of having a proper module/library system, or hacking files together in bundles because of no module support.

@AlbertMarashi
Copy link

Bump... Need service workers to be able to support import statements - critical for service worker development using SvelteKit.

Currently chrome supports this, so it would be nice to see it in Firefox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
venue: W3C Specifications in W3C Working Groups
Projects
None yet
Development

No branches or pull requests

5 participants