Skip to content

Security: Implement Automatic Integrity Checks #15

Description

@harlan-zw

To improve the security of using third-party scripts, we're able to compute the integrity of a script at build time and inject it within the <script> tag.

For example, we can do something like this:

useScript({src: 'https://example.com/test.js'})

-->

// without bundlinguseScript({src: 'https://example.com/test.js',integrity: 'sha512-...'})// with bundlinguseScript({src: '/....js',integrity: 'sha512-...'})

This would provide a window between builds that would block potential attackers from modifying the script with malicious code. If a script source has already been attacked when the integrity is computed it wouldn't do anything useful.

@vejja Would be great to have your input on this 🙏

Activity

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions