SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.8.3

Threshold is low

Effort is max

Summary

Classes Bugs Errors Missing Classes
36 29 0 12

Files

Class Bugs
com.app.config.SecurityConfig 1
com.app.controller.AuthController 2
com.app.controller.FileController 4
com.app.controller.HelloController 1
com.app.controller.MessageController 5
com.app.controller.ProductController 7
com.app.dto.auth.UserResponse 1
com.app.exception.ApiError 2
com.app.model.ProductFile 2
com.app.security.AppUserDetails 2
com.app.service.impl.FileServiceImpl 2

com.app.config.SecurityConfig

Bug Category Details Line Priority
new com.app.config.SecurityConfig(ObjectMapper) may expose internal representation by storing an externally mutable object into SecurityConfig.objectMapper MALICIOUS_CODE EI_EXPOSE_REP2 35 Medium

com.app.controller.AuthController

Bug Category Details Line Priority
com.app.controller.AuthController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 59 Low
com.app.controller.AuthController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 50 Low

com.app.controller.FileController

Bug Category Details Line Priority
new com.app.controller.FileController(FileService) may expose internal representation by storing an externally mutable object into FileController.fileService MALICIOUS_CODE EI_EXPOSE_REP2 32 Medium
com.app.controller.FileController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 55 Low
com.app.controller.FileController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 44 Low
com.app.controller.FileController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 38 Low

com.app.controller.HelloController

Bug Category Details Line Priority
com.app.controller.HelloController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 11 Low

com.app.controller.MessageController

Bug Category Details Line Priority
new com.app.controller.MessageController(MessageService) may expose internal representation by storing an externally mutable object into MessageController.messageService MALICIOUS_CODE EI_EXPOSE_REP2 19 Medium
com.app.controller.MessageController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 34 Low
com.app.controller.MessageController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 40 Low
com.app.controller.MessageController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 24 Low
com.app.controller.MessageController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 29 Low

com.app.controller.ProductController

Bug Category Details Line Priority
new com.app.controller.ProductController(ProductService) may expose internal representation by storing an externally mutable object into ProductController.productService MALICIOUS_CODE EI_EXPOSE_REP2 35 Medium
com.app.controller.ProductController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 40 Low
com.app.controller.ProductController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 64 Low
com.app.controller.ProductController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 46 Low
com.app.controller.ProductController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 53 Low
com.app.controller.ProductController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 78 Low
com.app.controller.ProductController is a Spring endpoint (Controller) SECURITY SPRING_ENDPOINT 59 Low

com.app.dto.auth.UserResponse

Bug Category Details Line Priority
Use of non-localized String.toUpperCase() or String.toLowerCase() in com.app.dto.auth.UserResponse.from(UserAccount) I18N DM_CONVERT_CASE 14 Low

com.app.exception.ApiError

Bug Category Details Line Priority
com.app.exception.ApiError.details() may expose internal representation by returning ApiError.details MALICIOUS_CODE EI_EXPOSE_REP 6 Medium
new com.app.exception.ApiError(Instant, int, String, List) may expose internal representation by storing an externally mutable object into ApiError.details MALICIOUS_CODE EI_EXPOSE_REP2 6 Medium

com.app.model.ProductFile

Bug Category Details Line Priority
com.app.model.ProductFile.getProduct() may expose internal representation by returning ProductFile.product MALICIOUS_CODE EI_EXPOSE_REP 63 Medium
new com.app.model.ProductFile(Product, String, String, long) may expose internal representation by storing an externally mutable object into ProductFile.product MALICIOUS_CODE EI_EXPOSE_REP2 47 Medium

com.app.security.AppUserDetails

Bug Category Details Line Priority
Class com.app.security.AppUserDetails defines non-transient non-serializable instance field userAccount BAD_PRACTICE SE_BAD_FIELD Medium
com.app.security.AppUserDetails is Serializable; consider declaring a serialVersionUID BAD_PRACTICE SE_NO_SERIALVERSIONID 11 Low

com.app.service.impl.FileServiceImpl

Bug Category Details Line Priority
Exception thrown in class com.app.service.impl.FileServiceImpl at new com.app.service.impl.FileServiceImpl(ProductRepository, ProductFileRepository, String, DataSize, List) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 56 Medium
Improper handling of Unicode transformations such as case mapping and normalization. SECURITY IMPROPER_UNICODE 153 Low