Skip to content

Commit

Permalink
[CI] Add Trivy workflow
Browse files Browse the repository at this point in the history
This patch adds a workflow to perform trivy check as required by our
public release policy.
  • Loading branch information
KornevNikita committed Jan 30, 2025
1 parent adeaea8 commit 67241e2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow performs trivy check of docker config files.
# It triggers only on pushs to devops/containers.
# For more info: https://github.com/aquasecurity/trivy-action

name: Trivy

on:
push:
paths:
- 'devops/containers/**'
workflow_dispatch:

jobs:
build:
name: Trivy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: devops

- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
scan-type: 'config'
scan-ref: devops/containers
trivyignores: devops/.trivyignore.txt
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
3 changes: 3 additions & 0 deletions devops/.trivyignore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
misconfigurations:
- id: AVD-DS-0026
statement: "Our containers do not provide running services, but only preinstalled tools, there is not much value in adding HEALTHCHECK directives"

0 comments on commit 67241e2

Please sign in to comment.