File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 7272 with :
7373 python-version : " 3.10"
7474 - uses : pre-commit/action@v3.0.1
75+
76+ trivy-scan :
77+ runs-on : ubuntu-latest
78+ name : " Run trivy scanner to detect CVEs in docker image"
79+
80+ steps :
81+ - name : Checkout code
82+ uses : actions/checkout@v4
83+
84+ - name : Set up Docker Buildx
85+ uses : docker/setup-buildx-action@v3
86+
87+ - name : Build Docker image
88+ run : |
89+ docker build -t snmp_local:ci .
90+
91+ - name : Scan image with Trivy
92+ uses : aquasecurity/trivy-action@master
93+ with :
94+ image-ref : snmp_local:ci
95+ format : table
96+ exit-code : 1
97+ severity : ' CRITICAL,HIGH,MEDIUM,LOW'
98+
7599 test-unit :
76100 name : Test Unit Python ${{ matrix.python-version }}
77101 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ FROM python:3.10-alpine AS base
33ENV PYTHONFAULTHANDLER=1 \
44 PYTHONHASHSEED=random \
55 PYTHONUNBUFFERED=1
6- RUN apk add -U git
6+ RUN apk add -U git sqlite-dev
7+ RUN pip install --upgrade setuptools pip
78RUN mkdir /app
89WORKDIR /app
910
You can’t perform that action at this time.
0 commit comments