Skip to content

Commit 9402ff2

Browse files
fix webhook plugin vulnerabilities - root user (#571)
1 parent 11f21de commit 9402ff2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

incubating/webhook/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM node:14.21.3-bullseye-slim
22

3+
34
#RUN apk add --no-cache bash git openssh-client
45

56
# Create app directory
@@ -15,5 +16,9 @@ RUN yarn install --frozen-lockfile --production
1516
# copy app files
1617
COPY . ./
1718

19+
RUN useradd -d /home/username -m -s /bin/bash codefresh
20+
21+
USER codefresh
22+
1823
# run application
1924
CMD ["node", "/app/index.js"]

incubating/webhook/step.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: webhook
55
title: Call a custom webhook
66
latest: true
7-
version: 0.0.12
7+
version: 0.0.13
88
isPublic: true
99
description: Notify any webook URL with any custom request body.
1010
sources:
@@ -70,7 +70,7 @@ spec:
7070
steps:
7171
main:
7272
name: webhook
73-
image: quay.io/codefreshplugins/webhook-plugin:0.0.12
73+
image: quay.io/codefreshplugins/webhook-plugin:0.0.13
7474
environment:
7575
- 'WEBHOOK_USERNAME=${{WEBHOOK_USERNAME}}'
7676
- 'WEBHOOK_PASSWORD=${{WEBHOOK_PASSWORD}}'

0 commit comments

Comments
 (0)