Skip to content

Subresource Integrity in production builds #946

Closed

Description

@julien-f

Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched file must match.

<script
  src="https://example.com/example-framework.js"
  integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
  crossorigin="anonymous"
></script>

It should probably be implemented similarly to the hash generation for cache busting.

Source: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

Activity

  1. changed the title [-]Subresource Integrity in productionbuild[/-] [+]Subresource Integrity in production builds[/+] on Oct 23, 2016
  2. gaearon commented on Oct 23, 2016

    @gaearon
    Contributor

    Looks cool. We could do this if somebody contributes it to HtmlWebpackPlugin.

  3. julien-f commented on Oct 23, 2016

    @julien-f
    Author
  4. gaearon commented on Oct 23, 2016

    @gaearon
    Contributor

    We'd use this if it was generated in inject: true mode.

  5. gaearon commented on Nov 20, 2016

    @gaearon
    Contributor

    Closing because while it sounds "nice" it doesn't seem like a must-have. If you contribute this to work with HtmlWebpackPlugin's inject mode we'd be happy to enable it.

  6. XVincentX commented on Dec 6, 2016

    @XVincentX

    According to jantimon/html-webpack-plugin#491 - it's already built in.

  7. gaearon commented on Dec 6, 2016

    @gaearon
    Contributor

    Happy to take a PR implementing this!

  8. reopened this on Dec 6, 2016
  9. XVincentX commented on Dec 6, 2016

    @XVincentX

    @gaearon Cool, it should not be that hard. Let's see if I can come up with something.

  10. XVincentX commented on Dec 6, 2016

    @XVincentX

    @gaearon I kicked off #1176

  11. gaearon commented on Dec 6, 2016

    @gaearon
    Contributor

    Fixed via #1176.

  12. locked and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions