T09 · Insecure Skill Coding Practices
- Location
scripts/preview.sh:13- Finding
Sensitive configuration values are exposed because redaction patterns are ineffective
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is not visibly malicious, but its safety workflow for editing OpenClaw configuration can expose secrets and uses an unsafe temporary-file pattern.
Review before installing. This skill deals with persistent OpenClaw configuration and possible API keys, so do not rely on its redacted preview as written. Avoid sharing its preview output, do not use the documented /tmp/openclaw.json replacement pattern for real credentials, and require a safer implementation using structural JSON redaction and secure same-directory temporary files before using it for sensitive configs.
scripts/preview.sh:13Sensitive configuration values are exposed because redaction patterns are ineffective
SKILL.md:80Predictable shared temporary file permits configuration disclosure and local file attacks
声明描述的是一个“安全修改配置文件”的技能,核心能力应包括修改 ~/.openclaw/openclaw.json,并在修改前进行备份、脱敏预览以及用户确认。但提供的代码只是一个 preview.sh 脚本,用于读取指定配置文件并输出部分字段与脱敏后的完整内容。它没有写入文件、创建备份、提示确认或执行任何配置变更,因此其实际主要目的与声明不符。虽然“预览(脱敏 key)”这一点与声明部分一致,但只覆盖了声明中的一个辅助环节,不能代表整体技能目的,因此应判定为描述与行为不匹配。
声明的核心能力是“安全修改 OpenClaw 配置文件”,并明确包括修改配置、备份、预览和确认等完整流程。但实际代码仅是一个独立的脱敏脚本:从标准输入读取文本并对特定键名的值做掩码替换。它没有文件定位、配置编辑、备份、写回、模型切换、tools/channel/skill 配置等行为。虽然“脱敏预览”与声明中的一个支持性环节一致,但代码的主要行为远小于且不同于声明的主要目的,因此应判定为描述与行为不匹配。
声明的核心用途是“安全修改” OpenClaw 配置文件,并明确包含修改前备份、预览和确认等保护步骤。但提供的代码块只是 validate.sh 验证脚本,功能集中在读取并检查配置文件内容是否存在、JSON 是否合法、字段是否存在,以及输出部分配置信息。其主要目的与声明明显不同,且缺失声明中关键的修改与安全控制流程,因此属于明显的描述与行为不一致。
The skill instructs operators to perform an external network request to a third-party API endpoint during validation. Even with a placeholder bearer token, outbound connectivity can leak metadata such as IP, environment usage patterns, and the fact that this provider is being tested; in stricter environments, any unsolicited external transmission is sensitive and may violate policy.
~/.openclaw/skills/safe-config/scripts/validate.sh
curl -s https://api.siliconflow.cn/v1/models -H "Authorization: Bearer test" | jq .
### 步骤 3: 请求用户确认
The instructions require a single Chinese confirmation phrase, "ojbk可以改了", and explicitly reject other confirmations. This imposes a specific language/locale requirement on users without opt-in or documented justification, which matches the language policy violation criteria.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"models": {
"providers": {
"anthropic": {
"baseUrl": "https://api.anthropic.com/v1",
"apiKey": "sk-ant-***",
"models": [
{
This markdown file presents all instructions and examples only in Chinese, which can constitute a language/locale policy violation when no user opt-in or alternative language option is provided. The file does not indicate that the content is intentionally limited to a Chinese-speaking audience or region-specific use case.
Comments and terminal output strings are written exclusively in Chinese, and the script provides no language selection or documented locale constraint. This can violate language/locale policy when a skill forces one language for all users without opt-in or justification.
The user-facing description and features are entirely in Chinese, including a required confirmation phrase, with no indication that other languages are supported or optional. This creates a locale/language constraint that is not documented as optional or justified as region-specific.
This code file previews the contents of a user config file and prints multiple fields plus a sanitized full JSON document. Although some secrets are masked, the usage/comment text does not warn users that configuration details such as models, channels, plugins, and timestamps will be exposed in terminal output.
This shell script presents its comments and user-facing messages entirely in Chinese, including usage guidance and validation results. That can violate a language/locale policy when users are not given a choice of language and the file is not clearly documented as region-specific.
No suspicious patterns detected.