Home / Market / ingress nginx security backport

ingress nginx security backport

Backport specific CVE fixes to a selected older Kubernetes ingress-nginx controller release, preparing a maintained fork and PR with a reproducible image build, CI integration tests, and an evidence-based confidence summary. Also use to verify an existing backport.

skill★ 417980 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

--- name: ingress-nginx-security-backport description: Backport specific CVE fixes to a selected older Kubernetes ingress-nginx controller release, preparing a maintained fork and PR with a reproducible image build, CI integration tests, and an evidence-based confidence summary. Also use to verify an existing backport.

---

Backport and verify an ingress-nginx security fix

Deliver a reviewable PR containing the fix, build recipe, and automated tests for the user's selected controller release. Preserve that version constraint. This skill is self-contained and uses public upstream sources; it requires no company environment, private repository, internal ticket, or particular cloud provider.

Explain the work and collect the target

Before making changes, explain the intended workflow in plain language:

> I will create or reuse a maintained fork of Kubernetes ingress-nginx, preserve > your selected controller version, backport the relevant CVE fixes, and open a > PR containing the fixes and automated tests. I will build the image and run > integration tests in GitHub Actions, then summarize the results, artifact > links, and the confidence supported by the evidence.

Ask these questions when the answers have not already been supplied:

the upstream releases. Accept a release, release URL, or current image tag/digest.

advisory links; resolve ambiguous vulnerability names before applying fixes.

existing fork from the workspace and authenticated account first; ask only when its owner or intended destination remains unclear.

Wait for missing release/CVE inputs before modifying a repository or starting a build. Continue only read-only discovery while those answers are pending.

Resolve and show the exact public controller release/tag link and commit, stock image digest and platforms, Helm chart version, and bundled NGINX version. For example, controller-v1.11.5 is a controller release, not an NGINX or chart version. If an image cannot be mapped to a source revision, report the gap before building. Do not silently select the latest release or treat the example as a default.

Discover the target Kubernetes minors, CPU architectures, modules and protocols from supplied configuration; ask for any missing inputs that change the test matrix. For an unspecified deployment target, propose an explicit fixture matrix and limit the resulting compatibility claim to it.

A request to perform the backport covers preparing the repository, PR and CI described above, subject to the user's existing authorization. Analysis stays read-only. For verify-only requests, inspect the existing artifact and evidence; do not create a fork/PR or change code unless requested. Publishing an image, merging a PR, and changing a live cluster are separate delivery stages: perform them only when included in the request.

Prepare the maintained repository and branch

  1. Verify the status and origin of kubernetes/ingress-nginx.

The upstream repository is retired/archived; target the user's maintained repository for the PR, not the archived upstream.

  1. Reuse an existing maintained fork or source mirror after checking its

upstream ancestry. Otherwise create a fork under the resolved owner using the available GitHub connector or CLI. Preserve upstream history, license notices, and the selected release's commit/tag; copying a source archive alone is not a full fork. A mirror is acceptable when native forking is unavailable, but identify it as such and record its upstream provenance.

  1. Work in an isolated checkout. Establish or reuse a maintenance branch based

on the selected release plus its already accepted backports. Create the fix branch from that base. Never reset an existing maintained branch to an older tag or target a newer default branch accidentally.

  1. Check for an existing PR for this release/CVE before creating another. Keep

fixes and their tests in one PR by default, with separate commits when useful for review. If a fix has already merged, add the tests in a linked follow-up PR rather than recreating the fix.

  1. When validating multiple controller releases, use a separate maintenance

branch and fix PR for each release. Re-derive every release-specific input: controller commit, bundled NGINX version and checksum, base image, modules, build context, patch set, Kubernetes fixture and architecture. Never copy a donor release's checksum or build pin merely because its patch logic applies.

Select and record the fix

Read the official advisory, for example the NGINX security advisories, and verify applicability against the shipped component, build flags and listener configuration. Keep Kubernetes ingress-nginx distinct from NGINX Gateway Fabric. Record each CVE's upstream fix commits, prerequisite commits, and applicability. If no compatible fix can be established, report NOT VERIFIED and explain available alternatives without replacing the requested version silently.

Choose the correct backport mechanism:

with source attribution (for example git cherry-pick -x), or make the equivalent minimal dependency/source change. Rebuild affected executables.

checksum, then apply it to the component's source during the native build. An NGINX commit cannot simply be cherry-picked into the ingress-nginx source tree. Rebuild NGINX and its coupled modules together.

patch its pinned source, rebuild the library and affected consumers, and verify the final image uses those builder outputs on each target platform.

verify the installed version and the library actually loaded by the process.

Commit a small backport manifest with the controller/source/base pins, each CVE-to-fix mapping, ordered patch hashes, prerequisites, adaptations, and target platforms. Compare vendored patches with their upstream bytes. Explain conflict resolutions and retain their upstream attribution. Apply the ordered series after existing patches, with forward checks before application and reverse checks (or equivalent source checks) on the appropriate resulting tree.

If an upstream patch does not apply because the selected older source has a different layout, make the smallest context or semantic adaptation required. Keep the upstream source link and authorship, record both the adapted hash and the reason for the change, and rerun the pristine-tree forward and reverse controls. Do not treat a successful adapted patch application as behavioral proof of the CVE fix.

Build and retain the exact artifact

is in images/nginx/rootfs; security patches must run in build.sh before configure/compile. Build the final controller from rootfs with that rebuilt base supplied as BASE_IMAGE. Match the selected release image variant: for controller-chroot, use the release's rootfs/Dockerfile-chroot, its chart chroot setting and matching security context. Record the stock variant digest and verify the rendered Pod settings and chroot isolation against that baseline in the integration fixture before delivery. Adapt paths for other releases.

toolchain pin with the untouched selected tag. A patch donor is evidence for the fix, not evidence that its release-specific build inputs fit the target.

it may differ from the controller tag (and may be encoded in the base image tag or provenance). Rebuild from that base-source revision, then apply the security overlay. Compare its static/dynamic module composition with the shipped controller image so a later branch's module changes are not imported.

commits, base images by digest, toolchains, and package inputs. Replace or account for floating downloads and apk upgrade; record remaining mutable inputs as reproducibility gaps, not as a reproducible build.

controller/helpers may be reused from the digest-pinned image for the same architecture. Alternatively rebuild them from the pinned source and toolchain. Record which path was used; tests of a rebuilt controller do not validate a different image assembled with stock executables.

and patched executables, modules, package manifests and OCI configuration. Explain unrelated changes rather than expanding the fix silently.

its checksum, commit, patch hashes, executable hashes and CI run URL. Record the artifact's retrieval URL and retention. An archive checksum or local image ID is not a registry manifest digest.

Add the tests, open the PR, and run CI

Read the integration test recipe and implement it in the maintained repository. The recipe includes the native-builder patch checks, baseline/patched regression, final-image binary comparison, TLS HTTP/2 smoke test, and real Kubernetes Ingress test. Adapt it to each selected CVE and target; do not retain a previous CVE, architecture or Kubernetes version as a hidden constant. Keep the workflow and test helpers with the fix in the PR. Record the effective runtime configuration and loaded modules in the disposable CI fixture as described in the recipe. Include any ConfigMap overrides and custom templates that affect the fix. Recheck the affected evidence when those inputs change, even if the image digest stays the same. Build the applicability matrix from the component version, compiled modules and deployed configuration. A module may be present but not exercised by the chosen fixture; report that CVE's behavioral check as NOT RUN. Do not credit an HTTP/2 or ordinary-traffic compatibility smoke test as resolver, HTTP/3, mail or other unrelated CVE-specific behavioral evidence.

Run applicable local static checks, then push and open/update the PR against the maintenance branch. Its description must explain the CVE and old-version constraint, upstream fixes, build recipe, test matrix, artifact handling and known gaps. Use public source links and sanitized evidence. Do not copy private endpoints, credentials, organization identifiers or incident records into the skill, generated fixtures, PR, or uploaded logs.

Trigger the PR workflow, or dispatch the workflow for the exact branch when available. A newly added dispatch workflow may need to exist on the repository's default branch first; prefer its PR trigger rather than merging just to run it. Run Docker/kind integration environments in GitHub Actions, not on the user's workstation. Inspect failures, fix the entire current batch, and rerun affected checks. Do not weaken a test or skip dependency review to obtain green CI.

Wait for the final revision's required jobs. Record the checked-out revision (including a synthetic PR merge revision when used), run URL and results. A skipped/cancelled