Change: make malicious zip file checks a synchronous PublishCheck#1721
Change: make malicious zip file checks a synchronous PublishCheck#1721
Conversation
…scanning is enabled and ensure that the flag potentially_malicious is correctly persisted otherwise
autumnfound
left a comment
There was a problem hiding this comment.
suggestion (non-blocking): It might be worth adding a few basic unit tests in for the newly moved zip check. I think the scanService being disabled is a fairly niche edge case for the handler, though having a test there wouldn't hurt either.
…s but rather create it on demand as its cheap, also add a unit test
|
Having a test for the I created #1723 to support some extra fields as right now we just reject publication if any extra field is encountered, which is a bit strict. |
This fixes #1718 .
Currently, malicious zip checks where done asynchronously during publishing, meaning that if a new extension is rejected because of that, the user does not have immediate feedback.
Now if scanning is enabled, the check will be done synchronously and reject the publication and inform the publisher instead of creating an extension version and not activating it.
Furthermore, if scanning is not enabled, the behavior stays the same as before, meaning the malicious zip check is done asynchronously, but the
potentially_maliciousflag will be correctly set now.