Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

### Added
- Webhook proxy security enhancements ([#1398](https://github.com/opendevstack/ods-core/pull/1398/))

### Changed

Expand Down
12 changes: 11 additions & 1 deletion jenkins/ocp-config/deploy/jenkins-webhook-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ parameters:
- name: MAX_DELETION_CHECKS
value: '10'
required: true
- name: ALLOWED_WEBHOOK_IP_RANGES
description: >-
Comma-separated list of allowed source IP addresses or CIDR ranges for
incoming webhook requests (e.g. "185.166.140.0/22,10.0.0.1").
Leave empty to allow all source IPs.
value: ''
required: true
- name: WEBHOOK_PROXY_CPU_REQUEST
value: 25m
- name: WEBHOOK_PROXY_CPU_LIMIT
Expand Down Expand Up @@ -103,6 +110,8 @@ objects:
value: ${OPENSHIFT_APPS_BASEDOMAIN}
- name: MAX_DELETION_CHECKS
value: ${MAX_DELETION_CHECKS}
- name: ALLOWED_WEBHOOK_IP_RANGES
value: ${ALLOWED_WEBHOOK_IP_RANGES}
- name: TRIGGER_SECRET
valueFrom:
secretKeyRef:
Expand All @@ -123,7 +132,8 @@ objects:
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
securityContext:
runAsNonRoot: true
serviceAccount: '${JENKINS_SERVICE_NAME}'
serviceAccountName: '${JENKINS_SERVICE_NAME}'
terminationGracePeriodSeconds: 30
Expand Down
1 change: 1 addition & 0 deletions jenkins/webhook-proxy/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
webhook-proxy_linux_amd64
webhook-proxy_darwin_amd64
webhook-proxy_windows_amd64.exe
local/
4 changes: 3 additions & 1 deletion jenkins/webhook-proxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKDIR /home/webhook-proxy
RUN CGO_ENABLED=0 go build -o webhook-proxy

# Final stage
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
FROM registry.access.redhat.com/ubi9/ubi-micro@sha256:35de56a9413112f1474e392ebc35e0cf6f0fb484c8e8877bbae59b513694b41f

# Set default ALLOWED_EXTERNAL_PROJECTS env var
ARG allowedExternalProjects=opendevstack
Expand All @@ -29,6 +29,8 @@ COPY pipeline.json.tmpl /home/webhook-proxy/pipeline.json.tmpl

WORKDIR /home/webhook-proxy

USER 1001

EXPOSE 8080

CMD ./webhook-proxy
Loading
Loading