risdenk commented on code in PR #794:
URL: https://github.com/apache/knox/pull/794#discussion_r1325017580


##########
build-tools/src/main/resources/build-tools/spotbugs-filter.xml:
##########
@@ -90,4 +90,14 @@ limitations under the License.
     <Class 
name="org.apache.knox.gateway.audit.log4j.correlation.Log4jCorrelationService" 
/>
     <Bug pattern="OBJECT_DESERIALIZATION" />
   </Match>
+
+  <Match>
+    <Class 
name="org.apache.knox.gateway.services.security.impl.ConfigurableEncryptor" />
+    <Bug pattern="DMI_RANDOM_USED_ONLY_ONCE" />

Review Comment:
   I think this is a real finding.
   
   
https://github.com/apache/knox/blob/master/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/ConfigurableEncryptor.java#L106
   
   that random could be created once instead of every time for encrypting bytes.



##########
build-tools/src/main/resources/build-tools/spotbugs-filter.xml:
##########
@@ -90,4 +90,14 @@ limitations under the License.
     <Class 
name="org.apache.knox.gateway.audit.log4j.correlation.Log4jCorrelationService" 
/>
     <Bug pattern="OBJECT_DESERIALIZATION" />
   </Match>
+
+  <Match>
+    <Class 
name="org.apache.knox.gateway.services.security.impl.ConfigurableEncryptor" />
+    <Bug pattern="DMI_RANDOM_USED_ONLY_ONCE" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.knox.gateway.services.registry.impl.DefaultServiceRegistryService"
 />
+    <Bug pattern="DMI_RANDOM_USED_ONLY_ONCE" />

Review Comment:
   I think this is also a real finding - 
https://github.com/apache/knox/blob/master/gateway-server/src/main/java/org/apache/knox/gateway/services/registry/impl/DefaultServiceRegistryService.java#L74



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to