Skip to content

Commit 913ea72

Browse files
authored
Merge pull request #26 from paulbouwer/vuln-remediation-5Oct2021
Vuln remediation 5 Oct 2021
2 parents c82bd29 + 9af02b5 commit 913ea72

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

.devcontainer/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/s
6868
&& echo "source ~/completions/kubectl.bash" >> ~/.bashrc \
6969
&& echo "alias k=kubectl" >> ~/.bashrc \
7070
&& echo "complete -o default -F __start_kubectl k" >> ~/.bashrc
71+
72+
# Install trivy
73+
RUN mkdir /tmp/trivy \
74+
&& curl -L https://github.com/aquasecurity/trivy/releases/download/v0.19.2/trivy_0.19.2_Linux-64bit.tar.gz | tar xvz -C /tmp/trivy -f - contrib trivy \
75+
&& chmod +x /tmp/trivy/trivy \
76+
&& mv /tmp/trivy/trivy /usr/local/bin/trivy \
77+
&& mkdir -p /trivy/contrib \
78+
&& mv /tmp/trivy/contrib/* /trivy/contrib/
7179

7280
# Clean up
7381
RUN apt-get autoremove -y \

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ IMAGE_MAJOR_VERSION = $(shell echo "$(IMAGE_VERSION)" | cut -d '.' -f1 )
55
IMAGE_MINOR_VERSION = $(shell echo "$(IMAGE_VERSION)" | cut -d '.' -f2 )
66
IMAGE = $(REGISTRY)/$(REPOSITORY)/hello-kubernetes
77

8+
.PHONY: scan-for-vulns
9+
scan-for-vulns:
10+
trivy image --format template --template "@/trivy/contrib/sarif.tpl" $(IMAGE):$(IMAGE_VERSION)
11+
12+
.PHONY: build-images
13+
build-images: build-image-linux
14+
815
.PHONY: build-image-linux
916
build-image-linux:
1017
docker build --no-cache \

src/app/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:15-alpine
1+
FROM node:16-alpine3.13
22

33
ARG IMAGE_CREATE_DATE
44
ARG IMAGE_VERSION

src/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hello-kubernetes",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"description": "Hello Kubernetes!",
55
"author": "Paul Bouwer",
66
"license": "MIT",

0 commit comments

Comments
 (0)