#944: Importmap integrity

Visit on Github.

Opened Apr 15, 2024

こんにちは TAG-さん!

I'm requesting a TAG review of Importmap integrity - enabling subresource integrity checks on ES module imports.

Since modules initiate requests, there is a need for the ability to specify the integrity of dependencies, and not just the top level <script type="module"> integrity which can be supported via traditional means.

For specifiers like import 'pkg' that are controlled by import maps, the problem is that the import map is fully responsible for the resolved module and hence the integrity of the resolved module as well.

Without a mechanism to specify integrity, it is not currently possible to use module dependencies in environments where SRI is required and where those module dependencies are loaded lazily, as integrity metadata cannot be set via the module script tag or link preload tag directly.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: As this is a small addition to the platform which enables significant architectural improvement to JS based deployments, I'd like to ship this rather soon. With that said, no strict deadline.
  • The group where the work on this specification is currently being done: WHATWG
  • The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue):
  • Major unresolved issues with or opposition to this specification: None
  • This work is being funded by: Shopify

TBD:

  • Chrome team support (if needed)

Discussions

2024-05-06

Minutes

Discussion about external maps and hasch chaining. Agreed this seems fine. Close as satisfied.