diff --git a/.github/workflows/codescanning.yaml b/.github/workflows/codescanning.yaml new file mode 100644 index 0000000..7b4127e --- /dev/null +++ b/.github/workflows/codescanning.yaml @@ -0,0 +1,37 @@ +name: build +on: + push: + branches: + - main + - devpod + pull_request: +jobs: + build: + name: Build + runs-on: ubuntu-20.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Trivy scanner + uses: aquasecurity/trivy-action@0.28.0 + with: + scan-type: config + hide-progress: true + output: trivy.txt + exit-code: '1' + severity: 'CRITICAL,HIGH' + + - name: Publish Trivy Output to Summary + run: | + if [[ -s trivy.txt ]]; then + { + echo "### Security Output" + echo "
Click to expand" + echo "" + echo '```terraform' + cat trivy.txt + echo '```' + echo "
" + } >> $GITHUB_STEP_SUMMARY + fi \ No newline at end of file diff --git a/.github/workflows/start.yaml b/.github/workflows/start.yaml deleted file mode 100644 index 1a6c178..0000000 --- a/.github/workflows/start.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: build -on: - push: - branches: - - main - pull_request: -jobs: - build: - name: Build - runs-on: ubuntu-20.04 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Run Trivy vulnerability scanner in IaC mode - uses: aquasecurity/trivy-action@0.28.0 - with: - scan-type: 'config' - hide-progress: true - format: 'sarif' - output: 'trivy-results.sarif' - exit-code: '1' - severity: 'CRITICAL,HIGH' \ No newline at end of file