Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESOPS-133 Add Trivy repo scan #396

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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: 23 additions & 1 deletion .github/workflows/algorithm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
strategy:
matrix:
service: [search, recommend]
TobySMurray marked this conversation as resolved.
Show resolved Hide resolved
fail-fast: false
defaults:
run:
working-directory: apps/algorithm/${{ matrix.service }}
Expand Down Expand Up @@ -92,3 +91,26 @@ jobs:
- uses: pypa/[email protected]
with:
inputs: apps/algorithm/${{ matrix.service }}/requirements.txt
vuln:
name: Run Trivy vulnerability scanner
runs-on: ubuntu-latest
strategy:
matrix:
service: [search, recommend]
fail-fast: false
steps:
- uses: actions/checkout@v4

- name: Build Docker image
run: |
docker compose up -d ${{ matrix.service }} datalayer database elasticsearch

- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: 'search', 'recommend'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not valid YAML

format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
23 changes: 23 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,26 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- run: npm audit --audit-level high

vuln:
name: Run Trivy vulnerability scanner
runs-on: ubuntu-latest
strategy:
matrix:
service: [user, listing, review, message, lib]
TobySMurray marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v4

- name: Build Docker image
run: |
docker compose up -d ${{ matrix.service }}
TobySMurray marked this conversation as resolved.
Show resolved Hide resolved

- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: ${{ matrix.service }}
TobySMurray marked this conversation as resolved.
Show resolved Hide resolved
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
20 changes: 20 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,23 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- run: npm audit --audit-level high

vuln:
name: Run Trivy vulnerability scanner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build Docker image
run: |
docker compose up -d frontend

- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: 'frontend'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- name: Trufflehog Scan
uses: trufflesecurity/trufflehog@main
with:
extra_args: --only-verified
extra_args: --only-verified
Loading