Skip to content

Commit

Permalink
Added dependency check plugin for the library and updated dependencie…
Browse files Browse the repository at this point in the history
…s in samples.
  • Loading branch information
sapessi committed Feb 14, 2018
1 parent 526a35c commit f40315e
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 29 deletions.
23 changes: 21 additions & 2 deletions aws-serverless-java-container-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-core</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
Expand Down Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime -->
Expand Down Expand Up @@ -106,6 +106,25 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>3.1.1</version>
<configuration>
<skipProvidedScope>true</skipProvidedScope>
<suppressionFiles>
<suppressionFile>${project.basedir}/../owasp-suppression.xml</suppressionFile>
</suppressionFiles>
<failBuildOnCVSS>7</failBuildOnCVSS>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

import com.amazonaws.services.lambda.runtime.LambdaLogger;

import java.nio.charset.Charset;


/**
* Mock LambdaLogger object that prints output to the console
*/
Expand All @@ -27,4 +30,10 @@ public class MockLambdaConsoleLogger implements LambdaLogger {
public void log(String s) {
System.out.println(s);
}


@Override
public void log(byte[] bytes) {
System.out.println(new String(bytes, Charset.defaultCharset()));
}
}
20 changes: 20 additions & 0 deletions aws-serverless-java-container-jersey/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,26 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>3.1.1</version>
<configuration>
<skipProvidedScope>true</skipProvidedScope>
<suppressionFiles>
<suppressionFile>${project.basedir}/../owasp-suppression.xml</suppressionFile>
</suppressionFiles>
<failBuildOnCVSS>7</failBuildOnCVSS>

</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
20 changes: 20 additions & 0 deletions aws-serverless-java-container-spark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,26 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>3.1.1</version>
<configuration>
<skipProvidedScope>true</skipProvidedScope>
<suppressionFiles>
<suppressionFile>${project.basedir}/../owasp-suppression.xml</suppressionFile>
</suppressionFiles>
<failBuildOnCVSS>7</failBuildOnCVSS>

</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
19 changes: 19 additions & 0 deletions aws-serverless-java-container-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,25 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>3.1.1</version>
<configuration>
<skipProvidedScope>true</skipProvidedScope>
<suppressionFiles>
<suppressionFile>${project.basedir}/../owasp-suppression.xml</suppressionFile>
</suppressionFiles>
<failBuildOnCVSS>7</failBuildOnCVSS>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
31 changes: 31 additions & 0 deletions owasp-suppression.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.1.xsd">

<suppress>
<notes><![CDATA[ Drupal issues for AWS is not relevant here ]]></notes>
<cpe>cpe:/a:amazon_aws_project:amazon_aws:7.x-1.2::~~~drupal~~</cpe>
</suppress>
<suppress>
<notes><![CDATA[ Drupal issues for AWS is not relevant here ]]></notes>
<cpe>cpe:/a:restful_web_services_project:restful_web_services:7.x-2.1::~~~drupal~~</cpe>
</suppress>

</suppressions>
5 changes: 2 additions & 3 deletions samples/jersey/pet-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<jersey.version>2.25.1</jersey.version>
<jackson.version>2.8.5</jackson.version>
<jersey.version>2.26</jersey.version>
</properties>

<dependencies>
Expand All @@ -53,7 +52,7 @@
<dependency>
<groupId>io.symphonia</groupId>
<artifactId>lambda-logging</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>

</dependencies>
Expand Down
18 changes: 2 additions & 16 deletions samples/spark/pet-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<jackson.version>2.8.5</jackson.version>
<jackson.version>2.9.4</jackson.version>
<spark.version>2.7.1</spark.version>
</properties>

Expand All @@ -44,32 +44,18 @@
<version>${spark.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging -->
<dependency>
<groupId>io.symphonia</groupId>
<artifactId>lambda-logging</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
</dependencies>

Expand Down
3 changes: 1 addition & 2 deletions samples/spring/pet-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring.version>5.0.3.RELEASE</spring.version>
<jackson.version>2.8.4</jackson.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -60,7 +59,7 @@
<dependency>
<groupId>io.symphonia</groupId>
<artifactId>lambda-logging</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
</dependencies>

Expand Down
12 changes: 6 additions & 6 deletions samples/springboot/pet-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<version>1.5.9.RELEASE</version>
</parent>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -29,15 +34,10 @@
<dependency>
<groupId>io.symphonia</groupId>
<artifactId>lambda-logging</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
</dependencies>

<properties>
<java.version>1.8</java.version>
</properties>


<build>
<plugins>
<plugin>
Expand Down

0 comments on commit f40315e

Please sign in to comment.