gitgabrio commented on code in PR #3868:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3868#discussion_r2015946834


##########
addons/common/process-svg/src/main/java/org/kie/kogito/svg/AbstractProcessSvgService.java:
##########
@@ -68,7 +68,7 @@ public void setSvgResourcesPath(Optional<String> 
svgResourcesPath) {
     public Optional<String> getProcessSvg(String processId) {
         if (svgResourcesPath.isPresent()) {
             Path path = Paths.get(svgResourcesPath.get(), processId + ".svg");
-            if (Files.exists(path)) {
+            if (path.toFile().exists()) {

Review Comment:
   
   
   This would lead to File.exists() execution, and then to
   
   > 'exists' method of 'java.io.File' object could be abused to disclose or 
manipulate sensitive files:
   
   



##########
addons/common/persistence/filesystem/src/main/java/org/kie/kogito/persistence/filesystem/FileSystemProcessInstances.java:
##########
@@ -110,7 +110,7 @@ public void create(String id, ProcessInstance instance) {
     public void update(String id, ProcessInstance instance) {
         if (isActive(instance)) {
             Path processInstanceStorage = Paths.get(storage.toString(), id);
-            if (Files.exists(processInstanceStorage)) {
+            if (!processInstanceStorage.toFile().exists()) {

Review Comment:
   
   
   This would lead to File.exists() execution, and then to
   
   > 'exists' method of 'java.io.File' object could be abused to disclose or 
manipulate sensitive files:
   
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to