docker-build.yml update for pull request on main #4
This file contains 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: SAST Scan | |
on: | |
push: | |
branches: [main, feature/*] | |
pull_request: | |
branches: [main] | |
jobs: | |
sast: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '21' | |
distribution: 'temurin' # Specify the Java distribution | |
- name: Install Maven | |
run: sudo apt-get install maven -y | |
- name: Run OWASP Dependency Check | |
env: | |
NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | |
run: mvn org.owasp:dependency-check-maven:check -Dnvd.apiKey=${NVD_API_KEY} | |
- name: Archive Dependency Check Report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dependency-check-report | |
path: target/dependency-check-report.html |