diff --git a/.github/workflows/service-push.yml b/.github/workflows/service-push.yml index 1b0ed5c5..2fc29fe4 100644 --- a/.github/workflows/service-push.yml +++ b/.github/workflows/service-push.yml @@ -139,6 +139,7 @@ jobs: args: --repo=https://github.com/${{github.repository}} - name: Run Trivy scanner + if: inputs.staticAnalysis == true uses: aquasecurity/trivy-action@master with: scan-type: 'fs' @@ -148,6 +149,7 @@ jobs: output: 'trivy-results.sarif' - name: Upload Trivy results + if: inputs.staticAnalysis == true uses: github/codeql-action/upload-sarif@v2 with: sarif_file: 'trivy-results.sarif' @@ -157,30 +159,31 @@ jobs: id: ossar - name: Upload OSSAR results + if: inputs.staticAnalysis == true uses: github/codeql-action/upload-sarif@v2 with: sarif_file: ${{ steps.ossar.outputs.sarifFile }} #node - name: Setup CodeQL for Javascript - if: needs.Setup.outputs.BuildNode == 'true' + if: inputs.staticAnalysis == true && needs.Setup.outputs.BuildNode == 'true' uses: github/codeql-action/init@v2 with: languages: javascript - name: Run Javascript CodeQL Analysis - if: needs.Setup.outputs.BuildNode == 'true' + if: inputs.staticAnalysis == true && needs.Setup.outputs.BuildNode == 'true' uses: github/codeql-action/analyze@v2 #python - name: Setup CodeQL for Python - if: needs.Setup.outputs.BuildPython == 'true' + if: inputs.staticAnalysis == true && needs.Setup.outputs.BuildPython == 'true' uses: github/codeql-action/init@v2 with: languages: python - name: Run Python CodeQL Analysis - if: needs.Setup.outputs.BuildPython == 'true' + if: inputs.staticAnalysis == true && needs.Setup.outputs.BuildPython == 'true' uses: github/codeql-action/analyze@v2 @@ -455,6 +458,7 @@ jobs: echo "\`\`\`$HADOLINT_RESULTS\`\`\`" >> $GITHUB_STEP_SUMMARY - name: Build image test + if: inputs.staticAnalysis == true uses: docker/build-push-action@v2 with: context: . @@ -463,6 +467,7 @@ jobs: outputs: type=docker,dest=./dockerimage-node-${{ matrix.node-version }}.tar - name: Run Trivy scanner + if: inputs.staticAnalysis == true uses: aquasecurity/trivy-action@master with: scan-type: image @@ -472,6 +477,7 @@ jobs: output: 'trivy-results.sarif' - name: Upload Trivy results + if: inputs.staticAnalysis == true uses: github/codeql-action/upload-sarif@v2 with: sarif_file: 'trivy-results.sarif' diff --git a/CHANGELOG.md b/CHANGELOG.md index 37c0544d..e22861cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.23.4](https://github.com/filipeforattini/ff-iac-github-actions/compare/v1.23.3...v1.23.4) (2022-05-25) + + +### Bug Fixes + +* made static analysis optional ([33cc49a](https://github.com/filipeforattini/ff-iac-github-actions/commit/33cc49ae4855e9a79cd8c4b10ba6862dd0259afa)) + ## [1.23.3](https://github.com/filipeforattini/ff-iac-github-actions/compare/v1.23.2...v1.23.3) (2022-05-25)