Update .github/workflows/codescanning.yaml
Some checks failed
build / Build (push) Failing after 5m26s

This commit is contained in:
hgn
2025-01-16 09:30:03 +01:00
parent 71c7f27be3
commit 777e4b2b1c
2 changed files with 37 additions and 23 deletions

37
.github/workflows/codescanning.yaml vendored Normal file
View File

@@ -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 "<details><summary>Click to expand</summary>"
echo ""
echo '```terraform'
cat trivy.txt
echo '```'
echo "</details>"
} >> $GITHUB_STEP_SUMMARY
fi

View File

@@ -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'