T09 · Insecure Skill Coding Practices
- Location
scripts/doctor.sh:98- Finding
API Credential Disclosure Through an Unrestricted Configurable Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Hermes installer skill is mostly coherent, but it gives broad install/update/container access and includes diagnostics that can send API keys to user-configured endpoints.
Review this skill before installing. It is not clearly malicious, but run it only in an environment where installing mutable code, using Docker, and storing Hermes credentials under ~/.hermes is acceptable. Avoid running doctor.sh against untrusted or mistyped OPENAI_BASE_URL values, do not share raw doctor output without redacting logs, and consider pinning the Hermes repository revision and dependencies before installation or update.
scripts/doctor.sh:98API Credential Disclosure Through an Unrestricted Configurable Endpoint
SKILL.md:111Unpinned Remote Source and Dependencies Are Installed and Executed
docker-deploy.md:5Docker Container Receives Broad Writable Access to the Entire Hermes Directory
scripts/doctor.sh:132Diagnostic Script Prints Unredacted Application Error Logs
The skill claims to focus on installation, deployment, updates, and configuration, but it also includes stopping the gateway and uninstalling Hermes, including deletion of local program and configuration data. That mismatch is dangerous because a user invoking a setup-oriented skill may not anticipate destructive actions that can disrupt service or erase state.
The skill claims to focus on installation, deployment, updates, and configuration, but it also includes stopping the gateway and uninstalling Hermes, including deletion of local program and configuration data. That mismatch is dangerous because a user invoking a setup-oriented skill may not anticipate destructive actions that can disrupt service or erase state.
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).
docker rmi hermes-agent
---
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).
docker rmi hermes-agent
---
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ~/.hermes/.env
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
FEISHU_ENABLED=true
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ~/.hermes/.env
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
FEISHU_ENABLED=true
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ~/.hermes/.env
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
FEISHU_ENABLED=true
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ~/.hermes/.env
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
FEISHU_ENABLED=true
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 5. 配置环境变量
```bash
# ~/.hermes/.env
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
FEISHU_ENABLED=true
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 5. 配置环境变量
```bash
# ~/.hermes/.env
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
FEISHU_ENABLED=true
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 5. 配置环境变量
```bash
# ~/.hermes/.env
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
FEISHU_ENABLED=true
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
HERMES_DIR="$HOME/.hermes"
HERMES_AGENT_DIR="$HERMES_DIR/hermes-agent"
ENV_FILE="$HERMES_DIR/.env"
CONFIG_FILE="$HERMES_DIR/config.yaml"
echo "╔════════════════════════════════════════╗"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
HERMES_DIR="$HOME/.hermes"
HERMES_AGENT_DIR="$HERMES_DIR/hermes-agent"
ENV_FILE="$HERMES_DIR/.env"
CONFIG_FILE="$HERMES_DIR/config.yaml"
echo "╔════════════════════════════════════════╗"
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).
# 保留配置,只删除程序
echo "🗑️ 删除程序文件..."
rm -rf "$HERMES_DIR/hermes-agent"
rm -rf "$HERMES_DIR/venv"
echo "✅ 卸载完成!配置文件保留在 $HERMES_DIR"
else
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).
# 保留配置,只删除程序
echo "🗑️ 删除程序文件..."
rm -rf "$HERMES_DIR/hermes-agent"
rm -rf "$HERMES_DIR/venv"
echo "✅ 卸载完成!配置文件保留在 $HERMES_DIR"
else
echo "⚠️ 将完全删除 Hermes Agent 及所有配置"
The skill clearly instructs shell-capable operations such as git clone, pip install, docker build/run, and execution of local scripts, but it does not declare any tool scope or allowed-tools boundary. In an agent setting, this increases the chance that the skill is invoked with broader-than-expected execution privileges and can perform impactful system changes without explicit least-privilege constraints.
The trigger conditions are broad and include many generic installation, deployment, update, and provider-configuration phrases without clear exclusion boundaries. In an agent ecosystem, broad activation raises the risk of the skill being selected in contexts where users did not intend shell execution, installation changes, gateway control, or destructive maintenance actions.
The skill metadata and document content are entirely written in Chinese, indicating a fixed language/locale presentation for the skill. There is no statement that the user may choose another language or that the Chinese-only scope is required for a region-specific purpose.
The section labeled '方式二:Docker 部署' claims to document Docker deployment, but the commands shown are the same pip/uv virtualenv workflow used for command-line deployment rather than Docker operations. This is an active documentation contradiction that could mislead a user into performing a non-Docker installation while believing they are following Docker instructions.
The Docker example runs a locally built image by tag only, without pinning a version or digest. While less severe than pulling an unpinned remote image directly, this still weakens reproducibility and can cause users to execute a stale, replaced, or unintended image if the local tag is overwritten.
The document instructs users to configure third-party model endpoints and supply API keys, but it does not clearly warn that prompts, files, metadata, and credentials-adjacent configuration will be transmitted to external providers. In an installer/configuration skill, this omission can cause users to unknowingly send sensitive business or personal data to outside services with different retention, logging, and jurisdictional policies.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
model:
provider: custom
base_url: https://api.z.ai/api/paas/v4/
default: MODEL_NAME
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
model:
provider: custom
base_url: https://api.z.ai/api/paas/v4/
default: MODEL_NAME
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
model:
provider: custom
base_url: https://api.kimi.com/coding/v1
default: MODEL_NAME
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
model:
provider: custom
base_url: https://api.kimi.com/coding/v1
default: MODEL_NAME
No suspicious patterns detected.