feat: Add icon validation to publish event#1766
Merged
netomi merged 2 commits intoeclipse-openvsx:mainfrom Apr 20, 2026
Merged
Conversation
To lockdown unwanted formats for icons, a check was added at publish time to ensure that files of those formats aren't included in the payload.
netomi
reviewed
Apr 18, 2026
| } | ||
|
|
||
| private void validateIcon(ExtensionProcessor processor, ExtensionVersion extVersion) { | ||
| try (var iconTmpFile = processor.getIcon(extVersion)) { |
Contributor
There was a problem hiding this comment.
an extension might not have an icon defined, so this method might return null
Contributor
There was a problem hiding this comment.
also please follow the indentation style used in the source file you are editing. Currently there are 4 spaces used.
netomi
reviewed
Apr 18, 2026
| } | ||
|
|
||
| private byte[] createExtensionPackage(String name, String version, String license, boolean preRelease, String targetPlatform) throws IOException { | ||
| private byte[] createExtensionPackage(String name, String version, String license, boolean preRelease, String targetPlatform, String iconPath) throws IOException { |
Contributor
There was a problem hiding this comment.
its not clear why this parameter has been added in this test. Is it to make sure that all test extensions have an icon defined as otherwise the tests fail?
…s and adapt unit tests
netomi
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To lockdown unwanted formats for icons, a check was added at publish time to ensure that files of those formats aren't included in the payload.