Skip to content

Commit

Permalink
Merge pull request #26 from paulbouwer/vuln-remediation-5Oct2021
Browse files Browse the repository at this point in the history
Vuln remediation 5 Oct 2021
  • Loading branch information
paulbouwer authored Oct 5, 2021
2 parents c82bd29 + 9af02b5 commit 913ea72
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/s
&& echo "source ~/completions/kubectl.bash" >> ~/.bashrc \
&& echo "alias k=kubectl" >> ~/.bashrc \
&& echo "complete -o default -F __start_kubectl k" >> ~/.bashrc

# Install trivy
RUN mkdir /tmp/trivy \
&& 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 \
&& chmod +x /tmp/trivy/trivy \
&& mv /tmp/trivy/trivy /usr/local/bin/trivy \
&& mkdir -p /trivy/contrib \
&& mv /tmp/trivy/contrib/* /trivy/contrib/

# Clean up
RUN apt-get autoremove -y \
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ IMAGE_MAJOR_VERSION = $(shell echo "$(IMAGE_VERSION)" | cut -d '.' -f1 )
IMAGE_MINOR_VERSION = $(shell echo "$(IMAGE_VERSION)" | cut -d '.' -f2 )
IMAGE = $(REGISTRY)/$(REPOSITORY)/hello-kubernetes

.PHONY: scan-for-vulns
scan-for-vulns:
trivy image --format template --template "@/trivy/contrib/sarif.tpl" $(IMAGE):$(IMAGE_VERSION)

.PHONY: build-images
build-images: build-image-linux

.PHONY: build-image-linux
build-image-linux:
docker build --no-cache \
Expand Down
2 changes: 1 addition & 1 deletion src/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:15-alpine
FROM node:16-alpine3.13

ARG IMAGE_CREATE_DATE
ARG IMAGE_VERSION
Expand Down
2 changes: 1 addition & 1 deletion src/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hello-kubernetes",
"version": "1.10.0",
"version": "1.10.1",
"description": "Hello Kubernetes!",
"author": "Paul Bouwer",
"license": "MIT",
Expand Down

0 comments on commit 913ea72

Please sign in to comment.