- Home
- Skills
- DevOps & Cloud
- Kustomize Overlay Check
More screenshots
Works with the AI Agents you already use
Kustomize Overlay Check
A remote base written as https://github.com/org/platform//base with no ?ref= deploys whatever the default branch holds on the day you build.
$5
Kustomize Overlay Check
Example session with this skill installed
Check this project with kustomize-overlay-check.
- Read your context and instructions
- Compiled the kustomize overlay check
$ python3 scripts/check_kustomize.py examples/risky
BLOCK deploy/base/kustomization.yaml:12 K01 SECRET_IN_KUSTOMIZATION
- SESSION_SECRET=<redacted>
Why: A password, token or key is written in the kustomization file: a secretGenerator literal, a configMapGenerator literal with a secret name, a secret value or a secret env variable in helmCharts valuesInline, Secret data or a secret env value in an inline patch, a password in the user-info part of a remote URL, or a GitHub, GitLab, Slack, npm, AWS or Stripe token anywhere in the file. Everyone who can read the repository and its history can read it, and base64 in a Secret is an encoding, not encryption.
Safer: Keep the value out of git: point secretGenerator at an env file that .gitignore covers and that CI writes before the build, encrypt the file with SOPS (Flux decrypts SOPS env files; KSOPS does it for Argo CD), or use External Secrets or Sealed Secrets. Then rotate the value that was committed.
BLOCK deploy/overlays/prod/kustomization.yaml:16 K01 SECRET_IN_KUSTOMIZATION
BLOCK deploy/overlays/prod/kustomization.yaml:19 K02 SECRET_FILE_IN_REPO
BLOCK deploy/platform/kustomization.yaml:5 K03 REMOTE_BASE_WITHOUT_REF
BLOCK deploy/platform/kustomization.yaml:7 K04 REMOTE_OVER_PLAIN_HTTP
REVIEW deploy/base/kustomization.yaml:6 K15 COMMON_LABELS_IN_SELECTORS
REVIEW deploy/overlays/prod/kustomization.yaml:4 K17 OVERLAY_WITHOUT_NAMESPACE
REVIEW deploy/overlays/prod/kustomization.yaml:6 K18 FILE_OUTSIDE_KUSTOMIZATION_ROOT
REVIEW deploy/overlays/prod/kustomization.yaml:9 K13 IMAGE_TAG_NOT_PINNED
REVIEW deploy/overlays/prod/kustomization.yaml:10 K14 DEPRECATED_FIELD
REVIEW deploy/overlays/prod/kustomization.yaml:21 K16 NAME_SUFFIX_HASH_DISABLED
REVIEW deploy/platform/kustomization.yaml:6 K11 REMOTE_REF_NOT_FIXED
REVIEW deploy/platform/kustomization.yaml:9 K12 HELM_CHART_VERSION_NOT_PINNED
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 3 files, 3 with kustomization content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
A production overlay with secretGenerator literals such as DB_PASSWORD=... puts the database password in git for everyone with the repository, and the Secret it builds is only base64. A remote base written as https://github.com/org/platform//base with no ?ref= deploys whatever the default branch holds on the day you build. And an overlay that never sets a namespace sends production objects into whatever namespace the current kubectl context uses. This skill finds those and the other Kustomize mistakes below, and tells you how to fix each one.
Your agent runs a scanner on every kustomization.yaml, kustomization.yml and Kustomization file (kustomizations and components). It follows local bases such as ../../base to see whether any of them sets a namespace, and opens the env files and files that secretGenerator reads to see whether they hold real values and whether .gitignore keeps them out of git. It knows the current Kustomize v5 fields and deprecations, the remote URL forms, and that a ref can be a branch, a tag or a full commit hash. SOPS-encrypted env files, ${VAR} placeholders and Flux Kustomization objects are not reported. It never runs kustomize, kubectl, helm or git. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK
- K01: secrets written in the kustomization: secretGenerator literals, configMapGenerator literals with secret names, secret values and secret env variables in helmCharts valuesInline, Secret data or secret env values in inline patches, a password in a remote URL, or a GitHub, GitLab, Slack, npm or AWS token anywhere in the file (keys that only name a Secret, such as tlsSecret: proxy-tls, are left alone)
- K02: secretGenerator env files and key files (or configMapGenerator env files with secret names) kept in the repository with real values and no .gitignore rule
- K03: remote git bases, resources or components with no ref or version
- K04: remote resources, bases or Helm chart repositories over plain http://
REVIEW
- K11: remote refs that move: a branch (main, stable, release-1.28), a short commit hash, a raw file URL on a branch, a releases/latest download, or a file URL with no version
- K12: helmCharts with no version, latest, or a version range
- K13: images with newTag latest, main, nightly or another moving tag and no digest
- K14: deprecated fields (bases, patchesStrategicMerge, patchesJson6902, vars, imageTags, helmChartInflationGenerator), and a generator's env, the older singular form of envs that kustomize edit fix merges into envs
- K15: commonLabels, which also rewrites selectors that cannot change on live workloads
- K16: disableNameSuffixHash: true, so changed config does not roll the pods
- K17: overlays that set no namespace, namePrefix or nameSuffix, on a local base that sets no namespace either (bases of only cluster-scoped kinds such as ClusterIssuer or ClusterRole are left alone)
- K18: files loaded from outside the kustomization folder, which the default load restrictor refuses
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason, safer approach and official source for each rule
- A risky and a safe example repository (a base, a production overlay and a platform kustomization), and the real report the scanner produces on the risky one
Limits It reads the kustomization files as written and does not run the build, so what patches, components, replacements and Helm templates produce, and the Kubernetes manifests themselves, are not checked. Remote bases and charts are not fetched. Whether a file is committed is decided from .gitignore files only. Tags and branches are told apart by their names. A namespace set by an Argo CD Application or a Flux Kustomization is not known. NOT FLAGGED is not a guarantee.
Static check of kustomization text. The build is not run and remote bases are not fetched, git tracking is judged from .gitignore files only, and namespaces set outside the repository (Argo CD, Flux) are not known. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example repository includes clearly fake, inert secrets (not-a-real-..., NOTREAL-EXAMPLE-...) for the scanner to find. Nothing in it is run or applied.