1
+ name : OWASP Maven Dependency Check
2
+ on :
3
+ schedule :
4
+ - cron : ' 0 7 * * 0'
5
+ push :
6
+ branches :
7
+ - ' release/**'
8
+ workflow_dispatch :
9
+
10
+
11
+ jobs :
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 : Run org.owasp:dependency-check plugin
26
+ id : dependency-check
27
+ continue-on-error : true
28
+ run : mvn -B verify -Pdependency-check -DskipTests
29
+ env :
30
+ NVD_API_KEY : ${{ secrets.NVD_API_KEY }}
31
+ - name : Upload report on failure
32
+ if : steps.dependency-check.outcome == 'failure'
33
+ uses : actions/upload-artifact@v3
34
+ with :
35
+ name : dependency-check-report
36
+ path : target/dependency-check-report.html
37
+ if-no-files-found : error
38
+ - name : Slack Notification on regular check
39
+ if : github.event_name == 'schedule' && steps.dependency-check.outcome == 'failure'
40
+ uses : rtCamp/action-slack-notify@v2
41
+ env :
42
+ SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}
43
+ SLACK_USERNAME : ' Cryptobot'
44
+ SLACK_ICON : false
45
+ SLACK_ICON_EMOJI : ' :bot:'
46
+ SLACK_CHANNEL : ' cryptomator-desktop'
47
+ SLACK_TITLE : " Vulnerabilities in ${{ github.event.repository.name }} detected."
48
+ SLACK_MESSAGE : " Download the <https://github.com/${{ github.repository }}/actions/run/${{ github.run_id }}|report> for more details."
49
+ SLACK_FOOTER : false
50
+ MSG_MINIMAL : true
51
+ - name : Failing workflow on release branch
52
+ if : github.event_name == 'push' && steps.dependency-check.outcome == 'failure'
53
+ shell : bash
54
+ run : exit 1
0 commit comments