nitinjain999/platform-skills/kubescape
Claude Code and agent skill by nitinjain999/platform-skills
- community
Checking that the SKILL.md file is still in the repository.
Check Kubernetes manifests, Helm charts, Kustomize overlays and live clusters against NSA-CISA, MITRE ATT&CK, CIS (EKS, AKS, GKE, vanilla) and SOC2 with the Kubescape CLI. Covers framework choice, score and severity gates, PR gates that fail only on new findings (--baseline), exceptions that actually suppress, controls configuration, auto-fix, Kubescape's CEL admission policy library, and one-off image scans. Interactive when run without arguments. Use when asked to "scan my manifests", "how secure is my cluster", "run a CIS benchmark", "NSA hardening check", "add a Kubernetes security gate to CI", "accept this finding", "fix what Kubescape found", or "run kubescape". Continuous in-cluster scanning, runtime alerts, NetworkPolicies from traffic → /platform-skills:kubescape-operator. Image CVE gates → /platform-skills:trivy. Admission with Kyverno → /platform-skills:kyverno. Terraform → /platform-skills:checkov.
Install
npx vskill@latest install nitinjain999/platform-skills/kubescapeSKILL.md
Find out how a Kubernetes change or cluster measures up against a security framework, in plain language, and stop new problems at the pull request.
Read references/kubescape.md before responding. It holds the verified install, the framework table, gate exit codes, the baseline recipe, how the two exception actions really behave, fix limits, the VAP rollout, and troubleshooting. The working files are in examples/kubescape.
The primary cloud for this organisation is ${user_config.primary_cloud}. If that reads as a literal placeholder or is empty, it is not configured: detect the provider from the cluster, or ask.
Ownership boundary (enforced at the menu)
| Question | Authoritative command | |
|---|---|---|
| "Does this manifest / chart / cluster meet NSA, MITRE, CIS or SOC2?" | this command | |
| "Block insecure Kubernetes changes in PRs" | this command (ci) | |
| "Scan continuously, see which CVEs actually load, alert on runtime behaviour, generate NetworkPolicies" | /platform-skills:kubescape-operator | |
| "Is this image safe to ship?" (CI gate) | /platform-skills:trivy | |
| "Will this pass admission?" (cluster runs Kyverno) | /platform-skills:kyverno | |
| "Is my Terraform misconfigured?" | /platform-skills:checkov | |
| "Is this production-ready overall?" | /platform-skills:preflight |
Mode dispatch
Parse the first word of $ARGUMENTS as the mode. When $ARGUMENTS is empty, or is a question in plain words, run the interactive wizard.
| Mode | What it does | |
|---|---|---|
scan | Score manifests, a Helm chart, a Kustomize overlay or a git URL against a framework | |
cluster | Score the live cluster in the current kube context (or several contexts) | |
ci | Add a GitHub Actions gate that fails a PR only on findings it introduces | |
exceptions | Accept a risk properly: an exceptions entry that suppresses, with a review date | |
fix | Preview and apply Kubescape's automatic fixes, then hand-fix the rest | |
vap | Enforce a control at admission with Kubescape's CEL policy library (Warn → Deny) | |
image | One-off image CVE check (CI image gates live in /platform-skills:trivy) | |
| _(empty)_ | Interactive wizard |
Step 0 — detect before asking (silent)
Run these quietly and use the answers to skip questions. Never ask what the repository or cluster already tells you.
- Kubescape missing → offer the install (laptop:
brew install kubescape; CI and servers: the verified download in the reference) before anything else. - Version below 4 → say so:
--baseline,--kube-contextsand thedisableexception behaviour described here need v4. - Current context looks like production (name contains
prod) → confirm before a cluster scan; it is read-only but heavy on the API server for large clusters.
Interactive wizard
Ask with the AskUserQuestion tool when it is available (one question per call, the recommended option first); otherwise print the numbered menu and wait. Three layers; stop as soon as the mode is clear.
Layer 1 — What do you want to know? (intent, in their words)
Pre-select from Step 0: no cluster but manifests → 1; cluster and no manifests → 2; a workflow directory and no Kubescape job → mention 3.
Layer 2 — Measured against what? (framework, in plain words)
Pick the CIS benchmark from the distribution, not the cloud: API server gitVersion with -eks- → EKS, with -gke. → GKE, nodes labelled kubernetes.azure.com/cluster → AKS, otherwise cis-v1.12.0. providerID and the primary cloud above are only hints: a self-managed cluster on EC2 also reports aws://. When the hints and the signals disagree, or there is no cluster, ask which distribution it is. Say which benchmark and why. Skip this layer for exceptions, fix and image.
Layer 3 — Only the settings that can hurt
Ask only where a wrong default causes harm; offer the recommended value so Enter accepts it.
- Gate strictness (
ci, orscanin a pipeline): "Fail on new High or Critical findings? [Y]". Explain that without a gate Kubescape always exits 0. - Existing debt (
ci, when a first scan shows more than about 10 failed controls): "Gate only on findings a PR adds (baseline)? [Y]". Brownfield repos need this, or the first PR after rollout fails for problems it did not create. - Accepted risk (
exceptions): the reason in one sentence and a review date, default 90 days. Never write an exception without both. - Fix scope (
fix): "Preview only, write fixed copies, or edit in place? [Preview]".
Do not pepper with questions. If the user typed a full command (/platform-skills:kubescape scan charts/api), run it.
Result card (every mode ends with this)
Translate the report; do not paste the raw table. Build it with the jq result-card helper in the reference.
One line of "why it matters" per control when the user is new to it (for example, privileged means root on the node). One suggested next command, not a list.
Mode: scan
- Resolve the target: a path, a chart (
Chart.yaml), an overlay (kustomization.yaml), a git URL, or-for stdin. - Helm: when
Chart.yamllistsdependencies, build them first and stop on errors (helm repo addeachhttps://repository, thenhelm dependency build). Kubescape tries itself but only warns on failure and then scans without the subcharts. Pass--kube-versionfrom the target cluster when known. - Run:
- Print the result card. If the score is 100, say what was not checked: image contents (
imagemode) and host settings (clusterwith the operator).
Mode: cluster
- Confirm the context from Step 0 and the framework from Layer 2.
- Run (read-only):
- Print the result card, then the skipped count. When controls are skipped for
missing: hostdata…, say how many and offer/platform-skills:kubescape-operator install: on a CIS scan without it, about 40% of controls cannot run. - For a fleet, lead with
divergence: controls that pass on one cluster and fail on another usually mean configuration drift.
Mode: ci
- Copy
examples/kubescape/workflows/kubescape.ymlto.github/workflows/kubescape.yml. - Set
SCAN_PATHfrom Step 0,FRAMEWORKSfrom Layer 2,SEVERITY_THRESHOLDfrom Layer 3. - If the repository has a different default branch, check
on.push.branches. - Explain the three behaviours: PRs fail only on new findings (baseline from a worktree of the same clone), main reports without gating, expired
disableexceptions fail the job. - Tell the user to make
posturea required check. - Run
zizmoron the new workflow if available (/platform-skills:zizmor).
Never: kubescape/github-action (bundles CLI v3.0.21), tj-actions/changed-files, unpinned uses:, a gate without --controls-version, a scan without --honor-inline-exceptions=false (a PR could suppress its own finding with a kubescape.io/skip-controls annotation), or a paths filter on the pull_request trigger of a required check (it would stay pending and block merges).
Mode: exceptions
- Identify control ID, resource kind, namespace and name from the user or the last report.
- Ask the reason and review date (Layer 3).
- Write the entry to
.kubescape/exceptions.jsonwith"actions": ["disable"]and the name ending-until-YYYY-MM-DD. Use"alertOnly"only when the user wants the finding to keep failing (acknowledged, still tracked). Never any otheractionsform: an empty list, a missing field, a mixed list or a typo all suppress likedisable. - Re-run the scan with
--exceptionsand show the control moving topassed (w/exceptions). - Ask whether the exception should also exist in the cluster:
SecurityExceptionwithexpiresAt→/platform-skills:kubescape-operator exceptions.
State plainly: alertOnly does not stop a gate; only disable does.
Mode: fix
- Scan to JSON, then
kubescape fix <report> --dry-runand translate the stderr output into a short list. - Warn about the two changes that break apps:
readOnlyRootFilesystem: true(writes outside a volume) andrunAsUser: 1000(image built for another UID). - On approval:
--output-dirfor copies, or in place in a clean git tree sogit diffis the review. - List what was not fixed and give the manual fix for each (limits, seccomp, NetworkPolicy, Secrets).
- Cluster reports: write patched manifests to Git, never pipe to
kubectl applyon production.
Mode: vap
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/kubescape/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nitinjain999/platform-skills/kubescape)