Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add possibility for security SRI/integrity attribute #6132

Open
3 tasks done
danyball opened this issue Jan 30, 2025 · 1 comment
Open
3 tasks done

feat: add possibility for security SRI/integrity attribute #6132

danyball opened this issue Jan 30, 2025 · 1 comment

Comments

@danyball
Copy link

Prerequisites

Describe the Feature Request

If providing stencil component files via a CDN its recommended to load them with an integrity attribute: https://www.w3schools.com/tags/att_script_integrity.asp

This is easily possible for stencil's loader file. But this file loads other scripts without the possibility of adding a integrity hash.

Describe the Use Case

A big design system is providing stencil components via a CDN and consumers wanted to use this security technique.

Describe Preferred Solution

  • consumer just needs to add the SRI "manually" to the loader file request (consumer know the hash)
  • loading of all other files could be extended by the hashes of each file by stencil internal loading logic
  • those hashes could be generated at build time and baked into the loader file (because the browser can trust the value of the loader file)

Describe Alternatives

There are a lot of alternatives. Maybe the consumer can create itself the hashes of loaded files and provide them to the stencil loader.

Related Code

No response

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jan 30, 2025
@christian-bromann
Copy link
Member

@danyball thanks for raising the issue. I think this is a great idea and could simplify the process to deliver components to end users. Any contributions to the compiler would be much appreciated.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants