From 81c3cbfc6ff60fc705d142a88a64654a75c010e0 Mon Sep 17 00:00:00 2001 From: "priyanka.akhade" Date: Mon, 11 May 2020 04:24:13 +0000 Subject: sonar security issue fix- Make sure that using a regular expression is safe here Signed-off-by: priyanka.akhade Issue-ID: CLI-270 Change-Id: I81537658a9bece901695bd5133e17efd7b3c3b92 --- framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framework/src/main/java') diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java index 29994d09..3e46c1bb 100644 --- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java +++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java @@ -276,7 +276,7 @@ public abstract class OnapCommand { if (!param.getParameterType().equals(OnapCommandParameterType.BINARY)) continue; - if (param.getValue().toString().matches("artifact://*:*")) { + if (param.getValue().toString().matches("artifact://*:*")) { //NOSONAR String categoryAndName = param.getValue().toString().replaceFirst("artifact://", ""); String[] categoryAndNameTokens = categoryAndName.split(":"); Artifact a = OnapCommandArtifactStore.getStore().getArtifact(categoryAndNameTokens[1], categoryAndNameTokens[0]); -- cgit 1.2.3-korg