Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add option to skip external resources #261

Closed
spaceemotion opened this issue Jan 20, 2022 · 4 comments
Closed

Add option to skip external resources #261

spaceemotion opened this issue Jan 20, 2022 · 4 comments

Comments

@spaceemotion
Copy link

Since I am not updating my application that frequently (but external sources might), I would like to only run this plugin on bundled assets.

It seems like only the following case needs to be skipped:
https://github.com/JonasKruckenberg/rollup-plugin-sri/blob/master/index.ts#L84-L85

If you don't have the time right now, I can try to make a PR on my own.

@JonasKruckenberg
Copy link
Owner

Right, the same issue currently plagues the tests 😅

I have a bit of a problem with adding an option to ignore external resources: Technically every change to resources should be vetted to make sure it didn't change in unexpected ways.
So adding an option to ignore this compromises security.

I totally understand that it's a usability issue though, so 👍🏻 from me as long as the dangers are clearly communicated.

So if you have time to make a quick PR that would be much appreciated!

@reinerBa
Copy link

reinerBa commented Feb 26, 2022

I created a pull request #280 to add an attribute in script tags to ignore them.

~Soll ich die readme direkt updaten oder wird die aus quelldateien generiert?

@reinerBa
Copy link

Instead of setting a nointegrity attribute in the script tag, it would be possible to define the urls to exclude in the plugin options and continue if the url of an element matches. But that make the config harder. Imao nothing speaks against setting an attribute in the script tag as every enduser can see that other scripts have integrity attributes.

@JonasKruckenberg
Copy link
Owner

I'm very sorry I never followed up on this issue, I have not had the time or necessity to update this plugin and have to decided to archive it in 2 weeks time (unless someone volunteers to maintain it). See #393 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants