Skip to content

Commit 943e061

Browse files
authored
Merge pull request #63 from cryptomator/refactoring/centralize-dependency-check
Externalize dependency-check
2 parents bc833c5 + e5e788d commit 943e061

File tree

1 file changed

+8
-51
lines changed

1 file changed

+8
-51
lines changed

.github/workflows/dependency-check.yml

Lines changed: 8 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,54 +10,11 @@ on:
1010

1111
jobs:
1212
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

Comments
 (0)