Skip to content

Add ingress-nginx security backport skill 🤖🤖🤖 - #6573

Open
shay-berman wants to merge 4 commits into
github:mainfrom
shay-berman:codex/ingress-nginx-security-backport
Open

shay-berman wants to merge 4 commits into
github:mainfrom
shay-berman:codex/ingress-nginx-security-backport

Conversation

@shay-berman

@shay-berman shay-berman commented Nov 22, 2026 •

Copy link
Copy Markdown

Description

Adds ingress-nginx-security-backport, a defensive Agent Skill for maintaining an explicitly selected older Kubernetes ingress-nginx controller release when a public CVE fix must be backported.

The skill guides Copilot through the complete evidence chain:

  • ask for and link the exact controller release and CVE/advisory before modifying anything;
  • create or reuse a maintained fork and release-specific maintenance branch;
  • distinguish controller/Go, NGINX core/module, and OS-package fixes;
  • record upstream provenance, prerequisite commits, adaptations, checksums, build inputs, and target platforms;
  • rebuild the exact affected component and final controller image;
  • add safe GitHub Actions validation with pristine-source controls, focused regressions, final-image identity checks, TLS/HTTP2 smoke coverage, and a disposable kind Ingress fixture;
  • retain the tested artifact and report PASS / FAIL / NOT RUN / NOT APPLICABLE evidence per CVE without overstating confidence.

The detailed integration-test recipe is bundled at references/integration-tests.md. The generated skills catalog is updated by the repository build.

This is defensive maintenance guidance. It does not include exploit payloads, publish an image, merge a fix, or change a live cluster without separate user authorization.

Example use case: NGINX2Root

An operator maintaining an archived ingress-nginx controller release can use this skill to prepare and validate a backport for the November 2026 NGINX vulnerability group commonly called NGINX2Root (the scenario sometimes described conversationally as "nginx2shell"). The operator supplies the exact ingress-nginx controller release and the applicable entries from the official NGINX security advisories, for example CVE-2026-123007, CVE-2026-123633, CVE-2026-123634, CVE-2026-121810, CVE-2026-118899, and CVE-2026-113425.

The skill then checks each CVE against the NGINX version, compiled modules, and enabled protocols in that controller release; prepares a maintained fork and backport PR for only the applicable fixes; rebuilds the controller image; runs the source, build, binary-identity, protocol, and kind integration checks; and produces a per-CVE PASS / FAIL / NOT RUN / NOT APPLICABLE evidence table. For example, an HTTP/3 or mail-module CVE must be reported as NOT APPLICABLE when that module is absent, rather than being claimed as fixed. The result is a reviewable candidate image and confidence summary—not a claim that an archived release is upstream-supported or that untested exploit paths are proven safe.

Validation

  • bash .github/scripts/maintenance/fix-line-endings.sh
  • npm run skill:validate — passed for all 465 skills
  • npm run plugin:validate — passed for all 115 plugins and the external catalog; existing non-SPDX warnings remain unchanged
  • npm start / npm run build — passed and generated the expected docs/README.skills.md entry
  • git diff --check — passed
  • GitHub Copilot CLI 1.0.114 discovered the exact folder as an enabled project skill
  • Sensitive-pattern and URL review found no company-specific names, private endpoints, credentials, internal tickets, or private repository links in the contributed files

The workflow design was exercised against two distinct older controller lines:

  • controller v1.11.4 / NGINX 1.25.5 / Kubernetes 1.30.8 / linux-amd64
  • controller v1.8.4 / NGINX 1.21.6 / Kubernetes 1.27.16 / linux-amd64, including release-specific patch adaptations and source/checksum derivation

For both cases, CI passed ordered pristine-source patch controls, native image builds, builder-to-final-image binary identity, packaged HTTP/2 over TLS, real kind Ingress routing, evidence generation, and artifact retention. The validation did not claim full exploit-path reproduction, registry publication, other architectures, or live deployment; the skill explicitly reports those gaps.

The current contributor account's Copilot organization policy permits CLI discovery but denies model execution, so the PR template's Copilot behavior-test checkbox is intentionally left unchecked rather than overstated.

Evaluation record — controller-v1.12.0 and CVE-2025-1974

In a source-based walkthrough of the skill, I resolved the input to the upstream controller-v1.12.0 release. The Kubernetes advisory explicitly lists v1.12.0 as affected and points to upstream fix 0ccf4ca. The v1.12.1 release notes independently list the CVE as fixed and describe the admission controller change. The skill therefore selects the controller-source path if v1.12.0 must be maintained. Upgrading to v1.12.1 is the upstream remediation on that line. This evaluation checked release selection, applicability and fix provenance. Copilot execution, a candidate build and behavioral validation for this pair were not run.

Differentiation

No existing skill in this repository covers ingress-nginx CVE backports. The non-obvious uplift is the release-specific provenance and native-build process, applicability analysis, artifact-identity proof, safe CI fixture, and evidence-limited confidence model—not generic vulnerability-remediation advice.

Acknowledgements

Many thanks to @reouvensmadja, who helped establish the reusable backport workflow, and @vitebski, who helped establish its build-verification and integration-test evidence model.

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • This submission does not involve a paid service.
  • My contribution adds a new skill in the correct directory.
  • The folder and files follow the required naming conventions.
  • The content is clearly structured and follows the Agent Skills specification.
  • I have tested the skill's behavior with GitHub Copilot. CLI discovery passed, but model execution is blocked by the current account's organization policy as documented above.
  • I have run npm start and verified that docs/README.skills.md is up to date.
  • I am targeting the main branch.

Type of Contribution

  • New skill file.

By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

@shay-berman
shay-berman requested review from a team as code owners November 22, 2026 22:05
Copilot AI adaptive review requested due to automatic review settings November 22, 2026 22:05
@github-actions github-actions Bot added new-submission PR adds at least one new contribution skills PR touches skills awaiting-automation merge-risk:medium labels Nov 22, 2026
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: 👀 Ready for review

Risk tier: merge-risk:medium — New or substantially changed resource without privileged execution
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access.

Why this tier
  • Adds 2 file(s), e.g. skills/ingress-nginx-security-backport/SKILL.md
  • Changes 375 lines (low-risk limit is 40)

Automated checks

Check Status Details
Line endings ✅ Passed Passed · logs
Spelling ✅ Passed Passed · logs
Generated README consistency ✅ Passed Passed · logs
Skill validation ✅ Passed Passed · logs
Skill lint (vally) ✅ Passed Passed · logs
Risk scan ✅ Passed Passed · logs
Contributor reputation ✅ Passed Passed · logs
Duplicate resource scan ✅ Passed Passed · logs
PR quality signal ⏭️ Skipped Skipped by its workflow · logs

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s)
  • No staffed reviewer pool owns these files yet; any reviewer with write access counts as the domain reviewer.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for 72a9989 · gate run · This comment is maintained automatically — see submission gate docs.

@github-actions

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 2 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Vally Lint Results

✅ All checks passed

Scope Checked
Skills 1
Agents 0
Total 1
Severity Count
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ ✅ ingress-nginx-security-backport (2/2 checks passed)
ℹ️ ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
ℹ️ ✓ spec-compliance: All spec checks passed.
ℹ️ ✓ [valid-refs] All file references across 1 skill(s) are valid.
ℹ️ ✓ valid-refs: All file references resolve to existing files within the skill directory.
ℹ️ 1 skill(s) linted, 1 passed
Full linter output
### Linting skills/ingress-nginx-security-backport
✅ ingress-nginx-security-backport (2/2 checks passed)
    ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
        ✓ spec-compliance: All spec checks passed.
    ✓ [valid-refs] All file references across 1 skill(s) are valid.
        ✓ valid-refs: All file references resolve to existing files within the skill directory.

1 skill(s) linted, 1 passed

@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Nov 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The guidance omits a remediation path for source-built native libraries and relies on partial image comparisons that can miss lost OS-package fixes.

2 open issues
What changed in this PR

Adds a defensive Agent Skill to Awesome GitHub Copilot for backporting public CVE fixes to an explicitly selected older ingress-nginx controller release. It emphasizes release-specific provenance, reproducible builds, and confidence limited to verified evidence.

Changes:

  • Defines the maintenance workflow, from release and advisory selection through backporting, artifact retention, and reporting.
  • Bundles a CI test recipe covering patch controls, regressions, final-image identity, TLS/HTTP2, and disposable Kubernetes Ingress tests.
  • Adds the skill to the generated discovery and installation catalog.
File Description
skills/​ingress-nginx-security-backport/​SKILL.md Defines the backport workflow, authorization boundaries, and evidence reporting.
skills/​ingress-nginx-security-backport/​references/​integration-tests.md Documents CI validation, Kubernetes fixtures, and artifact verification.
docs/​README.skills.md Adds the skill’s catalog entry, installation command, and reference link.

Review effort: Max (adaptive)

Copilot AI adaptive review requested due to automatic review settings November 25, 2026 07:17
@github-actions github-actions Bot added awaiting-automation and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Nov 25, 2026
@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Nov 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The guidance risks losing chroot isolation and skipping validation of runtime configuration changes, while its reporting example omits required per-check fields and concrete release/CVE evaluation evidence is missing.

No open issues 🎉

4 previously missed issues

In code that hasn't changed since last review

Low severity Add a verified release/CVE evaluation record

skills/​ingress-nginx-security-backport/​SKILL.md:41

The PR reports that Copilot model execution was blocked, so the CI recipe exercises do not establish how this skill handles real release/CVE inputs. Add a Copilot session capture or equivalent evaluation record to the PR description for one concrete controller-release/CVE pair. Include the discovered release, fix provenance and applicability, and verify those conclusions against the cited upstream records.

Low severity Preserve the selected chroot image variant

skills/​ingress-nginx-security-backport/​SKILL.md:124

Please preserve the selected image variant here. The upstream release also ships controller-chroot, which uses rootfs/Dockerfile-chroot and different chart security settings; a default build from rootfs produces the non-chroot image instead. Testing and delivering that image would silently remove the existing chroot isolation even if the HTTP/Ingress checks pass.

Low severity Show required evidence fields for each check in the example

skills/​ingress-nginx-security-backport/​SKILL.md:255

An agent following this example can omit the per-check revision, evidence link and limitation fields required at lines 214–217, and combine distinct checks into one status. Make the example give each check its own row with the required fields and a result limited to PASS, FAIL, NOT RUN or NOT APPLICABLE.

Low severity Include rootfs/etc in the PR trigger paths

skills/​ingress-nginx-security-backport/​references/​integration-tests.md:18

Please include all final-image build inputs in the PR trigger. The v1.11.5 controller Dockerfile also copies rootfs/etc, including the NGINX template and Lua files, but these are not covered by the listed paths. A workflow using this list as a path filter could therefore skip validation after a runtime configuration change, leaving the previous artifact evidence stale.

2 resolved since last review

Review effort: Max (adaptive)

Copilot AI adaptive review requested due to automatic review settings November 26, 2026 06:57
@github-actions github-actions Bot added awaiting-automation and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Nov 26, 2026
@shay-berman

Copy link
Copy Markdown
Author

Reviewed both Copilot reviews and the GitHub Actions reports. Both inline findings have replies and are resolved. Commit 13e82fc covers source-built native libraries and verifies the complete image for each published platform.

Commit 72a9989 addresses three follow-up findings. The build preserves the selected chroot variant and chart security settings, CI includes rootfs/etc and other final-image inputs, and the example now records a separate result, artifact or revision, evidence link and limitation for each check.

For the fourth finding, the PR description now includes a source-based evaluation of controller-v1.12.0 against CVE-2025-1974, linked to the Kubernetes advisory, upstream fix and fixed release. Copilot execution and runtime validation for this pair remain untested.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The PR lacks a sanitized Copilot execution transcript for a real controller release/CVE pair showing the selected evidence, resulting conclusions, and how they were checked, because model execution was blocked.

1 open issue

Review effort: Balanced (adaptive)

Comment on lines +37 to +38
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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retried the requested GitHub Copilot CLI evaluation with the skill present and controller-v1.12.0 / CVE-2025-1974 as inputs. The CLI exited with “Access denied by policy settings” before returning a model response. The PR description records the source-based evaluation separately. Leaving this thread open until a contributor with approved Copilot access can supply the requested transcript.

Copilot AI adaptive review requested due to automatic review settings November 26, 2026 06:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because the artifact checks can pass without establishing that runtime templates, ConfigMap overrides, and separately loaded modules contain the tested security fix.

1 open issue

Review effort: Max (adaptive)

@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk:medium new-submission PR adds at least one new contribution ready-for-review Submission passed intake validation and is ready for maintainer review skills PR touches skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants