This commit is contained in:
37
.github/workflows/codescanning.yaml
vendored
37
.github/workflows/codescanning.yaml
vendored
@@ -6,33 +6,12 @@ on:
|
|||||||
- devpod
|
- devpod
|
||||||
pull_request:
|
pull_request:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
tfsec:
|
||||||
name: Build
|
name: tfsec
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Clone repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@master
|
||||||
|
- name: tfsec
|
||||||
- name: Run Trivy scanner
|
uses: aquasecurity/tfsec-action@v1.0.0
|
||||||
uses: aquasecurity/trivy-action@0.28.0
|
|
||||||
with:
|
|
||||||
scan-type: config
|
|
||||||
hide-progress: true
|
|
||||||
output: trivy.txt
|
|
||||||
exit-code: '1'
|
|
||||||
severity: 'CRITICAL,HIGH'
|
|
||||||
github-pat: ${{ secret.PLT_GIT }}
|
|
||||||
|
|
||||||
- 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
|
|
Reference in New Issue
Block a user