Since third party extensions can be added any time, it is wiser to define an allowed extension list instead of a deny list (or have the option to define one or the other). This is how lfeditor does it: https://gitlab.sgalinski.de/typo3/lfeditor/-/blob/master/ext_conf_template.txt#L12-16