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
2 changes: 1 addition & 1 deletion addons/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ global:
dial_service:
registry: ghcr.io
repository: sunbird-knowlg/sunbird-dial-service
tag: "spark-v1.0.2_7d8f01b"
tag: "spark-v1.0.2-java4shell-test_b1d5711"

kong_api_scripts:
registry: ghcr.io
Expand Down
6 changes: 3 additions & 3 deletions helmcharts/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ images:
kafka: &kafka
registry: "docker.io"
repository: sanketikahub/kafka
tag: "4.0.0"
tag: "2.2.1"

redis: &redis
registry: "sunbirded.azurecr.io"
Expand All @@ -31,7 +31,7 @@ images:
opensearch: &opensearch
registry: "docker.io"
repository: "opensearchproject/opensearch"
tag: "2.19.5"
tag: "2.19.8"

alloy: &alloy
registry: "docker.io"
Expand Down Expand Up @@ -97,7 +97,7 @@ images:

keycloak: &keycloak
repository: "ghcr.io/sunbird-spark/keycloak-21.1.2"
tag: "spark-v1.1.2-test-pin-cli-versions_d0f3ef0"
tag: "spark-v1.1.3-java4shell-test_38ebaf3"

keycloak-kids-keys: &keycloak-kids-keys
repository: "ghcr.io/sunbird-spark/keycloak-postgres-query"
Expand Down
5 changes: 5 additions & 0 deletions scripts/keycloak-21.1.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@

# Stage 2: Create a patched base image using UBI 9 Minimal (pinned to a stable version)
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4@sha256:c0e70387664f30cd9cf2795b547e4a9a51002c44a4a86aa9335ab030134bf392 AS patched_base
USER root

Check warning on line 7 in scripts/keycloak-21.1.2/Dockerfile

View workflow job for this annotation

GitHub Actions / Dockerfile lint

Last USER should not be root

Check warning on line 7 in scripts/keycloak-21.1.2/Dockerfile

View workflow job for this annotation

GitHub Actions / Dockerfile lint

Last USER should not be root
# Fix OS vulnerabilities (glibc, java, etc.) and install Java 17
RUN microdnf update -y && \

Check warning on line 9 in scripts/keycloak-21.1.2/Dockerfile

View workflow job for this annotation

GitHub Actions / Dockerfile lint

Specify version with `dnf install -y <package>-<version>`.

Check warning on line 9 in scripts/keycloak-21.1.2/Dockerfile

View workflow job for this annotation

GitHub Actions / Dockerfile lint

Specify version with `dnf install -y <package>-<version>`.
microdnf install -y shadow-utils java-17-openjdk-headless && \
groupadd -g 1000 keycloak && \
useradd -u 1000 -g keycloak -m -d /opt/keycloak -s /sbin/nologin keycloak && \
microdnf remove -y shadow-utils && \
microdnf clean all

ARG MIN_JAVA_VERSION=17.0.21.1
RUN JAVA_VERSION_FOUND=$(java -XshowSettings:properties -version 2>&1 | sed -n 's/^ *java.version = //p') && \

Check warning on line 17 in scripts/keycloak-21.1.2/Dockerfile

View workflow job for this annotation

GitHub Actions / Dockerfile lint

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check warning on line 17 in scripts/keycloak-21.1.2/Dockerfile

View workflow job for this annotation

GitHub Actions / Dockerfile lint

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
printf '%s\n%s\n' "$MIN_JAVA_VERSION" "$JAVA_VERSION_FOUND" | sort -V -C || \
{ echo "Java $JAVA_VERSION_FOUND is older than $MIN_JAVA_VERSION (CVE-2026-114938)"; exit 1; }

# Stage 3: Final Image
FROM patched_base
COPY --from=source --chown=keycloak:keycloak /opt/keycloak/ /opt/keycloak/
Expand Down
Loading