Repository navigation
fix!: Remove url: import feature - #2456
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
url: import feature.url: import feature.
|
This needs to target the |
|
I think it shouldn't be There's also |
bb5a6fd to
13508fe
Compare
I'd probably go with |
url: import feature.url: import feature
|
Failing tests are from the |
|
Thanks for helping make WXT better! |
Co-authored-by: Aaron <[email protected]>
|
Hi! This is a breaking change for my use case. Why can't we just add an integrity sha and fail loudly if it changes? If its OK I will revert this PR and add an integrity check, @aklinker1? |
Reverts wxt-dev#2456. URL imports work again, but every import must now pin an integrity hash — a bare `url:` import is a build error with no opt-out. import 'url#sha256-kmHvs0B+OpCW5GVHUNjv9rOmY0IvSIRcf7zGUDTDQM8=:https://code.jquery.com/jquery-3.7.1.slim.min.js'; sha256/384/512 are supported, in base64 (the SRI format CDNs publish) or hex. This addresses the supply chain risk from wxt-dev#2229 and wxt-dev#2262: a compromised CDN can no longer put code into a build, since content that fails verification is never bundled or cached. - Unverified downloads are never written to the cache - Cached content is verified on read, so a poisoned cache can't slip through - A tampered download falls back to a verified cache entry when one exists - Errors print expected vs received hashes, in the encoding that was pinned - A missing hash prints the exact import line to paste Implements the checksum request from wxt-dev#1924.
Reverts wxt-dev#2456. URL imports work again, but every import must now pin an integrity hash. A bare `url:` import is a build error with no opt-out. import 'url#sha256-kmHvs0B+OpCW5GVHUNjv9rOmY0IvSIRcf7zGUDTDQM8=:https://code.jquery.com/jquery-3.7.1.slim.min.js'; sha256/384/512 are supported, in base64 (the SRI format CDNs publish) or hex. This addresses the supply chain risk from wxt-dev#2229 and wxt-dev#2262: a compromised CDN can no longer put code into a build, since content that fails verification is never bundled or cached. - Unverified downloads are never written to the cache - Cached content is verified on read, so a poisoned cache can't slip through - A tampered download falls back to a verified cache entry when one exists - Errors print expected vs received hashes, in the encoding that was pinned - A missing hash prints the exact import line to paste Implements the checksum request from wxt-dev#1924.
|
@aeharding I know, that step, can be frustrating. That's vulnerable thing, which need to be carefully reviewed and tested, and nobody from current maintainers, don't want to take that responsibility, especially directly before v1. |
|
@aeharding There's also problem with tests, sometimes it falls(on Windows) and i don't know why, and i don't have enough time now, to investigate it. |
|
@PatrykKuniczak Can you point me at a test failure? Id be happy to take a look. I just opened #2514 with a proposal to mandate integrity. Let me know what you think. |
|
@aeharding It have been happening randomly for time to time, i don't know what's the clue. But if you want to have #2514, you need to figure it out, because as i've mentioned we don't have enough energy and @aklinker1 merging very rary. |
|
@PatrykKuniczak I'm happy to help, I'll try to root cause that one, ty! |
|
@aeharding Wait cowboy, wait for @aklinker1 approval. Are you maybe want to be a part of our team in future and develop with us? |
Co-authored-by: Aaron <[email protected]>
Overview
Since there was the risk of supply chain attack it was better to remove this feature.
Manual Testing
Related Issue
This PR closes #2262