Skip to content

Add qodana CI checks #1

Add qodana CI checks

Add qodana CI checks #1

Triggered via pull request December 2, 2024 11:48
Status Success
Total duration 4m 34s
Artifacts

qodana_code_quality.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

2 errors, 92 warnings, and 7 notices
Vulnerable declared dependency: pom.xml#L25
Provides transitive vulnerable dependency maven:org.springframework.security:spring-security-web:6.2.3 * [GHSA-c4q5-6c82-3qpw](https://osv.dev/vulnerability/GHSA-c4q5-6c82-3qpw) 9.1 Spring Security vulnerable to Authorization Bypass of Static Resources in WebFlux Applications Results powered by [OSV](https://osv.dev/)
Redundant 'Collection' operation: src/main/java/ovh/homecitadel/uni/techbazar/Service/CouponService.java#L130
Removal by index can be replaced with removal by object
'size() == 0' can be replaced with 'isEmpty()': src/main/java/ovh/homecitadel/uni/techbazar/Service/Auction/AuctionService.java#L142
`bidEntity.getAuctionBids().size() > 0` can be replaced with '!bidEntity.getAuctionBids().isEmpty()'
'size() == 0' can be replaced with 'isEmpty()': src/main/java/ovh/homecitadel/uni/techbazar/Service/MongoDB/CartService.java#L54
`tmpCoupons.size() > 0` can be replaced with '!tmpCoupons.isEmpty()'
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Security/SecurityConfig.java#L22
Unused import `import java.lang.reflect.Array;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Controller/CartController.java#L4
Unused import `import jakarta.ws.rs.Path;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/DailyOfferService.java#L22
Unused import `import java.util.stream.Collector;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Entity/User/MongoDB/CartEntity.java#L7
Unused import `import ovh.homecitadel.uni.techbazar.Entity.CouponEntity;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/OrderStatusEnum.java#L3
Unused import `import com.fasterxml.jackson.annotation.JsonProperty;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Controller/CartController.java#L13
Unused import `import ovh.homecitadel.uni.techbazar.Helper.Model.Cart.ProductInCart;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Controller/CouponController.java#L21
Unused import `import java.util.Collection;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/Model/Auction/AuctionRequest.java#L5
Unused import `import org.springframework.cglib.core.Local;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/Product/ProductService.java#L12
Unused import `import ovh.homecitadel.uni.techbazar.Helper.Model.ResponseModel;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/Product/ProductModelService.java#L11
Unused import `import ovh.homecitadel.uni.techbazar.Helper.UnifiedServiceAccess;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Controller/DailyOfferController.java#L6
Unused import `import org.keycloak.authorization.client.util.Http;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/Model/OrderListModel.java#L7
Unused import `import ovh.homecitadel.uni.techbazar.Entity.User.UserAddressEntity;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Entity/Order/MongoDB/StoreOrderEntity.java#L12
Unused import `import ovh.homecitadel.uni.techbazar.Helper.Model.ProductInPurchase;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Controller/UserController.java#L5
Unused import `import org.apache.coyote.Response;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/Product/ProductService.java#L3
Unused import `import org.springframework.http.HttpStatus;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/DailyOfferService.java#L18
Unused import `import java.time.format.DateTimeFormatter;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Controller/CartController.java#L9
Unused import `import org.springframework.transaction.annotation.Transactional;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/Model/CouponRequest.java#L6
Unused import `import ovh.homecitadel.uni.techbazar.Entity.Product.ProductCategoryEntity;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/Model/DailyOfferRequest.java#L9
Unused import `import java.time.LocalDateTime;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/NotificationService.java#L10
Unused import `import ovh.homecitadel.uni.techbazar.Helper.Model.User.User;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/DailyOfferService.java#L17
Unused import `import java.time.LocalDateTime;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Entity/Order/MongoDB/OrderDetailsEntity.java#L11
Unused import `import ovh.homecitadel.uni.techbazar.Helper.Model.ProductInPurchase;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Entity/DailyOfferEntity.java#L3
Unused import `import com.fasterxml.jackson.annotation.JsonIgnore;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Entity/User/MongoDB/CartEntity.java#L4
Unused import `import org.springframework.cglib.core.Local;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/Product/ProductReviewService.java#L13
Unused import `import javax.swing.text.html.Option;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Entity/Product/ProductReviewEntity.java#L6
Unused import `import org.hibernate.annotations.Type;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/UnifiedServiceAccess.java#L8
Unused import `import ovh.homecitadel.uni.techbazar.Repository.Product.ProductCategoryRepository;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/Product/ProductService.java#L13
Unused import `import ovh.homecitadel.uni.techbazar.Helper.UnifiedServiceAccess;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Service/Product/ProductService.java#L8
Unused import `import ovh.homecitadel.uni.techbazar.Entity.Product.ProductModelEntity;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/UnifiedServiceAccess.java#L6
Unused import `import ovh.homecitadel.uni.techbazar.Entity.Product.ProductModelEntity;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/Helpers.java#L3
Unused import `import org.keycloak.admin.client.Keycloak;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Entity/DailyOfferEntity.java#L10
Unused import `import java.time.LocalDateTime;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/Helpers.java#L4
Unused import `import ovh.homecitadel.uni.techbazar.Security.KeycloakSecurityUtil;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Controller/CouponController.java#L5
Unused import `import org.apache.coyote.Response;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Helper/Model/Request/NewProductRequest.java#L5
Unused import `import ovh.homecitadel.uni.techbazar.Entity.Product.ProductModelEntity;`
Unused import: src/main/java/ovh/homecitadel/uni/techbazar/Repository/DailyOfferRepository.java#L10
Unused import `import java.time.LocalDateTime;`
Unused assignment: src/main/java/ovh/homecitadel/uni/techbazar/Controller/UserController.java#L260
The value `"Added"` assigned to `message` is never used
Unused assignment: src/main/java/ovh/homecitadel/uni/techbazar/Controller/UserController.java#L287
The value `e.getMessage()` assigned to `reason` is never used
Unused assignment: src/main/java/ovh/homecitadel/uni/techbazar/Controller/UserController.java#L236
The value `e.getMessage()` assigned to `reason` is never used
Unused assignment: src/main/java/ovh/homecitadel/uni/techbazar/Controller/UserController.java#L285
The value `"Removed"` assigned to `message` is never used
Unused assignment: src/main/java/ovh/homecitadel/uni/techbazar/Controller/UserController.java#L145
The value `e.getMessage()` assigned to `reason` is never used
Unused assignment: src/main/java/ovh/homecitadel/uni/techbazar/Controller/UserController.java#L143
The value `"Address Created."` assigned to `message` is never used
Unused assignment: src/main/java/ovh/homecitadel/uni/techbazar/Controller/UserController.java#L262
The value `e.getMessage()` assigned to `reason` is never used
Unused assignment: src/main/java/ovh/homecitadel/uni/techbazar/Controller/UserController.java#L234
The value `"wishlist"` assigned to `message` is never used
Vulnerable declared dependency: pom.xml#L25
Provides transitive vulnerable dependency maven:com.nimbusds:nimbus-jose-jwt:9.24.4 * [GHSA-gvpg-vgmx-xg6w](https://osv.dev/vulnerability/GHSA-gvpg-vgmx-xg6w) 7.5 Denial of Service in Connect2id Nimbus JOSE+JWT Results powered by [OSV](https://osv.dev/)
Vulnerable declared dependency: pom.xml#L42
Provides transitive vulnerable dependency maven:commons-io:commons-io:2.11.0 * [GHSA-78wr-2p64-hpwj](https://osv.dev/vulnerability/GHSA-78wr-2p64-hpwj) 7.5 Apache Commons IO: Possible denial of service attack on untrusted input to XmlStreamReader Results powered by [OSV](https://osv.dev/)
Vulnerable declared dependency: pom.xml#L61
Provides transitive vulnerable dependency maven:org.apache.tomcat.embed:tomcat-embed-core:10.1.19 * [GHSA-wm9w-rjj3-j356](https://osv.dev/vulnerability/GHSA-wm9w-rjj3-j356) 7.5 Apache Tomcat - Denial of Service Results powered by [OSV](https://osv.dev/)
Vulnerable declared dependency: pom.xml#L25
Provides transitive vulnerable dependency maven:org.springframework:spring-web:6.1.5 * [GHSA-2wrp-6fg6-hmc5](https://osv.dev/vulnerability/GHSA-2wrp-6fg6-hmc5) 8.1 Spring Framework URL Parsing with Host Validation * [GHSA-2rmj-mq67-h97g](https://osv.dev/vulnerability/GHSA-2rmj-mq67-h97g) 5.3 Spring Framework DoS via conditional HTTP request Results powered by [OSV](https://osv.dev/)
Vulnerable declared dependency: pom.xml#L47
Provides transitive vulnerable dependency maven:org.springframework:spring-webmvc:6.1.5 * [GHSA-cx7f-g6mp-7hqm](https://osv.dev/vulnerability/GHSA-cx7f-g6mp-7hqm) 7.5 Path traversal vulnerability in functional web frameworks Results powered by [OSV](https://osv.dev/)
Method can be extracted: src/main/java/ovh/homecitadel/uni/techbazar/Service/OrderService.java#L218
It's possible to extract method returning 'olm' from a long surrounding method
Method can be extracted: src/main/java/ovh/homecitadel/uni/techbazar/Service/Auction/AuctionService.java#L72
It's possible to extract method returning 'auction' from a long surrounding method
Method can be extracted: src/main/java/ovh/homecitadel/uni/techbazar/Service/OrderService.java#L189
It's possible to extract method returning 'om' from a long surrounding method
Vulnerable declared dependency: pom.xml#L20
Provides transitive vulnerable dependency maven:org.springframework:spring-context:6.1.5 * [GHSA-4gc7-5j7h-4qph](https://osv.dev/vulnerability/GHSA-4gc7-5j7h-4qph) 3.1 Spring Framework DataBinder Case Sensitive Match Exception Results powered by [OSV](https://osv.dev/)
Vulnerable declared dependency: pom.xml#L30
Provides transitive vulnerable dependency maven:org.bouncycastle:bcprov-jdk18on:1.74 * [GHSA-v435-xc8x-wvr9](https://osv.dev/vulnerability/GHSA-v435-xc8x-wvr9) 5.9 Bouncy Castle affected by timing side-channel for RSA key exchange ("The Marvin Attack") * [GHSA-8xfc-gm6g-vgpv](https://osv.dev/vulnerability/GHSA-8xfc-gm6g-vgpv) 5.3 Bouncy Castle certificate parsing issues cause high CPU usage during parameter evaluation. * [GHSA-m44j-cfrm-g8qc](https://osv.dev/vulnerability/GHSA-m44j-cfrm-g8qc) 5.3 Bouncy Castle crafted signature and public key can be used to trigger an infinite loop * [GHSA-4h8f-2wvx-gg5w](https://osv.dev/vulnerability/GHSA-4h8f-2wvx-gg5w) 2.0 Bouncy Castle Java Cryptography API vulnerable to DNS poisoning Results powered by [OSV](https://osv.dev/)
Vulnerable declared dependency: pom.xml#L76
Provides transitive vulnerable dependency maven:org.xmlunit:xmlunit-core:2.9.1 * [GHSA-chfm-68vv-pvw5](https://osv.dev/vulnerability/GHSA-chfm-68vv-pvw5) 2.0 XMLUnit for Java has Insecure Defaults when Processing XSLT Stylesheets Results powered by [OSV](https://osv.dev/)
Vulnerable declared dependency: pom.xml#L30
Provides transitive vulnerable dependency maven:org.keycloak:keycloak-core:22.0.5 * [GHSA-w97f-w3hq-36g2](https://osv.dev/vulnerability/GHSA-w97f-w3hq-36g2) 6.5 Keycloak Denial of Service vulnerability * [GHSA-57rh-gr4v-j5f6](https://osv.dev/vulnerability/GHSA-57rh-gr4v-j5f6) 4.8 Keycloak Uses a Key Past its Expiration Date * [GHSA-xmmm-jw76-q7vg](https://osv.dev/vulnerability/GHSA-xmmm-jw76-q7vg) 4.8 One Time Passcode (OTP) is valid longer than expiration timeSeverity * [GHSA-g4gc-rh26-m3p5](https://osv.dev/vulnerability/GHSA-g4gc-rh26-m3p5) 4.4 Keycloak Open Redirect vulnerability * [GHSA-3hrr-xwvg-hxvr](https://osv.dev/vulnerability/GHSA-3hrr-xwvg-hxvr) 3.7 Keycloak DoS via account lockout Results powered by [OSV](https://osv.dev/)