diff --git a/.github/workflows/start.yaml b/.github/workflows/start.yaml index 394c807..2d3eafe 100644 --- a/.github/workflows/start.yaml +++ b/.github/workflows/start.yaml @@ -16,4 +16,33 @@ jobs: - name: List files in the repository run: | ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file + - run: echo "🍏 This job's status is ${{ job.status }}." + +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' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: 'trivy-results.sarif' \ No newline at end of file