diff --git a/.github/workflows/complete-workflow.yml b/.github/workflows/complete-workflow.yml index 304c6d7..a2c575b 100644 --- a/.github/workflows/complete-workflow.yml +++ b/.github/workflows/complete-workflow.yml @@ -1,10 +1,10 @@ -name: Build code, run unit test, run SAST, SCA, DAST security scans +name: Build code, run unit test, run SAST, SCA, DAST security scans-10 on: push jobs: build: runs-on: ubuntu-latest - name: Run unit tests and SAST scan on the source code + name: Run unit tests and SAST scan on the source code #Name of Job steps: - uses: actions/checkout@v2 - name: Set up JDK 11 @@ -14,34 +14,34 @@ jobs: distribution: 'temurin' cache: maven - name: Build with Maven cloud - run: mvn -B verify sonar:sonar -Dsonar.projectKey=javaprojectreachability -Dsonar.organization=javaprojectreachability -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN + run: mvn -B verify sonar:sonar -Dsonar.projectKey=java-case-study-1960-project-key -Dsonar.organization=java-case-study-1960 -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} security: runs-on: ubuntu-latest - needs: build + needs: build #For Sequnetial flow (Before run Security, Run the Build job) name: Run the SCA scan on the source code steps: - - uses: actions/checkout@master - - name: RunSnyk to check for vulnerabilities - uses: snyk/actions/maven@master - continue-on-error: true + - uses: actions/checkout@master # checkout Action + - name: RunSnyk to check for vulnerabilities # Name of Snyk Action + uses: snyk/actions/maven@master # Snyk Action + continue-on-error: true # Build not fail in case of error env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} zap_scan: runs-on: ubuntu-latest - needs: security + needs: security #For Sequnetial flow (Before run Zap_scan, Run the Security job) name: Run DAST scan on the web application steps: - name: Checkout uses: actions/checkout@v2 with: - ref: master + ref: master # Refering to Master Branch - name: ZAP Scan uses: zaproxy/action-baseline@v0.6.1 with: docker_name: 'owasp/zap2docker-stable' target: 'http://testphp.vulnweb.com/' rules_file_name: '.zap/rules.tsv' - cmd_options: '-a' \ No newline at end of file + cmd_options: '-a'