Back to skill

Security audit

Elasticsearch

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Elasticsearch/Kibana curl reference skill, but it merits Review because it handles API keys and includes broad destructive/admin operations without strong scoping or confirmation guidance.

Install only from a pinned, reviewed version. Use a short-lived, least-privilege Elasticsearch API key limited to the needed indices and operations. Avoid storing the key in a shell profile or committed .env file, and require explicit approval before delete, overwrite, reindex, cluster-setting, reroute, alert, or dashboard import operations.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
README.md:17
Finding

Unpinned Third-Party Skill Installation Without Integrity Verification

Content
View full analysis
Remediation
View remediation
``` 2. Prefer signed, versioned releases and document how users can verify the maintainer's signature. 3. Publish SHA-256 checksums for `SKILL.md` and every reference file, then require verification before copying them. 4. Advise users to inspect diffs before installing updates. 5. Avoid automatic update procedures that overwrite the trusted Skill directory from an unreviewed branch. 6. For personal installation, explicitly warn that the Skill will affect every project and recommend project-scoped installation when global availability is unnecessary. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:18
Finding

Plaintext and Long-Lived Storage of Elasticsearch API Credentials

Content
View full analysis
" \ -H "Authorization: ApiKey $(printenv ES_API_KEY)" \ -H "Content-Type: application/json" \ -d '' ``` ```text If the user provides a URL and key, export them as ES_URL and ES_API_KEY before running commands. ``` ### Technical Analysis The Skill suggests storing an API key in a `.env` file or shell profile and directs the agent to export user-provided credentials. These are plaintext storage and process-environment mechanisms. The instructions do not require restrictive file permissions, exclusion from version control, short credential lifetime, credential cleanup, or a narrowly scoped Elasticsearch API key. Environment variables can be inherited by child processes and may appear in diagnostics or process inspection interfaces, depending on the operating system and access controls. A `.env` file can also be accidentally committed or read by other local users if its permissions are weak. Shell-profile storage makes the credential persist beyond the task and exposes it to future shell sessions. The authenticated network transmission itself is necessary for the declared functionality and no hard-coded exfiltration endpoint was found. The risk arises from credential storage and lifetime, combined with the broad set of documented administrative and destructive operations. ### Attack Path 1. A user supplies an Elasticsearch API key to perform a task. 2. The agent exports the key or stores it in a `.env` file or shell profile as suggested. 3. The key remains available longer ...[truncated 1073 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (81)

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · README.md (reported line 49)May include surrounding context.

md
You should see `elasticsearch` in the list.

> **Note:** Adding a GitHub URL to the `skills` array in `~/.claude/settings.json` does **not** work. Skills must be local files — there is no remote fetching.

## Configuration

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 21)May include surrounding context.

Every request needs the cluster URL and an API key:

bash
# Set these for your session (or export in .env / shell profile)
ES_URL="https://your-cluster.es.cloud.elastic.co:443"
ES_API_KEY="your-base64-api-key"

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 27)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 37)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 44)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 48)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 52)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 68)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 77)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 99)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 115)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 121)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 126)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 130)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 136)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 140)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 155)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 165)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 186)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 190)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 196)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 204)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 208)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 219)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · SKILL.md (reported line 242)May include surrounding context.

All requests follow this pattern:

curl -s "${ES_URL%/}/"
-H "Authorization: ApiKey $(printenv ES_API_KEY)"
-H "Content-Type: application/json"
-d ''

text