Back to skill

Security audit

k8s CLI command reference skill pack

Security checks for vulnerabilities and agentic risk

Overview

This is a kubectl reference skill with powerful Kubernetes command examples, but the behavior is disclosed and aligned with its purpose.

Install only if you want kubectl operational guidance. Treat generated commands as live cluster administration: confirm namespace, context, target resource, and destructive flags before allowing an agent to run them.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2083)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 11)May include surrounding context.

md
title: kubectl 命令行工具
  weight: 20
---
<!--
title: Command line tool (kubectl)
content_type: reference
weight: 110

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 66)May include surrounding context.

md
[Docker 用户的 `kubectl`](/zh-cn/docs/reference/kubectl/docker-cli-to-kubectl/)
介绍了一些 Kubernetes 的等价命令。

<!-- body -->

<!--
## Syntax

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 66)May include surrounding context.

md
[Docker 用户的 `kubectl`](/zh-cn/docs/reference/kubectl/docker-cli-to-kubectl/)
介绍了一些 Kubernetes 的等价命令。

<!-- body -->

<!--
## Syntax

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 105)May include surrounding context.

kubectl get po pod1

text

<!--
* `NAME`: Specifies the name of the resource. Names are case-sensitive. If the name is omitted,
details for all resources are displayed, for example `kubectl get pods`.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 117)May include surrounding context.

md
在对多个资源执行操作时,你可以按类型和名称指定每个资源,或指定一个或多个文件:

<!--
  * To specify resources by type and name:

    * To group resources if they are all the same type:  `TYPE1 name1 name2 name<#>`.<br/>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 145)May include surrounding context.

md
* 使用 YAML 而不是 JSON 因为 YAML 对用户更友好, 特别是对于配置文件。<br/>
    例子:`kubectl get -f ./pod.yaml`

<!--
* `flags`: Specifies optional flags. For example, you can use the `-s` or `--server` flags
  to specify the address and port of the Kubernetes API server.<br/>
-->

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 145)May include surrounding context.

md
* 使用 YAML 而不是 JSON 因为 YAML 对用户更友好, 特别是对于配置文件。<br/>
    例子:`kubectl get -f ./pod.yaml`

<!--
* `flags`: Specifies optional flags. For example, you can use the `-s` or `--server` flags
  to specify the address and port of the Kubernetes API server.<br/>
-->

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 206)May include surrounding context.

md
这是因为 Pod 是一个命名空间资源,且命令中没有提供命名空间。
请查看 `kubectl api-resources` 的输出,以确定某个资源是否是命名空间资源。

<!--
Explicit use of `--namespace <value>` overrides this behavior.
-->
直接使用 `--namespace <value>` 会覆盖此行为。

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 357)May include surrounding context.

md
`version`        | `kubectl version [--client] [flags]` | 显示运行在客户端和服务器上的 Kubernetes 版本。
`wait`    | <code>kubectl wait ([-f FILENAME] &#124; resource.group/resource.name &#124; resource.group [(-l label &#124; --all)]) [--for=delete&#124;--for condition=available] [options]</code> | 实验特性:等待一种或多种资源的特定状况。

<!--
To learn more about command operations, see the [kubectl](/docs/reference/kubectl/kubectl/) reference documentation.
-->
了解更多有关命令操作的信息,请参阅

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 357)May include surrounding context.

md
`version`        | `kubectl version [--client] [flags]` | 显示运行在客户端和服务器上的 Kubernetes 版本。
`wait`    | <code>kubectl wait ([-f FILENAME] &#124; resource.group/resource.name &#124; resource.group [(-l label &#124; --all)]) [--for=delete&#124;--for condition=available] [options]</code> | 实验特性:等待一种或多种资源的特定状况。

<!--
To learn more about command operations, see the [kubectl](/docs/reference/kubectl/kubectl/) reference documentation.
-->
了解更多有关命令操作的信息,请参阅

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 446)May include surrounding context.

md
-->
## 输出选项   {#output-options}

<!--
Use the following sections for information about how you can format or sort the output
of certain commands. For details about which commands support the various output options,
see the [kubectl](/docs/reference/kubectl/kubectl/) reference documentation.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 526)May include surrounding context.

md
请记住:有关每个命令支持哪种输出格式的详细信息,
请参阅 [kubectl](/zh-cn/docs/reference/kubectl/kubectl/) 参考文档。

<!--
#### Custom columns
-->
#### 自定义列   {#custom-columns}

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 562)May include surrounding context.

kubectl get pods -o custom-columns-file=template.txt

text

<!--
where the `template.txt` file contains:
-->
其中,`template.txt` 文件包含:

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 562)May include surrounding context.

kubectl get pods -o custom-columns-file=template.txt

text

<!--
where the `template.txt` file contains:
-->
其中,`template.txt` 文件包含:

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 603)May include surrounding context.

md
此功能默认启用。要禁用它,请将该 `--server-print=false` 参数添加到
`kubectl get` 命令中。

<!--
##### Examples
-->
##### 例子

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 603)May include surrounding context.

md
此功能默认启用。要禁用它,请将该 `--server-print=false` 参数添加到
`kubectl get` 命令中。

<!--
##### Examples
-->
##### 例子

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 627)May include surrounding context.

pod-name 1m

text

<!--
### Sorting list objects
-->
### 排序列表对象

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 669)May include surrounding context.

md
-->
## 示例:常用操作

<!--
Use the following set of examples to help you familiarize yourself with running the commonly used `kubectl` operations:
-->
使用以下示例集来帮助你熟悉运行常用 `kubectl` 操作:

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 669)May include surrounding context.

md
-->
## 示例:常用操作

<!--
Use the following set of examples to help you familiarize yourself with running the commonly used `kubectl` operations:
-->
使用以下示例集来帮助你熟悉运行常用 `kubectl` 操作:

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 707)May include surrounding context.

md
-->
`kubectl get` - 列出一个或多个资源。

<!--
# List all pods in plain-text output format.
kubectl get pods

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 748)May include surrounding context.

kubectl get pods --field-selector=spec.nodeName=server01

text

<!--
`kubectl describe` - Display detailed state of one or more resources, including the uninitialized ones by default.
-->
`kubectl describe` - 显示一个或多个资源的详细状态,默认情况下包括未初始化的资源。

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 748)May include surrounding context.

kubectl get pods --field-selector=spec.nodeName=server01

text

<!--
`kubectl describe` - Display detailed state of one or more resources, including the uninitialized ones by default.
-->
`kubectl describe` - 显示一个或多个资源的详细状态,默认情况下包括未初始化的资源。

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 785)May include surrounding context.

md
{{< note >}}

<!--
The `kubectl get` command is usually used for retrieving one or more
resources of the same resource type. It features a rich set of flags that allows
you to customize the output format using the `-o` or `--output` flag, for example.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · _index.md (reported line 804)May include surrounding context.

md
{{< /note >}}

<!--
`kubectl delete` - Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources.
-->
`kubectl delete` - 基于文件、标准输入或通过指定标签选择器、名称、资源选择器或资源来删除资源。

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · _index.md (reported line 976)May include surrounding context.

shell
# You can "uninstall" a plugin, by removing it from the folder in your
# $PATH where you placed it
sudo rm /usr/local/bin/kubectl-hello

-->

shell

Static analysis

No suspicious patterns detected.