OWASP: run on both maven_install.json and deploy jar
commit-id:862e21e0
@@ -11,7 +11,7 @@ on:
workflow_dispatch:
jobs:
- owasp:
+ owasp-maven-install:
runs-on: ubuntu-latest
steps:
- name: Get current date
@@ -35,3 +35,42 @@ jobs:
with:
name: dependency-check-report.html
path: dependency-check-report.html
+ owasp-deploy-jar:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Get current date
+ id: date
+ run: echo "::set-output name=ymd::$(TZ=America/Los_Angeles date +'%Y-%m-%d')"
+ - uses: actions/checkout@v3
+ - name: Setup OWASP cache
+ uses: actions/cache@v3
+ with:
+ path: "~/.cache/owasp"
+ key: owasp-${{ hashFiles('tools/run_owasp.sh') }}-${{ steps.date.outputs.ymd }}
+ - name: Setup Bazelisk cache
+ uses: actions/cache@v3
+ with:
+ path: "~/.cache/bazelisk"
+ key: ${{runner.os}}-bazelisk-${{ hashFiles('.bazelversion') }}
+ - name: Setup OWASP Bazel cache
+ uses: actions/cache@v3
+ with:
+ path: "~/.cache/bazel"
+ key: ${{runner.os}}-owasp-bazel-${{ hashFiles('WORKSPACE', 'maven_install.json') }}-${{ needs.get_date.outputs.ymd }}
+ restore-keys: |
+ ${{runner.os}}-owasp-bazel-${{ hashFiles('WORKSPACE', 'maven_install.json') }}-
+ ${{runner.os}}-owasp-bazel-
+ - uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ - name: Build deploy jar
+ run: bazel build //projects/allinone:allinone_main_deploy.jar
+ - name: Run OWASP check
+ run: tools/run_owasp.sh bazel-bin/projects/allinone/allinone_main_deploy.jar
+ - name: Save HTML report
+ uses: actions/upload-artifact@v3
+ if: always()
+ with:
+ name: deploy-jar-dependency-check-report.html
+ path: dependency-check-report.html
