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

Add trivy fix vulnerability scan #92

Merged
merged 11 commits into from
Nov 6, 2024
Merged
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
26 changes: 26 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Run Trivy vulnerability scanner

on: [ push ]

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build wis2box-ui
run: |
docker build -t wis2box-ui:test .
- name: Run Trivy vulnerability scanner on wis2box-ui
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1
with:
image-ref: 'wis2box-ui:test'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
ignorefile: '.trivyignore'
2 changes: 2 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# not fixed in nginx, does not appear to be a security issue
CVE-2023-49462
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:14.18.1 as ui-builder
FROM node:23.1.0-slim as ui-builder

RUN mkdir /usr/src/app
RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list \
&& apt-get update \
&& apt-get upgrade \
&& apt-get -y update \
&& apt-get -y upgrade \
&& apt-get install -y chromium

ENV PATH /usr/src/app/node_modules/.bin:$PATH
Expand All @@ -13,7 +13,7 @@ COPY package.json /usr/src/app/package.json

WORKDIR /usr/src/app

RUN npm install && \
RUN npm install --legacy-peer-deps && \
npm install -g @vue/cli

COPY . /usr/src/app
Expand Down
Loading