This module has a 'missing sub resource integrity' vulnerability.

You can see this vulnerability by:
1. Enabling the module
2. The module loads third-party library https://cdn.siteimprove.net/cms/overlay.js
3. When navigating to a page you see the above mentioned library do not contain 'integrity' and 'crossorigin=anonymous' attribute.

Any module library can be modified by hook_library_info_alter() and these attributes can be added. But my gut feeling is we need to add these attributes to site improve.libraries.yml

SRI Hash value can be obtained here - https://report-uri.com/home/sri_hash

Comments

wil2091 created an issue. See original summary.

wil2091’s picture

Added the integrity attribute to the external js https://cdn.siteimprove.net/cms/overlay.js
Please verify the patch.
Here are the screenshots of the view source page & network

page source

network

wil2091’s picture

Assigned: wil2091 » Unassigned
Status: Active » Needs review
beltofte’s picture

Hi @wil2091 ,

Thanks for your patch. I will discuss it with Siteimprove and decided if we should add it or not.

Best regards,
Jens

beltofte’s picture

Assigned: Unassigned » beltofte

  • beltofte committed c793dab on 8.x-1.x authored by wil2091
    Issue #3133771 by wil2091, beltofte: Missing sub resource integrity...
beltofte’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

beltofte’s picture

Status: Closed (fixed) » Active

We will revert this change and remove the SRI hash from the library file. Siteimprove is currently not supporting versioning of their overlay.js file, and this means that every time Siteimprove release an updated version of overlay.js, will browsers immediately block the overlay.js file and we will have to release a new version of the module with an updated hash. We are discussing with Siteimprove to support versioning of their overlay.js file and if/when they support it will we add a SRI hash again.

  • beltofte committed dd768a5 on 8.x-1.x
    Issue #3133771 by wil2091, beltofte: Missing sub resource integrity...
beltofte’s picture

Status: Active » Postponed

Fixed in 8.x-1.7.

bartvig’s picture

Status: Postponed » Closed (won't fix)