zowe / sample-spring-boot-api-service

Zowe REST API service SDK and sample API service that integrates with Zowe API Mediation Layer
Other
26 stars 18 forks source link

Address all issues identified by Sonar #95

Closed plavjanik closed 4 years ago

plavjanik commented 4 years ago

Addresses all major and minor code smells and most of the security hotspots.

Some security hotspots in the sample are kept because they are meant to inspire code review rather than saying that the code is vulnerable.

JarPatcher code smells about Zip archives are excluded by // NOSONAR since the archive is provided by the same user who executes the JarPatcher.

image

codecov[bot] commented 4 years ago

Codecov Report

Merging #95 into master will increase coverage by 0.35%. The diff coverage is 77%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #95      +/-   ##
============================================
+ Coverage     75.45%   75.81%   +0.35%     
- Complexity      300      305       +5     
============================================
  Files            69       69              
  Lines          1153     1170      +17     
  Branches        113      119       +6     
============================================
+ Hits            870      887      +17     
+ Misses          231      224       -7     
- Partials         52       59       +7
Impacted Files Coverage Δ Complexity Δ
...c/main/java/org/zowe/commons/spring/WebConfig.java 0% <ø> (ø) 0 <0> (ø) :arrow_down:
...e/sample/apiservice/ZoweApiServiceApplication.java 33.33% <ø> (ø) 1 <0> (ø) :arrow_down:
...zos/security/platform/SafPlatformClassFactory.java 0% <ø> (ø) 0 <0> (ø) :arrow_down:
...va/org/zowe/commons/error/CommonsErrorService.java 100% <ø> (ø) 2 <0> (ø) :arrow_down:
...rg/zowe/commons/rest/response/BasicApiMessage.java 76.47% <ø> (ø) 7 <0> (ø) :arrow_down:
...in/java/org/zowe/commons/spring/SpringContext.java 85.71% <ø> (ø) 4 <0> (ø) :arrow_down:
.../org/zowe/sample/apiservice/wto/WtoController.java 100% <ø> (ø) 2 <0> (ø) :arrow_down:
...security/service/DummyPlatformSecurityService.java 100% <ø> (ø) 11 <0> (ø) :arrow_down:
...java/org/zowe/sample/apiservice/LibsExtractor.java 0% <0%> (ø) 0 <0> (ø) :arrow_down:
...c/main/java/org/zowe/commons/zos/LibExtractor.java 0% <0%> (ø) 0 <0> (ø) :arrow_down:
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b80ce88...8df1e7a. Read the comment docs.