aboutsummaryrefslogtreecommitdiffstats
path: root/auth/cli-editor
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-09-02 13:27:40 -0400
committerJim Hahn <jrh3@att.com>2021-09-02 14:03:14 -0400
commitb2d3fb99d210ce13b38f8bf71f7888a70086254a (patch)
tree7141eea456438aaf8b935bb539269ef023196e6c /auth/cli-editor
parent51f1fffd687e53c858685ec41fd3ab8cfd4fcdf1 (diff)
Fix sonar security issues in apex-pdp
Fixed sonar security issues: - set permissions of temporary files Issue-ID: POLICY-3093 Change-Id: I1dfc87f22975fa950cfcfc47196fad55d6cbf277 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'auth/cli-editor')
-rw-r--r--auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java
index 1f2703daa..0926c80e0 100644
--- a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java
+++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java
@@ -20,7 +20,6 @@
package org.onap.policy.apex.auth.clieditor.tosca;
-import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
@@ -29,6 +28,7 @@ import org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain;
import org.onap.policy.apex.auth.clieditor.CommandLineParameters;
import org.onap.policy.apex.auth.clieditor.utils.CliUtils;
import org.onap.policy.common.utils.coder.CoderException;
+import org.onap.policy.common.utils.resources.TextFileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -65,7 +65,7 @@ public class ApexCliToscaEditorMain {
String policyModelFilePath = null;
try {
- final var tempModelFile = File.createTempFile("policyModel", ".json");
+ final var tempModelFile = TextFileUtils.createTempFile("policyModel", ".json");
policyModelFilePath = tempModelFile.getAbsolutePath();
} catch (IOException e) {
LOGGER.error("Cannot create the policy model temp file.", e);