Skip to content

Commit

Permalink
[CI] Add Trivy vulnerables check
Browse files Browse the repository at this point in the history
Signed-off-by: v.oleynikov <[email protected]>
  • Loading branch information
duckhawk committed Aug 19, 2024
1 parent 969dc81 commit b756ab5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/trivy_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Trivy check for sub repos

on:
pull_request:
push:
branches:
- main

jobs:
test:
name: Trivy check for sub repos
runs-on: [self-hosted, regular]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Prepare sub repo
run: |
git clone --depth 1 --branch v2.39.3 ${{ secrets.SOURCE_REPO }}/util-linux/util-linux.git ./util-linux
git clone ${{ secrets.SOURCE_REPO }}/lvmteam/lvm2.git ./lvm2
cd ./lvm2
git checkout d786a8f820d54ce87a919e6af5426c333c173b11
cd ..
- name: Run Trivy vulnerability scanner in fs mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
trivy-config: trivy.yaml
1 change: 1 addition & 0 deletions images/agent/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{- $_ := set . "BASE_ALT_DEV" "registry.deckhouse.ru/base_images/dev-alt:p10@sha256:76e6e163fa982f03468166203488b569e6d9fc10855d6a259c662706436cdcad" }}

{{ $binaries := "/opt/deckhouse/sds/lib/libblkid.so.1 /opt/deckhouse/sds/lib/libmount.so.1 /opt/deckhouse/sds/lib/libsmartcols.so.1 /opt/deckhouse/sds/bin/nsenter.static /opt/deckhouse/sds/lib/x86_64-linux-gnu/libudev.so.1 /opt/deckhouse/sds/lib/x86_64-linux-gnu/libcap.so.2 ld-linux-x86-64.so.2 /opt/deckhouse/sds/bin/lsblk.dynamic" }}
# While changing tag, you MUST change it in .github/workflows/trivy_check.yaml
{{ $util_linux_version := "2.39.3" }}
---
image: {{ $.ImageName }}-binaries-artifact
Expand Down
1 change: 1 addition & 0 deletions images/sds-utils-installer/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{- $_ := set . "BASE_ALT_DEV" "registry.deckhouse.ru/base_images/dev-alt:p10@sha256:76e6e163fa982f03468166203488b569e6d9fc10855d6a259c662706436cdcad" }}

{{ $binaries := "/sds-utils/bin/lvm.static" }}
# While changing tag, you MUST change it in .github/workflows/trivy_check.yaml
{{ $lvm_version := "d786a8f820d54ce87a919e6af5426c333c173b11" }}
---
image: {{ $.ImageName }}-binaries-artifact
Expand Down

0 comments on commit b756ab5

Please sign in to comment.