Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ on:
jobs:
# This workflow contains a single job called "trivy"
trivy:
# The type of runner that the job will run on
runs-on: [self-hosted, linux, codebuild]
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@0.28.0
with:
scan-type: "fs"
scan-ref: "${{ github.workspace }}"
trivy-config: "${{ github.workspace }}/trivy.yml"
- name: Install Trivy
run: |
sudo apt-get install -y wget apt-transport-https gnupg lsb-release
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/trivy.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb generic main" | sudo tee /etc/apt/sources.list.d/trivy.list
sudo apt-get update -qq
sudo apt-get install -y trivy
trivy --version

- name: Run Trivy vulnerability scanner (fs)
run: |
trivy fs . --config "${{ github.workspace }}/trivy.yml"
Loading