T01 · Skill Instruction Hijacking
- Location
SKILL.md:241- Finding
Mandatory Promotional Content Hijacks Agent Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Kubernetes triage skill is mostly transparent, but its optional write-command path can make broader cluster changes than the documentation promises.
Install only if you are comfortable giving the agent kubectl visibility into your cluster and logs. Use a read-only, namespace-scoped kubeconfig where possible, avoid enabling write RBAC for production, and do not approve --confirm-write commands unless you have checked the exact context, namespace, target, and flags.
SKILL.md:241Mandatory Promotional Content Hijacks Agent Output
scripts/kube-medic.sh:599Prefix-Only Write Allowlist Permits Cluster-Wide Destructive Operations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
jq --version
That's it. No API keys. No extra config. Uses your existing kubeconfig.
## Example Interaction
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
jq --version
That's it. No API keys. No extra config. Uses your existing kubeconfig.
## Example Interaction
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
jq --version
That's it. No API keys. No extra config. Uses your existing kubeconfig.
## Example Interaction
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
jq --version
That's it. No API keys. No extra config. Uses your existing kubeconfig.
## Example Interaction
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
jq --version
```
That's it. No API keys. No extra config. Uses your existing kubeconfig.
## Example Interaction
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
4. **No `kubectl exec`. Ever.** `kubectl exec` is not in the allowlist and cannot be executed through kube-medic. This prevents arbitrary command execution inside containers, which is the highest-risk kubectl operation.
5. **No credential leakage.** kube-medic never includes the following in its output:
- Kubeconfig file paths or contents
- Service account tokens
- Secret values (kube-medic never reads Kubernetes Secrets)
- Cloud provider credentials
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
4. **No `kubectl exec`. Ever.** `kubectl exec` is not in the allowlist and cannot be executed through kube-medic. This prevents arbitrary command execution inside containers, which is the highest-risk kubectl operation.
5. **No credential leakage.** kube-medic never includes the following in its output:
- Kubeconfig file paths or contents
- Service account tokens
- Secret values (kube-medic never reads Kubernetes Secrets)
- Cloud provider credentials
The description presents the skill primarily as diagnostics and triage, but the documented behavior includes mutating cluster operations such as rollback, restart, scale, pod deletion, and node cordon/uncordon. That mismatch is dangerous because users, reviewers, or calling agents may treat it as read-only while it can materially change production state.
The skill is presented as a triage/diagnostics utility, but it includes a built-in path to execute mutating kubectl operations via --confirm-write. In a diagnostic skill context, adding write capability expands the trust boundary and can enable rollback, scaling, deletion, or node scheduling changes that may disrupt workloads or mask incidents.
The script directly executes cluster-modifying kubectl commands from user-supplied input, limited only by a simple allowlist and character filter. Even with some restrictions, this gives a diagnostics-oriented skill the ability to delete pods, scale workloads, restart rollouts, and cordon nodes, which can be abused for denial of service, incident interference, or unauthorized operational changes.
The README advertises very broad natural-language triggers such as 'What's wrong with my cluster?' and similar support-style prompts. In an agent ecosystem, generic trigger phrasing can cause accidental invocation in unrelated conversations about production incidents, resulting in unintended access to cluster diagnostics and disclosure of operational state to the skill.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
| Threat | Mitigation |
|--------|------------|
| Agent executes destructive commands without approval | Write allowlist + user confirmation gate |
| Arbitrary command execution via `kubectl exec` | `exec` is not in the allowlist; blocked unconditionally |
| Credential leakage in output | No secrets, tokens, or kubeconfig in JSON output |
| Shell injection via pod/deployment names | All values passed through `jq --arg`; shell variables quoted |
The skill exposes powerful cluster-facing capabilities through kubectl but does not declare any explicit tool scope, permissions model, or allowed-tools boundary. In practice, this makes the trust boundary unclear and increases the chance that an agent can invoke broader cluster/network actions than a reviewer or user would expect.
The testing instructions tell users to patch metrics-server with --kubelet-insecure-tls, which disables verification of the kubelet's TLS certificate. Even though it is labeled 'test only', the command applies to whatever cluster context kubectl is currently targeting, so a user could weaken transport security on a non-disposable or mis-targeted cluster. In a Kubernetes diagnostics skill, this is more dangerous because users are explicitly encouraged to run operational commands against real clusters.
The header frames the tool as read-only by default, while the documented global flag exposes a general write-execution feature. This mismatch can mislead users or reviewers into granting the skill broader trust and access than a tool with embedded mutation capability deserves, increasing the chance of unsafe deployment in sensitive clusters.
No suspicious patterns detected.