|
10 | 10 |
|
11 | 11 | jobs:
|
12 | 12 | check-dependencies:
|
13 |
| - name: Check dependencies |
14 |
| - runs-on: ubuntu-latest |
15 |
| - steps: |
16 |
| - - uses: actions/checkout@v4 |
17 |
| - with: |
18 |
| - show-progress: false |
19 |
| - - name: Setup Java |
20 |
| - uses: actions/setup-java@v4 |
21 |
| - with: |
22 |
| - distribution: 'temurin' |
23 |
| - java-version: 21 |
24 |
| - cache: 'maven' |
25 |
| - - name: Cache NVD DB |
26 |
| - uses: actions/cache@v4 |
27 |
| - with: |
28 |
| - path: ~/.m2/repository/org/owasp/dependency-check-data/ |
29 |
| - key: dependency-check-${{ github.run_id }} |
30 |
| - restore-keys: | |
31 |
| - dependency-check |
32 |
| - env: |
33 |
| - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5 |
34 |
| - - name: Run org.owasp:dependency-check plugin |
35 |
| - id: dependency-check |
36 |
| - continue-on-error: true |
37 |
| - run: mvn -B validate -Pdependency-check |
38 |
| - env: |
39 |
| - NVD_API_KEY: ${{ secrets.NVD_API_KEY }} |
40 |
| - - name: Upload report on failure |
41 |
| - if: steps.dependency-check.outcome == 'failure' |
42 |
| - uses: actions/upload-artifact@v4 |
43 |
| - with: |
44 |
| - name: dependency-check-report |
45 |
| - path: target/dependency-check-report.html |
46 |
| - if-no-files-found: error |
47 |
| - - name: Slack Notification on regular check |
48 |
| - if: github.event_name == 'schedule' && steps.dependency-check.outcome == 'failure' |
49 |
| - uses: rtCamp/action-slack-notify@v2 |
50 |
| - env: |
51 |
| - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |
52 |
| - SLACK_USERNAME: 'Cryptobot' |
53 |
| - SLACK_ICON: false |
54 |
| - SLACK_ICON_EMOJI: ':bot:' |
55 |
| - SLACK_CHANNEL: 'cryptomator-desktop' |
56 |
| - SLACK_TITLE: "Vulnerabilities in ${{ github.event.repository.name }} detected." |
57 |
| - SLACK_MESSAGE: "Download the <https://github.com/${{ github.repository }}/actions/run/${{ github.run_id }}|report> for more details." |
58 |
| - SLACK_FOOTER: false |
59 |
| - MSG_MINIMAL: true |
60 |
| - - name: Failing workflow on release branch |
61 |
| - if: github.event_name == 'push' && steps.dependency-check.outcome == 'failure' |
62 |
| - shell: bash |
63 |
| - run: exit 1 |
| 13 | + uses: skymatic/workflows/.github/workflows/run-dependency-check.yml@v1 |
| 14 | + with: |
| 15 | + runner-os: 'ubuntu-latest' |
| 16 | + java-distribution: 'temurin' |
| 17 | + java-version: 21 |
| 18 | + secrets: |
| 19 | + nvd-api-key: ${{ secrets.NVD_API_KEY }} |
| 20 | + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} |
0 commit comments