# Nil Safety

> Nil Safety is an Agent Skill for testing & quality published in the kubernetes-sigs/kueue repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Flag unguarded dereferences of optional pointer fields reachable from a malformed CR, and goroutines without recover (CWE-476).

- Skill name: `nil-safety`
- Category: [Testing & Quality](https://www.openparable.com/skill/testing-quality/1)
- Source: https://github.com/kubernetes-sigs/kueue/blob/HEAD/cmd/experimental/skills/reviewer/security/nil-safety/SKILL.md
- Repository: kubernetes-sigs/kueue (2,719 GitHub stars when collected)

## SKILL.md

# Skill: Nil-Safety and Crash Resistance (CWE-476)

- Unguarded dereferences of optional pointer fields reachable from a malformed CR
  (`Workload.Status.Admission`, `ClusterQueue.Spec.Cohort`, optional sub-structs, slice
  elements). A panic in scheduler cache construction or webhook handling wedges the
  scheduling loop — treat as **high severity**.
- Goroutines launched outside the controller-runtime workqueue without a deferred
  `recover()` or a documented panic policy.

---

Source: https://www.openparable.com/skill/testing-quality/nil-safety (OpenParable). Cite the canonical URL above.
