owasp scanning #126
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: owasp scanning | |
| on: | |
| schedule: | |
| - cron: "48 9 * * 4" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| actions: read | |
| security-events: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Get date for daily cache | |
| id: get-date | |
| run: echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")" | |
| shell: bash | |
| - name: Cache Dependency Check DB | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/dependency-check-data | |
| key: ${{ runner.os }}-gradle-owasp-${{ steps.get-date.outputs.date }} | |
| restore-keys: ${{ runner.os }}-gradle-owasp-${{ steps.get-date.outputs.date }} | |
| - name: Generate DependencyCheck report | |
| run: ./gradlew dependencyCheckAggregate | |
| env: | |
| ORG_GRADLE_PROJECT_OWASP_API_KEY: ${{ secrets.ORG_GRADLE_PROJECT_OWASP_API_KEY }} | |
| - name: upload-sarif-4 | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: ./build/reports/owasp-dependency-check/dependency-check-report.sarif |