Skip to content

Templating 8.2 - #506

Merged
Peter-Sh merged 158 commits into
release/8.2from
templating_8.2
Jan 26, 2026
Merged

Templating 8.2#506
Peter-Sh merged 158 commits into
release/8.2from
templating_8.2

Conversation

@Peter-Sh

@Peter-Sh Peter-Sh commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

This includes all workflow changes from unstable, fixes and templating from #503 for release/8.2

adamiBs and others added 30 commits June 5, 2025 10:11
- Remove SHA verification because we are using changing code
- Change modules' version to `master`
- Change job's name
- Enable dispatch run
- Disable push step
- Adding a step of analyzing build failures
- Capture logs and upload for only failed builds
- Make sure checkout is only for 'unstable' branch
- Make the workflow callable
)

This commit consolidates multiple improvements to the Redis Docker library:

**Major Infrastructure Changes:**
- Restructure repository by moving legacy templating scripts to dedicated directory
- Add new simplified Dockerfile structure for Alpine and Debian variants
- Introduce comprehensive entrypoint testing framework with shunit2

**Docker Image Improvements:**
- Bump Alpine base image from 3.21 to 3.22
- Add support for Rust compilation with clang-static, llvm-dev, ncurses-dev packages
- Set RUST_DYN_CRT=1 environment variable for dynamic runtime linking
- Fix file permissions for Redis configuration files
- Preserve apk package management tools in final image
- Use setpriv instead of gosu for privilege dropping in entrypoint
- Improve entrypoint script robustness and remove eval usage

**CI/CD Enhancements:**
- Add GitHub Actions workflow for pre-merge testing
- Implement ARM64 support in build and test actions
- Configure fail-fast: false for better parallel testing
- Fix PR workflow to test merge commits instead of head commits
- Add callable workflow options for flexibility

**Testing & Quality:**
- Introduce comprehensive entrypoint testing suite
- Add container initialization wait logic
- Implement version-specific test cases for unstable builds
- Add .dockerignore for optimized build context

**Version Management:**
- Cherry-pick Redis 8.2 M01 improvements while maintaining unstable branch builds
- Ensure compatibility with Redis 8.0+ features
- Maintain backward compatibility with existing configurations
…llvm/llvm-dev on alpine; add llvm llvm-dev libclang-dev on debian; export LLVM_CONFIG_PATH/LIBCLANG_PATH) (#470)
…conditional in Alpine (#471)

* alpine,debian: avoid test modules race on non-module arches by -j1; alpine: call pip only when BUILD_WITH_MODULES=yes (use python3 -m pip)

* alpine: pip installs under modules use --break-system-packages (PEP 668); no change to job parallelism
Release automation fixes from downstream branches
Get rid of regexp and use structured json from each image
This is how it's expected to be called
Peter-Sh and others added 26 commits January 13, 2026 17:32
Flexible slack messaging and some release process modifications
Make REDIS_DOWNLOAD_SHA conditionally required
Installing clang that way hasn't been accepted by docker team as the
apt source is nightly
This PR is intended to fix issues raised by the Docker team: docker-library/official-images#20699 (comment)
Templating for Dockerfiles

To enable custom builds, I introduced Dockerfile templating based on Jinja2. Since we already have a Python-based release-automation tool, this was implemented as a new render-dockerfile command.
Major changes:

    Redis versions are now declared in the .redis.version.json file, which is used as context for the templates
    Added Dockerfile.j2 templates for each distribution
    custom_build is no longer used as a Dockerfile ARG, but only as a Jinja2 template variable that enables certain sections in the Dockerfile
    Introduced an action that validates all Dockerfiles are in sync with their corresponding templates (with custom_build=false)
    Simplified the "apply docker version" action to use templating for updating Redis versions during releases
    Added ./bin/render-all-dockerfiles.sh script to help render all templates in various places

clang-21 issue

Reverted clang-21 source and installation, as there is no reliable way to install the latest version on Trixie.
@jit-ci

jit-ci Bot commented Jan 26, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

🚨 Summary

• Multiple shell injection vulnerabilities detected in GitHub Actions workflows

• High severity issues found in critical CI/CD pipeline components

• Potential for unauthorized code execution and secret exposure

🔍 Findings

HIGH - 4 findings HIGH
1. Shell Injection in GitHub Actions Workflow
ID Type Finding File Severity
9307e98b71 yaml.github-actions.security.run-shell-injection.run-shell-injection Shell Injection in GitHub Actions Workflow - Variable interpolation with github context data in a run step could allow code injection. This may lead to unauthorized access to secrets and code. .github/actions/create-image-labels/action.yml (lines 39-57) HIGH

🔍 AI Analysis: This vulnerability is in a GitHub Actions workflow, which is a critical part of the CI/CD pipeline and could lead to unauthorized code execution.

Remediation:

- run: |
-   get_module_version() {
-     local module="$1"
-     grep MODULE_VERSIO
+ env:
+   MODULE_NAME: ${{ inputs.module_name }}
+ run: |
+   get_module_version() {
+     local module="$MODULE_NAME"
+     grep MODULE_VERSIO
2. Shell Injection in Build and Tag Action
ID Type Finding File Severity
6b680ea40c yaml.github-actions.security.run-shell-injection.run-shell-injection Shell Injection in Build and Tag Action - Unsafe use of github context data in a run step could allow code injection. This may compromise the build process and expose sensitive information. .github/actions/build-and-tag-locally/action.yml (lines 158-196) HIGH

🔍 AI Analysis: This vulnerability is in a critical build and tag action, which could lead to compromised builds and potential exposure of sensitive build information.

Remediation:

- run: |
-   mkdir -p /tmp/build-logs
-   echo "Build failed for ${{ inputs.distributio
+ env:
+   DISTRIBUTION: ${{ inputs.distribution }}
+   PLATFORM: ${{ inputs.platform }}
+ run: |
+   mkdir -p /tmp/build-logs
+   echo "Build failed for $DISTRIBUTION on $PLATFORM"
3. Shell Injection in Release Publish Workflow
ID Type Finding File Severity
ea580111cb yaml.github-actions.security.run-shell-injection.run-shell-injection Shell Injection in Release Publish Workflow - Unsafe use of github context data in a run step could allow code injection. This may compromise the release process and expose sensitive release information. .github/workflows/release_publish.yml (lines 209-231) HIGH

🔍 AI Analysis: This vulnerability is in the release publish workflow, which is a critical part of the software delivery process and could lead to compromised releases.

Remediation:

- run: |
-   # Create release_info.json with all fields, then filter out empty ones
+ env:
+   GITHUB_REF: ${{ github.ref }}
+   GITHUB_SHA: ${{ github.sha }}
+ run: |
+   # Create release_info.json with all fields, then filter out empty ones
+   # Use $GITHUB_REF and $GITHUB_SHA instead of direct github context
4. Shell Injection in Build and Tag Action (Format Registry Tag)
ID Type Finding File Severity
53fe71bffb yaml.github-actions.security.run-shell-injection.run-shell-injection Shell Injection in Build and Tag Action (Format Registry Tag) - Unsafe use of github context data in a run step could allow code injection. This may compromise the image tagging process and lead to incorrectly tagged images. .github/actions/build-and-tag-locally/action.yml (lines 339-358) HIGH

🔍 AI Analysis: This vulnerability is in the image tagging process, which is crucial for proper image identification and could lead to misidentified or compromised images if exploited.

Remediation:

- run: |
-   if [[ "${{ inputs.run_type }}" == "release" ]]; then
-     tag_prefix="${{ 
+ env:
+   RUN_TYPE: ${{ inputs.run_type }}
+   RELEASE_TAG: ${{ inputs.release_tag }}
+ run: |
+   if [[ "$RUN_TYPE" == "release" ]]; then
+     tag_prefix="$RELEASE_TAG"

▶️ Advanced Options

Help section with supported ignore actions and syntax.

Need to ignore a finding? Use commands like:

@sera ignore <finding_id> reason:accepted (reason is optional)

@sera ignore all reason:other - this is a test PR (reason is optional)

@sera ignore type:run-shell-injection


Security scan by Jit

@Peter-Sh
Peter-Sh merged commit 8795204 into release/8.2 Jan 26, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants