owasp-dependency-check-daily.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # the benefit of this over dependabot is that this also analyzes transitive dependencies
  2. # while dependabot (at least currently) only analyzes top-level dependencies
  3. name: OWASP dependency check (daily)
  4. on:
  5. schedule:
  6. # daily at 1:30 UTC
  7. - cron: "30 1 * * *"
  8. workflow_dispatch:
  9. jobs:
  10. analyze:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  14. - name: Free disk space
  15. run: .github/scripts/gha-free-disk-space.sh
  16. - name: Set up JDK for running Gradle
  17. uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
  18. with:
  19. distribution: temurin
  20. java-version-file: .java-version
  21. - name: Increase gradle daemon heap size
  22. run: |
  23. sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties
  24. - uses: gradle/actions/setup-gradle@d9336dac04dea2507a617466bc058a3def92b18b # v3.4.0
  25. - run: ./gradlew :javaagent:dependencyCheckAnalyze
  26. env:
  27. NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
  28. - name: Upload report
  29. if: always()
  30. uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
  31. with:
  32. path: javaagent/build/reports
  33. workflow-notification:
  34. needs:
  35. - analyze
  36. if: always()
  37. uses: ./.github/workflows/reusable-workflow-notification.yml
  38. with:
  39. success: ${{ needs.analyze.result == 'success' }}