Skip to content

Commit

Permalink
fix: enable owasp check (nightly and on push to main) (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurosens authored Jun 8, 2021
1 parent 15313c6 commit fcbf382
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 10 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci-dependency-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ci-dependency-check
on:
schedule:
- cron: '0 1 * * 0' # Each Sunday at 01:00 UTC
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: adopt
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v2
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
- name: version
run: |-
APP_SHA=$(git rev-parse --short ${GITHUB_SHA})
APP_LATEST_REV=$(git rev-list --tags --max-count=1)
APP_LATEST_TAG=$(git describe --tags ${APP_LATEST_REV} 2> /dev/null || echo 0.0.0)
echo "APP_VERSION=${APP_LATEST_TAG}-${APP_SHA}" >> ${GITHUB_ENV}
- name: mvn
run: |-
mvn dependency-check:check \
--batch-mode \
--file ./pom.xml \
--settings ./settings.xml \
--define app.packages.username="${APP_PACKAGES_USERNAME}" \
--define app.packages.password="${APP_PACKAGES_PASSWORD}" \
env:
APP_PACKAGES_USERNAME: ${{ github.actor }}
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions owasp/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@
<notes>see https://tomcat.apache.org/security-9.html#Apache_Tomcat_9.x_vulnerabilities vulnerability is fixed in tomcat 9.0.38</notes>
<cve>CVE-2020-13943</cve>
</suppress>
<suppress>
<!-- spring-boot and spring are excluded from cfenv artifact. Related issues can be omitted. -->
<notes><![CDATA[file name: java-cfenv-boot-2.3.0.jar]]></notes>
<sha1>da214a6f44ee5811c97f3b53a6dda31edf25ac9e</sha1>
<cve>CVE-2016-9878</cve>
<cve>CVE-2018-1270</cve>
<cve>CVE-2018-1271</cve>
<cve>CVE-2018-1272</cve>
<cve>CVE-2020-5421</cve>
</suppress>
</suppressions>
16 changes: 6 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@
<groupId>io.pivotal.cfenv</groupId>
<artifactId>java-cfenv-boot</artifactId>
<version>2.3.0</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sap.cloud.sdk.cloudplatform</groupId>
Expand Down Expand Up @@ -310,19 +316,9 @@
<artifactId>dependency-check-maven</artifactId>
<version>${owasp.version}</version>
<configuration>
<skip>true</skip>
<suppressionFile>./owasp/suppressions.xml</suppressionFile>
<failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
</configuration>
<executions>
<execution>
<id>check</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit fcbf382

Please sign in to comment.