diff options
author | amshegokar <AS00500801@techmahindra.com> | 2018-09-11 20:20:27 +0530 |
---|---|---|
committer | amshegokar <AS00500801@techmahindra.com> | 2018-09-11 20:20:27 +0530 |
commit | f67bc2db9676c54192a019852594a29f33816534 (patch) | |
tree | 2d69c0e8997c691d774ae9b97a3460b0cc29392e /UniversalVesAdapter | |
parent | 1b2bb4255e73f7b2f98035724aa243b825b8162d (diff) |
Security vulnerabilities identified in CLM scan
Mapper: security vulnerabilities identified in CLM scan
Change-Id: I2b977e99e4ad6d1aae24e0d441da6002c28ab0ac
Issue-ID: DCAEGEN2-769
Signed-off-by: amshegokar <AS00500801@techmahindra.com>
Diffstat (limited to 'UniversalVesAdapter')
-rw-r--r-- | UniversalVesAdapter/.classpath | 11 | ||||
-rw-r--r-- | UniversalVesAdapter/.project | 11 | ||||
-rw-r--r-- | UniversalVesAdapter/.settings/org.eclipse.jdt.core.prefs | 1 | ||||
-rw-r--r-- | UniversalVesAdapter/pom.xml | 14 | ||||
-rw-r--r-- | UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java | 35 | ||||
-rw-r--r-- | UniversalVesAdapter/src/main/resources/application.properties | 12 |
6 files changed, 70 insertions, 14 deletions
diff --git a/UniversalVesAdapter/.classpath b/UniversalVesAdapter/.classpath index 6d7587a..c77b3a1 100644 --- a/UniversalVesAdapter/.classpath +++ b/UniversalVesAdapter/.classpath @@ -27,5 +27,16 @@ <attribute name="maven.pomderived" value="true"/> </attributes> </classpathentry> + <classpathentry kind="src" output="target/classes" path="src/gen/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" path=".apt_generated"> + <attributes> + <attribute name="optional" value="true"/> + </attributes> + </classpathentry> <classpathentry kind="output" path="target/classes"/> </classpath> diff --git a/UniversalVesAdapter/.project b/UniversalVesAdapter/.project index 473a65c..1123cab 100644 --- a/UniversalVesAdapter/.project +++ b/UniversalVesAdapter/.project @@ -21,12 +21,23 @@ </arguments> </buildCommand> <buildCommand> + <name>net.sf.eclipsecs.core.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> <name>org.eclipse.m2e.core.maven2Builder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> + <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> <nature>org.springframework.ide.eclipse.core.springnature</nature> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.m2e.core.maven2Nature</nature> diff --git a/UniversalVesAdapter/.settings/org.eclipse.jdt.core.prefs b/UniversalVesAdapter/.settings/org.eclipse.jdt.core.prefs index 714351a..78b2bfc 100644 --- a/UniversalVesAdapter/.settings/org.eclipse.jdt.core.prefs +++ b/UniversalVesAdapter/.settings/org.eclipse.jdt.core.prefs @@ -2,4 +2,5 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.processAnnotations=enabled org.eclipse.jdt.core.compiler.source=1.8 diff --git a/UniversalVesAdapter/pom.xml b/UniversalVesAdapter/pom.xml index cd5e489..1342ec3 100644 --- a/UniversalVesAdapter/pom.xml +++ b/UniversalVesAdapter/pom.xml @@ -84,7 +84,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> - <version>2.0.3.RELEASE</version> + <version>2.0.4.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -95,9 +95,13 @@ <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-commons</artifactId> - <version>2.0.6.RELEASE</version> + <version>2.0.8.RELEASE</version> + </dependency> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-all</artifactId> + <version>2.4.14</version> </dependency> - <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> @@ -108,7 +112,7 @@ <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> - <version>2.9.5</version> + <version>2.9.6</version> </dependency> @@ -130,7 +134,7 @@ <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> - <version>2.11.0-atlassian-01</version> + <version>2.12.0</version> </dependency> <!-- https://mvnrepository.com/artifact/com.thoughtworks.xstream/xstream --> diff --git a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java index f92511e..ca1bcc9 100644 --- a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java +++ b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java @@ -79,11 +79,40 @@ public class VESAdapterInitializer implements CommandLineRunner, Ordered { } else { - - LOGGER.info(">>>Static configuration to be used"); - + final String url = "http://localhost:8085/start"; + final String USER_AGENT = "Mozilla/5.0"; + + try { + URL obj = new URL(url); + HttpURLConnection httpURLConnection = (HttpURLConnection) obj.openConnection(); + + // optional default is GET + httpURLConnection.setRequestMethod("GET"); + + // add request header + httpURLConnection.setRequestProperty("User-Agent", USER_AGENT); + int responseCode = httpURLConnection.getResponseCode(); + LOGGER.info("Sending 'GET' request to URL : " + url); + LOGGER.info("Response Code : " + responseCode); + BufferedReader in = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream())); + String inputLine; + StringBuffer response = new StringBuffer(); + + while ((inputLine = in.readLine()) != null) { + response.append(inputLine); + } + in.close(); + + // print result + LOGGER.info("The result is :" + response.toString()); + + } catch (Exception e) { + LOGGER.error("Error occured due to :" + e.getMessage()); + e.printStackTrace(); + } + } } diff --git a/UniversalVesAdapter/src/main/resources/application.properties b/UniversalVesAdapter/src/main/resources/application.properties index c2dec51..c940da4 100644 --- a/UniversalVesAdapter/src/main/resources/application.properties +++ b/UniversalVesAdapter/src/main/resources/application.properties @@ -8,11 +8,11 @@ mapperConfig.file=../UniversalVesAdapter/src/main/resources/MapperConfig.json dmaap.mr_props=DMaapMR.properties #DEV Machine DB Details -spring.datasource.url=jdbc:postgresql://10.49.16.19:5432/dummy -spring.datasource.username=postgres -spring.datasource.password=root +#spring.datasource.url=jdbc:postgresql://10.49.16.19:5432/dummy +#spring.datasource.username=postgres +#spring.datasource.password=root #Lab Details -#spring.datasource.url=jdbc:postgresql://10.53.172.129:5432/dummy -#spring.datasource.username=ngpuser -#spring.datasource.password=root
\ No newline at end of file +spring.datasource.url=jdbc:postgresql://10.53.172.129:5432/dummy +spring.datasource.username=ngpuser +spring.datasource.password=root
\ No newline at end of file |