Ingress-NGINX Security Backport

Ingress-NGINX Security Backport

Guides the AI to backport CVE fixes to an older ingress-nginx release, build the image, run CI integration tests and open a PR with an evidence-based confidence summary.

Skill files2 files

references/

SKILL.md282 lines
1
---
2
name: ingress-nginx-security-backport
3
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.
4
---
5
6
# Backport and verify an ingress-nginx security fix
7
8
Deliver a reviewable PR containing the fix, build recipe, and automated tests for
9
the user's selected controller release. Preserve that version constraint. This
10
skill is self-contained and uses public upstream sources; it requires no company
11
environment, private repository, internal ticket, or particular cloud provider.
12
13
## Explain the work and collect the target
14
15
Before making changes, explain the intended workflow in plain language:
16
17
> I will create or reuse a maintained fork of Kubernetes ingress-nginx, preserve
18
> your selected controller version, backport the relevant CVE fixes, and open a
19
> PR containing the fixes and automated tests. I will build the image and run
20
> integration tests in GitHub Actions, then summarize the results, artifact
21
> links, and the confidence supported by the evidence.
22
23
Ask these questions when the answers have not already been supplied:
24
25
- **Which ingress-nginx controller version do you want to mitigate?** Link to
26
the [upstream releases](https://github.com/kubernetes/ingress-nginx/releases).
27
Accept a release, release URL, or current image tag/digest.
28
- **Which CVE or security advisory should this address?** Accept identifiers or
29
advisory links; resolve ambiguous vulnerability names before applying fixes.
30
- **Where should the maintained repository and PR live?** Discover a suitable
31
existing fork from the workspace and authenticated account first; ask only
32
when its owner or intended destination remains unclear.
33
34
Wait for missing release/CVE inputs before modifying a repository or starting
35
a build. Continue only read-only discovery while those answers are pending.
36
37
Resolve and show the exact public controller release/tag link and commit, stock
38
image digest and platforms, Helm chart version, and bundled NGINX version. For
39
example, [controller-v1.11.5](https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.11.5)
40
is a controller release, not an NGINX or chart version. If an image cannot be
41
mapped to a source revision, report the gap before building. Do not silently
42
select the latest release or treat the example as a default.
43
44
Discover the target Kubernetes minors, CPU architectures, modules and protocols
45
from supplied configuration; ask for any missing inputs that change the test
46
matrix. For an unspecified deployment target, propose an explicit fixture
47
matrix and limit the resulting compatibility claim to it.
48
49
A request to perform the backport covers preparing the repository, PR and CI
50
described above, subject to the user's existing authorization. Analysis stays
51
read-only. For verify-only requests, inspect the existing artifact and evidence;
52
do not create a fork/PR or change code unless requested. Publishing an image,
53
merging a PR, and changing a live cluster are separate delivery stages: perform
54
them only when included in the request.
55
56
## Prepare the maintained repository and branch
57
58
1. Verify the status and origin of [kubernetes/ingress-nginx](https://github.com/kubernetes/ingress-nginx).
59
The upstream repository is retired/archived; target the user's maintained
60
repository for the PR, not the archived upstream.
61
2. Reuse an existing maintained fork or source mirror after checking its
62
upstream ancestry. Otherwise create a fork under the resolved owner using
63
the available GitHub connector or CLI. Preserve upstream history, license
64
notices, and the selected release's commit/tag; copying a source archive
65
alone is not a full fork. A mirror is acceptable when native forking is
66
unavailable, but identify it as such and record its upstream provenance.
67
3. Work in an isolated checkout. Establish or reuse a maintenance branch based
68
on the selected release plus its already accepted backports. Create the
69
fix branch from that base. Never reset an existing maintained branch to an
70
older tag or target a newer default branch accidentally.
71
4. Check for an existing PR for this release/CVE before creating another. Keep
72
fixes and their tests in one PR by default, with separate commits when useful
73
for review. If a fix has already merged, add the tests in a linked follow-up
74
PR rather than recreating the fix.
75
5. When validating multiple controller releases, use a separate maintenance
76
branch and fix PR for each release. Re-derive every release-specific input:
77
controller commit, bundled NGINX version and checksum, base image, modules,
78
build context, patch set, Kubernetes fixture and architecture. Never copy a
79
donor release's checksum or build pin merely because its patch logic applies.
80
81
## Select and record the fix
82
83
Read the official advisory, for example the [NGINX security advisories](https://nginx.org/en/security_advisories.html),
84
and verify applicability against the shipped component, build flags and listener
85
configuration. Keep Kubernetes ingress-nginx distinct from NGINX Gateway Fabric.
86
Record each CVE's upstream fix commits, prerequisite commits, and applicability.
87
If no compatible fix can be established, report **NOT VERIFIED** and explain
88
available alternatives without replacing the requested version silently.
89
90
Choose the correct backport mechanism:
91
92
- **Controller or Go dependency:** cherry-pick an applicable upstream commit
93
with source attribution (for example `git cherry-pick -x`), or make the
94
equivalent minimal dependency/source change. Rebuild affected executables.
95
- **NGINX core or module:** vendor the upstream patch with its source URL and
96
checksum, then apply it to the component's source during the native build.
97
An NGINX commit cannot simply be cherry-picked into the ingress-nginx source
98
tree. Rebuild NGINX and its coupled modules together.
99
- **Source-built native library** (for example LuaJIT under `/usr/local`):
100
patch its pinned source, rebuild the library and affected consumers, and
101
verify the final image uses those builder outputs on each target platform.
102
- **OS-managed package or library:** select a fixed package revision/base digest and
103
verify the installed version and the library actually loaded by the process.
104
105
Commit a small backport manifest with the controller/source/base pins, each
106
CVE-to-fix mapping, ordered patch hashes, prerequisites, adaptations, and target
107
platforms. Compare vendored patches with their upstream bytes. Explain conflict
108
resolutions and retain their upstream attribution. Apply the ordered series
109
after existing patches, with forward checks before application and reverse
110
checks (or equivalent source checks) on the appropriate resulting tree.
111
112
If an upstream patch does not apply because the selected older source has a
113
different layout, make the smallest context or semantic adaptation required.
114
Keep the upstream source link and authorship, record both the adapted hash and
115
the reason for the change, and rerun the pristine-tree forward and reverse
116
controls. Do not treat a successful adapted patch application as behavioral
117
proof of the CVE fix.
118
119
## Build and retain the exact artifact
120
121
- Discover the selected release's build layout. For v1.11.5, the NGINX builder
122
is in `images/nginx/rootfs`; security patches must run in `build.sh` before
123
configure/compile. Build the final controller from `rootfs` with that rebuilt
124
base supplied as `BASE_IMAGE`. Match the selected release image variant:
125
for `controller-chroot`, use the release's `rootfs/Dockerfile-chroot`,
126
its chart chroot setting and matching security context. Record the stock
127
variant digest and verify the rendered Pod settings and chroot isolation
128
against that baseline in the integration fixture before delivery.
129
Adapt paths for other releases.
130
- Before building, compare every source version, checksum, base, module and
131
toolchain pin with the untouched selected tag. A patch donor is evidence for
132
the fix, not evidence that its release-specific build inputs fit the target.
133
- Resolve the source revision that produced the release's pinned NGINX base;
134
it may differ from the controller tag (and may be encoded in the base image
135
tag or provenance). Rebuild from that base-source revision, then apply the
136
security overlay. Compare its static/dynamic module composition with the
137
shipped controller image so a later branch's module changes are not imported.
138
- Verify source archives against published checksums/signatures. Pin source
139
commits, base images by digest, toolchains, and package inputs. Replace or
140
account for floating downloads and `apk upgrade`; record remaining mutable
141
inputs as reproducibility gaps, not as a reproducible build.
142
- Choose one recipe and use it for CI and delivery. For an NGINX-only fix, stock
143
controller/helpers may be reused from the digest-pinned image for the same
144
architecture. Alternatively rebuild them from the pinned source and
145
toolchain. Record which path was used; tests of a rebuilt controller do not
146
validate a different image assembled with stock executables.
147
- Build each requested platform, use a distinct backport tag, and compare stock
148
and patched executables, modules, package manifests and OCI configuration.
149
Explain unrelated changes rather than expanding the fix silently.
150
- Retain the tested image as a CI artifact (for example an OCI archive), with
151
its checksum, commit, patch hashes, executable hashes and CI run URL. Record
152
the artifact's retrieval URL and retention. An archive checksum or local
153
image ID is not a registry manifest digest.
154
155
## Add the tests, open the PR, and run CI
156
157
Read [the integration test recipe](references/integration-tests.md) and implement
158
it in the maintained repository. The recipe includes the native-builder patch
159
checks, baseline/patched regression, final-image binary comparison, TLS HTTP/2
160
smoke test, and real Kubernetes Ingress test. Adapt it to each selected CVE and
161
target; do not retain a previous CVE, architecture or Kubernetes version as a
162
hidden constant. Keep the workflow and test helpers with the fix in the PR.
163
Record the effective runtime configuration and loaded modules in the disposable
164
CI fixture as described in the recipe. Include any ConfigMap overrides and
165
custom templates that affect the fix. Recheck the affected evidence when those
166
inputs change, even if the image digest stays the same.
167
Build the applicability matrix from the component version, compiled modules and
168
deployed configuration. A module may be present but not exercised by the chosen
169
fixture; report that CVE's behavioral check as NOT RUN. Do not credit an HTTP/2
170
or ordinary-traffic compatibility smoke test as resolver, HTTP/3, mail or other
171
unrelated CVE-specific behavioral evidence.
172
173
Run applicable local static checks, then push and open/update the PR against the
174
maintenance branch. Its description must explain the CVE and old-version
175
constraint, upstream fixes, build recipe, test matrix, artifact handling and
176
known gaps. Use public source links and sanitized evidence. Do not copy private
177
endpoints, credentials, organization identifiers or incident records into the
178
skill, generated fixtures, PR, or uploaded logs.
179
180
Trigger the PR workflow, or dispatch the workflow for the exact branch when
181
available. A newly added dispatch workflow may need to exist on the repository's
182
default branch first; prefer its PR trigger rather than merging just to run it.
183
Run Docker/kind integration environments in GitHub Actions, not on the user's
184
workstation. Inspect failures, fix the entire current batch, and rerun affected
185
checks. Do not weaken a test or skip dependency review to obtain green CI.
186
187
Wait for the final revision's required jobs. Record the checked-out revision
188
(including a synthetic PR merge revision when used), run URL and results. A
189
skipped/cancelled job or an earlier commit's green run is not passing evidence.
190
For a permissions, unavailable-runner, or missing-fix blocker, retain the PR and
191
report the exact next action instead of retrying indefinitely or claiming success.
192
193
## Optional publication and deployment verification
194
195
When publication is in scope, publish the same retained image, resolve its index
196
and platform manifest digests, then independently pull each platform by digest.
197
Compare its manifest digest to the retained OCI platform manifest digest. For
198
a Docker archive, compare the image config digest and ordered rootfs DiffIDs.
199
Any mismatch or missing identity evidence requires retesting the pulled image. Attach provenance linking the digest to source,
200
patch hashes, platform and CI run. Rebuilding creates a new artifact: rerun the
201
required affected source, behavioral, identity and integration checks against
202
that replacement before promotion. A hash check alone cannot transfer the
203
previous artifact's verdict to different bytes.
204
205
When live verification is requested, discover the user's cluster/context,
206
namespace, ingress classes and endpoint; never assume a provider or environment.
207
Use permitted read-only APIs to check desired pins, rollout status and **every
208
serving replica's** platform image ID, including old replicas still serving.
209
Probe ordinary traffic through the intended endpoint and observe readiness and
210
restarts. Follow the environment's access rules; in-pod commands are not required
211
to establish deployment identity. Compare the deployed configuration inputs
212
and module sources against the tested configuration using permitted evidence.
213
Record runtime verification as NOT RUN if the effective inputs cannot be
214
verified with the available access. Keep this result separate from CI evidence.
215
216
## Finish with a confidence summary
217
218
Always provide a summary, including on failure or a partial run:
219
220
- Selected controller release/link, bundled NGINX, CVEs and applicability.
221
- Maintained repository, base/fix branches, PR link(s), and tested revision.
222
- Upstream fixes and any adaptations or unrelated dependency changes.
223
- Build recipe, tested Kubernetes/platform/protocol matrix, and CI run links.
224
- Image artifact URL/checksum; registry/index/platform digests only if published
225
and verified. State explicitly if no retrievable image was retained.
226
- A per-CVE evidence table: **check | PASS / FAIL / NOT RUN / NOT APPLICABLE |
227
exact revision or artifact | evidence link | limitation**. Explain every
228
exclusion and distinguish source inclusion, behavioral regression, final-image
229
identity, effective runtime inputs, integration compatibility, publication
230
and live deployment.
231
- Separate confidence statements for the CI artifact and any published or live
232
artifact, followed by one recommended next action. Headline the requested
233
deliverable's status; a verified CI image cannot make an untested published
234
replacement verified.
235
236
Use **verified for the tested scope** only when all required checks for each
237
claimed CVE and target passed on the same artifact. Use **partially verified**
238
when evidence exists but required checks are missing, and **not verified** when
239
the fix cannot be established or a required check fails. List failures even if
240
other stages passed. NOT APPLICABLE needs evidence of inapplicability; an absent
241
or difficult behavioral test is NOT RUN, never NOT APPLICABLE. An
242
extracted-expression test supports only that expression; normal traffic alone
243
does not prove CVE mitigation. Optional publication/live
244
checks may be NOT RUN without invalidating a clearly limited CI-only result.
245
Do not give an unsupported percentage, imply all vulnerabilities are fixed, or
246
claim that a custom backport restores upstream support for the retired project.
247
248
## Example outcome
249
250
The final response can use this compact public-safe shape (replace every example
251
value and link with the run's real evidence):
252
253
> **Partially verified — controller-v1.11.4 CI artifact**
254
>
255
> - Target: [controller-v1.11.4](https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.11.4),
256
> bundled NGINX 1.25.5, Linux/amd64, Kubernetes v1.30 fixture.
257
> - Repository: `example-org/ingress-nginx-maintained`; base
258
> `maintenance/controller-v1.11.4`; [fix and test PR](https://github.com/example-org/ingress-nginx-maintained/pull/42).
259
> - Build: the selected release's native NGINX builder plus the exact final
260
> controller image; [successful CI run](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789).
261
> - Retained artifact: `controller-v1.11.4-backport-amd64.tar.gz`, SHA-256
262
> `0123456789abcdef...`, retained for 14 days. No registry image was published.
263
>
264
> For CVE-2026-123007, let **S** be the full tested Git commit and **I**
265
> the retained platform image config digest. Let **F** be the revision of
266
> the fixture inputs. Substitute these exact values and the corresponding
267
> job or artifact URLs in the completed report.
268
>
269
> | Check | Result | Revision or artifact | Evidence link | Limitation |
270
> | --- | --- | --- | --- | --- |
271
> | Patch inclusion | PASS | S | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | Source only |
272
> | Behavioral regression | NOT RUN | S | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | No targeted regression was run |
273
> | Final-image binary identity | PASS | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | Linux/amd64 only |
274
> | Effective runtime inputs | PASS | I + F | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | Tested chart and fixture configuration only |
275
> | TLS and HTTP/2 negotiation | PASS | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | Protocol compatibility only |
276
> | Ingress routing | PASS | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | One Kubernetes version |
277
> | Registry publication | NOT RUN | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | CI artifact only |
278
> | Live deployment | NOT RUN | I | [Job record](https://github.com/example-org/ingress-nginx-maintained/actions/runs/123456789) | No cluster rollout |
279
>
280
> Confidence: partially verified for the retained CI artifact. Run the missing
281
> behavioral check before claiming mitigation for this CVE.
282

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…