dependency-check.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: OWASP Maven Dependency Check
  2. on:
  3. schedule:
  4. - cron: '0 7 * * 0'
  5. workflow_dispatch:
  6. jobs:
  7. check-dependencies:
  8. name: Check dependencies
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v4
  12. with:
  13. show-progress: false
  14. - name: Setup Java
  15. uses: actions/setup-java@v4
  16. with:
  17. distribution: 'temurin'
  18. java-version: 21
  19. cache: 'maven'
  20. - name: Run org.owasp:dependency-check plugin
  21. id: dependency-check
  22. continue-on-error: true
  23. run: mvn -B verify -Pdependency-check -DskipTests
  24. env:
  25. NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
  26. - name: Upload report on failure
  27. if: steps.dependency-check.outcome == 'failure'
  28. uses: actions/upload-artifact@v3
  29. with:
  30. name: dependency-check-report
  31. path: target/dependency-check-report.html
  32. if-no-files-found: error
  33. - name: Slack Notification on regular check
  34. if: github.event_name == 'schedule' && steps.dependency-check.outcome == 'failure'
  35. uses: rtCamp/action-slack-notify@v2
  36. env:
  37. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  38. SLACK_USERNAME: 'Cryptobot'
  39. SLACK_ICON: false
  40. SLACK_ICON_EMOJI: ':bot:'
  41. SLACK_CHANNEL: 'cryptomator-desktop'
  42. SLACK_TITLE: "Vulnerabilities in ${{ github.event.repository.name }} detected."
  43. SLACK_MESSAGE: "Download the <https://github.com/${{ github.repository }}/actions/run/${{ github.run_id }}|report> for more details."
  44. SLACK_FOOTER: false
  45. MSG_MINIMAL: true