From fb4ce7515411169a518100e3db911dc4800f1513 Mon Sep 17 00:00:00 2001 From: Shay Berman Date: Mon, 23 Nov 2026 00:03:00 +0200 Subject: [PATCH 1/3] Add ingress-nginx security backport skill --- docs/README.skills.md | 1 + .../ingress-nginx-security-backport/SKILL.md | 256 ++++++++++++++++++ .../references/integration-tests.md | 100 +++++++ 3 files changed, 357 insertions(+) create mode 100644 skills/ingress-nginx-security-backport/SKILL.md create mode 100644 skills/ingress-nginx-security-backport/references/integration-tests.md diff --git a/docs/README.skills.md b/docs/README.skills.md index a2c01346b5..33cb6f0c77 100644 --- a/docs/README.skills.md +++ b/docs/README.skills.md @@ -251,6 +251,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-skills) for guidelines on how to | [impediment-prioritization](../skills/impediment-prioritization/SKILL.md)
`gh skills install github/awesome-copilot impediment-prioritization` | Ranks any list of impediments and their countermeasures using a value-stream scoring model (ROI, Cost to Implement, Ease of Deployment, Risk Factor) and a fixed prioritization formula. Use when someone asks to prioritize, rank, sequence, or triage impediments, countermeasures, remediation items, risks, findings, gaps, action items, or backlog entries; or mentions value-stream prioritization, A3 / lean countermeasure ranking, ROI vs. effort scoring, or building a remediation / improvement backlog. Works with GHQR findings, audit results, retrospective action items, risk registers, architecture review gaps, or any free-form `{impediment, countermeasure}` list. | `references/scoring-rubric.md` | | [import-infrastructure-as-code](../skills/import-infrastructure-as-code/SKILL.md)
`gh skills install github/awesome-copilot import-infrastructure-as-code` | Import existing Azure resources into Terraform using Azure CLI discovery and Azure Verified Modules (AVM). Use when asked to reverse-engineer live Azure infrastructure, generate Infrastructure as Code from existing subscriptions/resource groups/resource IDs, map dependencies, derive exact import addresses from downloaded module source, prevent configuration drift, and produce AVM-based Terraform files ready for validation and planning across any Azure resource type. | None | | [incident-postmortem](../skills/incident-postmortem/SKILL.md)
`gh skills install github/awesome-copilot incident-postmortem` | Use when an outage, production incident, or significant service degradation has occurred and the team needs a blameless post-mortem / RCA document in the Google SRE format. Triggers on phrases like "write a post-mortem", "incident review", "what went wrong", "outage report", "root cause analysis", "RCA", or "fishbone". Collects incident inputs from the user, uses a fishbone (Ishikawa) diagram to surface candidate causes, drills the strongest branches with 5 Whys, and produces typed action items. Outputs Markdown by default, with HTML, DOCX, or PDF on request. | `references/fishbone-example.md`
`references/postmortem-template.md` | +| [ingress-nginx-security-backport](../skills/ingress-nginx-security-backport/SKILL.md)
`gh skills install github/awesome-copilot 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. | `references/integration-tests.md` | | [integrate-context-matic](../skills/integrate-context-matic/SKILL.md)
`gh skills install github/awesome-copilot integrate-context-matic` | Discovers and integrates third-party APIs using the context-matic MCP server. Uses `fetch_api` to find available API SDKs, `ask` for integration guidance, `model_search` and `endpoint_search` for SDK details. Use when the user asks to integrate a third-party API, add an API client, implement features with an external API, or work with any third-party API or SDK. | None | | [issue-fields-migration](../skills/issue-fields-migration/SKILL.md)
`gh skills install github/awesome-copilot issue-fields-migration` | Bulk-migrate metadata to GitHub issue fields from two sources: repo labels (e.g. priority labels to a Priority field) and Project V2 fields. Use when users say "migrate my labels to issue fields", "migrate project fields to issue fields", "convert labels to issue fields", "copy project field values to issue fields", or ask about adopting issue fields. Issue fields are org-level typed metadata (single select, text, number, date) that replace label-based workarounds with structured, searchable, cross-repo fields. | `references/issue-fields-api.md`
`references/labels-api.md`
`references/projects-api.md` | | [java-add-graalvm-native-image-support](../skills/java-add-graalvm-native-image-support/SKILL.md)
`gh skills install github/awesome-copilot java-add-graalvm-native-image-support` | GraalVM Native Image skill for Spring Boot, Micronaut and plain Java: detects the build tool and framework, adds native image support, builds the executable, analyzes errors, and iterates until the native build succeeds and the binary runs correctly. For Quarkus projects it only dispatches to the quarkus-native-and-container skill. | `references/build-tools.md`
`references/micronaut.md`
`references/quarkus.md`
`references/reachability-metadata.md`
`references/spring-boot.md`
`references/troubleshooting.md` | diff --git a/skills/ingress-nginx-security-backport/SKILL.md b/skills/ingress-nginx-security-backport/SKILL.md new file mode 100644 index 0000000000..c51ea03d5b --- /dev/null +++ b/skills/ingress-nginx-security-backport/SKILL.md @@ -0,0 +1,256 @@ +--- +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: + +- **Which ingress-nginx controller version do you want to mitigate?** Link to + the [upstream releases](https://github.com/kubernetes/ingress-nginx/releases). + Accept a release, release URL, or current image tag/digest. +- **Which CVE or security advisory should this address?** Accept identifiers or + advisory links; resolve ambiguous vulnerability names before applying fixes. +- **Where should the maintained repository and PR live?** Discover a suitable + 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](https://github.com/kubernetes/ingress-nginx/releases/tag/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](https://github.com/kubernetes/ingress-nginx). + The upstream repository is retired/archived; target the user's maintained + repository for the PR, not the archived upstream. +2. 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. +3. 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. +4. 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. +5. 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](https://nginx.org/en/security_advisories.html), +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: + +- **Controller or Go dependency:** cherry-pick an applicable upstream commit + with source attribution (for example `git cherry-pick -x`), or make the + equivalent minimal dependency/source change. Rebuild affected executables. +- **NGINX core or module:** vendor the upstream patch with its source URL and + 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. +- **OS package or library:** select a fixed package revision/base digest and + 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 + +- Discover the selected release's build layout. For v1.11.5, the NGINX builder + 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`. Adapt paths for other releases. +- Before building, compare every source version, checksum, base, module and + 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. +- Resolve the source revision that produced the release's pinned NGINX base; + 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. +- Verify source archives against published checksums/signatures. Pin source + 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. +- Choose one recipe and use it for CI and delivery. For an NGINX-only fix, stock + 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. +- Build each requested platform, use a distinct backport tag, and compare stock + and patched executables, modules, package manifests and OCI configuration. + Explain unrelated changes rather than expanding the fix silently. +- Retain the tested image as a CI artifact (for example an OCI archive), with + 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](references/integration-tests.md) 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. +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 job or an earlier commit's green run is not passing evidence. +For a permissions, unavailable-runner, or missing-fix blocker, retain the PR and +report the exact next action instead of retrying indefinitely or claiming success. + +## Optional publication and deployment verification + +When publication is in scope, publish the same retained image, resolve its index +and platform manifest digests, independently pull it by digest, and verify its +executables/modules against CI. Attach provenance linking the digest to source, +patch hashes, platform and CI run. Rebuilding creates a new artifact: rerun the +required affected source, behavioral, identity and integration checks against +that replacement before promotion. A hash check alone cannot transfer the +previous artifact's verdict to different bytes. + +When live verification is requested, discover the user's cluster/context, +namespace, ingress classes and endpoint; never assume a provider or environment. +Use permitted read-only APIs to check desired pins, rollout status and **every +serving replica's** platform image ID, including old replicas still serving. +Probe ordinary traffic through the intended endpoint and observe readiness and +restarts. Follow the environment's access rules; in-pod commands are not required +to establish deployment identity. Keep this result separate from CI evidence. + +## Finish with a confidence summary + +Always provide a summary, including on failure or a partial run: + +- Selected controller release/link, bundled NGINX, CVEs and applicability. +- Maintained repository, base/fix branches, PR link(s), and tested revision. +- Upstream fixes and any adaptations or unrelated dependency changes. +- Build recipe, tested Kubernetes/platform/protocol matrix, and CI run links. +- Image artifact URL/checksum; registry/index/platform digests only if published + and verified. State explicitly if no retrievable image was retained. +- A per-CVE evidence table: **check | PASS / FAIL / NOT RUN / NOT APPLICABLE | + exact revision or artifact | evidence link | limitation**. Explain every + exclusion and distinguish source inclusion, behavioral regression, final-image + identity, integration compatibility, publication and live deployment. +- Separate confidence statements for the CI artifact and any published or live + artifact, followed by one recommended next action. Headline the requested + deliverable's status; a verified CI image cannot make an untested published + replacement verified. + +Use **verified for the tested scope** only when all required checks for each +claimed CVE and target passed on the same artifact. Use **partially verified** +when evidence exists but required checks are missing, and **not verified** when +the fix cannot be established or a required check fails. List failures even if +other stages passed. NOT APPLICABLE needs evidence of inapplicability; an absent +or difficult behavioral test is NOT RUN, never NOT APPLICABLE. An +extracted-expression test supports only that expression; normal traffic alone +does not prove CVE mitigation. Optional publication/live +checks may be NOT RUN without invalidating a clearly limited CI-only result. +Do not give an unsupported percentage, imply all vulnerabilities are fixed, or +claim that a custom backport restores upstream support for the retired project. + +## Example outcome + +The final response can use this compact public-safe shape (replace every example +value and link with the run's real evidence): + +> **Partially verified — controller-v1.11.4 CI artifact** +> +> - Target: [controller-v1.11.4](https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.11.4), +> bundled NGINX 1.25.5, Linux/amd64, Kubernetes v1.30 fixture. +> - Repository: `example-org/ingress-nginx-maintained`; base +> `maintenance/controller-v1.11.4`; [fix and test PR](https://github.com/example-org/ingress-nginx-maintained/pull/42). +> - Build: the selected release's native NGINX builder plus the exact final +> controller image; [successful CI run](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789). +> - Retained artifact: `controller-v1.11.4-backport-amd64.tar.gz`, SHA-256 +> `0123456789abcdef...`, retained for 14 days. No registry image was published. +> +> | CVE | Source/fix evidence | Behavioral evidence | Result | +> | --- | --- | --- | --- | +> | CVE-2026-123007 | ordered patch and reverse control passed | focused regression plus final-image HTTP/2 and Ingress tests passed | PASS for tested scope | +> | CVE-2026-123634 | ordered patches and final-image identity passed | resolver/subrequest reproducer not run | NOT RUN; partial only | +> | CVE-2026-113425 | mail module absent from the recorded build flags | not required | NOT APPLICABLE | +> +> Confidence: the retained CI artifact contains the recorded fixes and passed +> the stated amd64/Kubernetes/HTTP/2 tests. Resolver behavior, other CPU +> architectures, registry publication and live deployment remain unverified. +> The Linux kernel portion of a broader advisory is outside this image backport. +> Next: add the missing resolver regression before publication. diff --git a/skills/ingress-nginx-security-backport/references/integration-tests.md b/skills/ingress-nginx-security-backport/references/integration-tests.md new file mode 100644 index 0000000000..654b59ca36 --- /dev/null +++ b/skills/ingress-nginx-security-backport/references/integration-tests.md @@ -0,0 +1,100 @@ +# Integration test recipe + +Use this recipe when implementing a backport PR's CI. It is a specification for +tests to add or adapt in the maintained repository, not a claim that those tests +have already run. It requires only the selected source, public upstream fixes, +and a disposable CI runner; no existing private workflow is a prerequisite. + +## CI inputs and execution + +Commit the backport manifest and test helpers alongside a workflow such as +`.github/workflows/security-backport.yml`. Read versions and pins from that +manifest rather than duplicating a previous example's constants. Inputs include +the release/source commit, CVE-to-patch mappings, source checksums, image/base +digests, build mode, platform matrix, Kubernetes node-image pins, and required +protocols/modules. Reuse the selected release's native build scripts. + +Run on PR changes to the manifest, patches, builder, controller/helpers, image +Dockerfiles, dependency pins, chart, workflow and test helpers. Use explicit +timeouts and cleanup, pinned Actions/tool versions, minimal permissions, and +isolated GitHub Actions runners with Docker. PR validation must work without +registry push credentials or live-cluster access. Do not run untrusted PR code +with privileged credentials through `pull_request_target`. + +Check for required tools (Docker, compiler, Python, kind, Helm, kubectl, OpenSSL, +and an HTTP/2-capable client); install verified versions when absent. Match the +test platform to the image and declare native versus emulated execution. Select +kind node images compatible with the requested Kubernetes/platform matrix. If a +target cannot run, report the missing coverage rather than marking it passed. + +## Required evidence + +| Check | Implementation and pass condition | +| --- | --- | +| Pristine source / negative control | Verify the source archive checksum/signature. For each patch, show that the forward check succeeds and the reverse check fails on its actual pre-patch state. Reconstruct prerequisite patches when needed; an already-patched baseline invalidates the control. | +| Patch in native builder | Apply patches before compilation, failing immediately on errors. Check the source used by the actual compiler, not an unrelated checkout. Verify each patch at the correct stage; later patches may overlap, requiring intermediate reverse checks or equivalent source assertions. Capture source/patch hashes and build logs. | +| CVE-specific behavioral regression | Run the same fixed-behavior expectation on equivalent baseline and patched production code. The baseline must fail for the intended vulnerability condition and the patched code pass, while normal/boundary cases remain valid. Build/startup failure is not a successful negative control. Keep any malformed-input fixture confined to the disposable environment. | +| Final-image identity | Hash the resolved rebuilt executable and affected modules in the native builder and completed controller image for each platform. Require equality. For reused controller/helpers, compare against the exact stock platform image; for rebuilt ones, compare against their builder outputs. For package fixes, verify installed revisions and resolved libraries. | +| Final-image smoke | Run `nginx -t` with the shipped modules and exercise the packaged binary over TLS. Start the controller and require at least one generated-configuration load/reload so duplicate static/dynamic modules and template incompatibilities fail. Assert negotiated protocol and application result; an HTTP/1.1 fallback must fail an HTTP/2 test. Add a real gRPC backend/client and require successful RPC status when gRPC is in scope. | +| Kubernetes ingress integration | Load the exact tested image into a disposable kind cluster, install the selected chart, create a real TLS Ingress and observable backend, and verify the protocol, routing, rewrites and expected error behavior described below. | + +For a controller/dependency fix, replace NGINX-specific source checks with the +affected controller code and its native tests. For a package fix, use package +provenance plus the affected runtime/library check. Each CVE needs its own +evidence or an explained NOT APPLICABLE result; one regression does not cover +every CVE in a patch series. If a safe meaningful regression is unavailable, +retain the source/build checks and mark behavioral coverage NOT RUN. Test +difficulty is not evidence of inapplicability. + +An extracted-expression fixture can be useful: extract the actual predicate +from baseline and patched source, compile it in a small harness, and check +normal, boundary and rejected cases. Do not rewrite the intended predicate in +the test. Label this as expression-level evidence, not proof of parser, state +machine, concurrency, memory-lifetime or full network behavior. Use the real +production function or an upstream regression test where practical. + +## Kubernetes fixture + +1. Create a unique lowercase cluster name and isolated kubeconfig. Pin the kind + node image by version and digest. Register cleanup and failure-log collection. +2. Load the built controller image and ensure the Helm values select it rather + than a default upstream digest. Use `imagePullPolicy: Never` for a locally + loaded fixture image; verify the running image identity before probing. Read + the test tag from the manifest and make it valid for the selected chart's + tag validation (older charts may reject a generic non-semantic `ci` tag). +3. Deploy an echo backend that returns the received request URI. Generate a + short-lived TLS certificate for a synthetic hostname such as + `smoke.example.test`, and use that certificate as the client's trust anchor. +4. Add a TLS Ingress rewriting `/api/(.*)` to `/$1`. Require + `/api/healthz?probe=1` to negotiate HTTP/2, return `200`, and expose exactly + `/healthz?probe=1` from the backend. Require `/missing` to return `404` over + HTTP/2. Check the negotiated protocol explicitly on both requests. +5. Add target-relevant coverage: actual gRPC requests, required modules, + annotations, configuration reloads, and admission validation when implicated. + If a minimal fixture disables admission webhooks, disclose that exclusion; + it cannot validate an admission-related CVE. +6. Wait for readiness with bounded retries, detect unexpected controller + restarts, collect failure diagnostics, and remove disposable resources on + exit. Port-forwarding may be used inside this isolated CI fixture; it does + not establish external load-balancer or live-environment correctness. + +These HTTP/2 route checks are a reusable compatibility baseline. They do not +replace the CVE-specific regression or establish that every feature of an older +controller works on the selected Kubernetes minor. + +## Retained evidence and job results + +Upload the tested image archive, its checksum, the backport manifest, per-platform +executable/module hashes, sanitized logs and per-CVE results. Give artifacts +explicit retention and retrieval links; preserve useful diagnostics on failure. +Write archive checksum entries relative to the artifact's downloaded extraction +root (normally the archive basename), then verify `sha256sum -c` works after a +round-trip upload and download rather than only inside the runner workspace. +Record which jobs were required and which were skipped. Keep report generation +from turning a failed verification job into a green result. + +Tie evidence to the actual checked-out commit and final PR head. If the PR's +merge revision was tested, record both the head and merge revision. Any change +to the patch, build inputs, or tests requires the affected checks to run again. +Publication must consume this tested artifact or retest a rebuilt replacement; +an independent release build cannot inherit this workflow's verdict. From 13e82fcc8c998773f7a89feb6b6b9f6838ce4710 Mon Sep 17 00:00:00 2001 From: Shay Berman Date: Wed, 25 Nov 2026 09:17:29 +0200 Subject: [PATCH 2/3] Cover source-built libraries and verify complete platform images --- skills/ingress-nginx-security-backport/SKILL.md | 11 ++++++++--- .../references/integration-tests.md | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/skills/ingress-nginx-security-backport/SKILL.md b/skills/ingress-nginx-security-backport/SKILL.md index c51ea03d5b..6488e36d97 100644 --- a/skills/ingress-nginx-security-backport/SKILL.md +++ b/skills/ingress-nginx-security-backport/SKILL.md @@ -96,7 +96,10 @@ Choose the correct backport mechanism: 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. -- **OS package or library:** select a fixed package revision/base digest and +- **Source-built native library** (for example LuaJIT under `/usr/local`): + patch its pinned source, rebuild the library and affected consumers, and + verify the final image uses those builder outputs on each target platform. +- **OS-managed package or library:** select a fixed package revision/base digest and verify the installed version and the library actually loaded by the process. Commit a small backport manifest with the controller/source/base pins, each @@ -181,8 +184,10 @@ report the exact next action instead of retrying indefinitely or claiming succes ## Optional publication and deployment verification When publication is in scope, publish the same retained image, resolve its index -and platform manifest digests, independently pull it by digest, and verify its -executables/modules against CI. Attach provenance linking the digest to source, +and platform manifest digests, then independently pull each platform by digest. +Compare its manifest digest to the retained OCI platform manifest digest. For +a Docker archive, compare the image config digest and ordered rootfs DiffIDs. +Any mismatch or missing identity evidence requires retesting the pulled image. Attach provenance linking the digest to source, patch hashes, platform and CI run. Rebuilding creates a new artifact: rerun the required affected source, behavioral, identity and integration checks against that replacement before promotion. A hash check alone cannot transfer the diff --git a/skills/ingress-nginx-security-backport/references/integration-tests.md b/skills/ingress-nginx-security-backport/references/integration-tests.md index 654b59ca36..690bf8a3c9 100644 --- a/skills/ingress-nginx-security-backport/references/integration-tests.md +++ b/skills/ingress-nginx-security-backport/references/integration-tests.md @@ -34,7 +34,7 @@ target cannot run, report the missing coverage rather than marking it passed. | Pristine source / negative control | Verify the source archive checksum/signature. For each patch, show that the forward check succeeds and the reverse check fails on its actual pre-patch state. Reconstruct prerequisite patches when needed; an already-patched baseline invalidates the control. | | Patch in native builder | Apply patches before compilation, failing immediately on errors. Check the source used by the actual compiler, not an unrelated checkout. Verify each patch at the correct stage; later patches may overlap, requiring intermediate reverse checks or equivalent source assertions. Capture source/patch hashes and build logs. | | CVE-specific behavioral regression | Run the same fixed-behavior expectation on equivalent baseline and patched production code. The baseline must fail for the intended vulnerability condition and the patched code pass, while normal/boundary cases remain valid. Build/startup failure is not a successful negative control. Keep any malformed-input fixture confined to the disposable environment. | -| Final-image identity | Hash the resolved rebuilt executable and affected modules in the native builder and completed controller image for each platform. Require equality. For reused controller/helpers, compare against the exact stock platform image; for rebuilt ones, compare against their builder outputs. For package fixes, verify installed revisions and resolved libraries. | +| Final-image identity | Hash the resolved rebuilt executable and affected modules in the native builder and completed controller image for each platform. Require equality. For reused controller/helpers, compare against the exact stock platform image; for rebuilt ones, compare against their builder outputs. For package fixes, verify installed revisions and resolved libraries. For source-built libraries, compare the library resolved by each dynamic consumer with its builder hash. For static linkage, verify the build used the patched library and compare the final consumer with its rebuilt output. | | Final-image smoke | Run `nginx -t` with the shipped modules and exercise the packaged binary over TLS. Start the controller and require at least one generated-configuration load/reload so duplicate static/dynamic modules and template incompatibilities fail. Assert negotiated protocol and application result; an HTTP/1.1 fallback must fail an HTTP/2 test. Add a real gRPC backend/client and require successful RPC status when gRPC is in scope. | | Kubernetes ingress integration | Load the exact tested image into a disposable kind cluster, install the selected chart, create a real TLS Ingress and observable backend, and verify the protocol, routing, rewrites and expected error behavior described below. | From 72a99897e528d35aa0981ea6f3a2c3090e78aa14 Mon Sep 17 00:00:00 2001 From: Shay Berman Date: Thu, 26 Nov 2026 08:58:21 +0200 Subject: [PATCH 3/3] Preserve chroot builds and document per-check evidence and CI inputs --- .../ingress-nginx-security-backport/SKILL.md | 32 ++++++++++++------- .../references/integration-tests.md | 5 ++- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/skills/ingress-nginx-security-backport/SKILL.md b/skills/ingress-nginx-security-backport/SKILL.md index 6488e36d97..b534b8b8c3 100644 --- a/skills/ingress-nginx-security-backport/SKILL.md +++ b/skills/ingress-nginx-security-backport/SKILL.md @@ -121,7 +121,12 @@ proof of the CVE fix. - Discover the selected release's build layout. For v1.11.5, the NGINX builder 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`. Adapt paths for other releases. + 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. - Before building, compare every source version, checksum, base, module and 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. @@ -248,14 +253,19 @@ value and link with the run's real evidence): > - Retained artifact: `controller-v1.11.4-backport-amd64.tar.gz`, SHA-256 > `0123456789abcdef...`, retained for 14 days. No registry image was published. > -> | CVE | Source/fix evidence | Behavioral evidence | Result | -> | --- | --- | --- | --- | -> | CVE-2026-123007 | ordered patch and reverse control passed | focused regression plus final-image HTTP/2 and Ingress tests passed | PASS for tested scope | -> | CVE-2026-123634 | ordered patches and final-image identity passed | resolver/subrequest reproducer not run | NOT RUN; partial only | -> | CVE-2026-113425 | mail module absent from the recorded build flags | not required | NOT APPLICABLE | +> For CVE-2026-123007, let **S** be the full tested Git commit and **I** +> the retained platform image config digest. Substitute both exact values +> and the corresponding job or artifact URLs in the completed report. > -> Confidence: the retained CI artifact contains the recorded fixes and passed -> the stated amd64/Kubernetes/HTTP/2 tests. Resolver behavior, other CPU -> architectures, registry publication and live deployment remain unverified. -> The Linux kernel portion of a broader advisory is outside this image backport. -> Next: add the missing resolver regression before publication. +> | Check | Result | Revision or artifact | Evidence link | Limitation | +> | --- | --- | --- | --- | --- | +> | Patch inclusion | PASS | S | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | Source only | +> | Behavioral regression | NOT RUN | S | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | No targeted regression was run | +> | Final-image binary identity | PASS | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | Linux/amd64 only | +> | TLS and HTTP/2 negotiation | PASS | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | Protocol compatibility only | +> | Ingress routing | PASS | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | One Kubernetes version | +> | Registry publication | NOT RUN | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | CI artifact only | +> | Live deployment | NOT RUN | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | No cluster rollout | +> +> Confidence: partially verified for the retained CI artifact. Run the missing +> behavioral check before claiming mitigation for this CVE. diff --git a/skills/ingress-nginx-security-backport/references/integration-tests.md b/skills/ingress-nginx-security-backport/references/integration-tests.md index 690bf8a3c9..2984cbf165 100644 --- a/skills/ingress-nginx-security-backport/references/integration-tests.md +++ b/skills/ingress-nginx-security-backport/references/integration-tests.md @@ -15,7 +15,10 @@ digests, build mode, platform matrix, Kubernetes node-image pins, and required protocols/modules. Reuse the selected release's native build scripts. Run on PR changes to the manifest, patches, builder, controller/helpers, image -Dockerfiles, dependency pins, chart, workflow and test helpers. Use explicit +Dockerfiles, dependency pins, chart, workflow and test helpers. Include +`rootfs/**` (especially the template and Lua files under `rootfs/etc/**`) +and all other inputs copied or generated by the selected build. Run on every +PR when the complete input set cannot be established. Use explicit timeouts and cleanup, pinned Actions/tool versions, minimal permissions, and isolated GitHub Actions runners with Docker. PR validation must work without registry push credentials or live-cluster access. Do not run untrusted PR code