Skip to content

Commit 6748402

Browse files
committed
Add dependency scanning to CI pipeline
This enables dependency scanning via trivy. Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
1 parent 8106c53 commit 6748402

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/security.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
on:
5+
workflow_call:
6+
jobs:
7+
security-scan:
8+
runs-on: ubuntu-latest
9+
name: Security Scan
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
14+
- name: Code Security Scan
15+
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
16+
with:
17+
scan-type: 'fs'
18+
scanners: vuln,secret
19+
trivy-config: .trivy.yml
20+
exit-code: 1
21+
ignore-unfixed: true
22+
env:
23+
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
24+
TRIVY_USERNAME: ${{ github.actor }}
25+
TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)