fix(spotbugs): update filter justifications and seal finalizer mitigation on TsaClient

This commit is contained in:
Claudecio Martins
2026-10-20 15:40:41 -03:00
parent cf7ac8c51c
commit 71428cdaad
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -78,6 +78,7 @@
<Class name="br.com.cybercore.signer.core.crypto.SigningService"/> <Class name="br.com.cybercore.signer.core.crypto.SigningService"/>
<Class name="br.com.cybercore.signer.core.protocol.CcspServer"/> <Class name="br.com.cybercore.signer.core.protocol.CcspServer"/>
<Class name="br.com.cybercore.signer.core.provider.Pkcs12CertificateProvider"/> <Class name="br.com.cybercore.signer.core.provider.Pkcs12CertificateProvider"/>
<Class name="br.com.cybercore.signer.core.crypto.tsa.TsaClient"/>
<Class name="br.com.cybercore.signer.ui.tray.SystemTrayManager"/> <Class name="br.com.cybercore.signer.ui.tray.SystemTrayManager"/>
<Package name="~br\.com\.cybercore\.signer\.ui\.view.*"/> <Package name="~br\.com\.cybercore\.signer\.ui\.view.*"/>
</Or> </Or>
@@ -161,4 +162,13 @@
<Class name="br.com.cybercore.signer.app.CyberCoreSignerApplication"/> <Class name="br.com.cybercore.signer.app.CyberCoreSignerApplication"/>
</Match> </Match>
<!--
11. Carregamento de driver PKCS#11 (middleware de fabricante de hardware criptográfico)
apontando para bibliotecas dinâmicas do sistema operacional (.dll no Windows ou .so no Linux).
-->
<Match>
<Bug pattern="PATH_TRAVERSAL_IN"/>
<Class name="br.com.cybercore.signer.core.provider.Pkcs11CertificateProvider"/>
</Match>
</FindBugsFilter> </FindBugsFilter>
@@ -29,7 +29,7 @@ import java.util.Objects;
* Cliente resiliente de Carimbo do Tempo (TSA RFC 3161) com suporte a retentativas com backoff, * Cliente resiliente de Carimbo do Tempo (TSA RFC 3161) com suporte a retentativas com backoff,
* timeout configurável e fallback automático para servidores secundários. * timeout configurável e fallback automático para servidores secundários.
*/ */
public class TsaClient { public final class TsaClient {
private static final Logger logger = LoggerFactory.getLogger(TsaClient.class); private static final Logger logger = LoggerFactory.getLogger(TsaClient.class);
private static final SecureRandom SECURE_RANDOM = new SecureRandom(); private static final SecureRandom SECURE_RANDOM = new SecureRandom();