T09 · Insecure Skill Coding Practices
- Location
privacy_guard.py:242- Finding
Unredacted Sensitive Log Content Is Persisted to Local Reports and State Files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This privacy-scanning skill is not safe to install as published because it bundles private logs containing a token-like secret and writes unredacted sensitive log snippets into local reports.
Do not install this package as-is. The publisher should remove bundled runtime logs, rotate any exposed token-like secret, purge generated report/state files from releases, and change the scanner to redact secrets before writing reports or JSON state.
privacy_guard.py:242Unredacted Sensitive Log Content Is Persisted to Local Reports and State Files
alert_log.md:163Distributed Alert Log Contains a Plaintext API-Token-Like Secret and Private Session Data
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
t stored locally
# Windows 任务计划 / Windows Task Scheduler
schtasks /create /tn "Privacy-Guard" /tr "python PATH\to\privacy_guard.py --scan" /sc hourly /mo 4
# Linux crontab
0 */4 * * * python /path/to/privacy_guard.py --scan
python privacy_guard.py --scan
python privacy_guard.py --report
The log reveals handling of sensitive credentials, including what appears to be an API key, without any warning, masking, or safe-handling guidance. Exposure of secrets in logs or conversational context can directly lead to account compromise, unauthorized API usage, and lateral access to other connected systems.
The instruction to upload evolving protection-related work to GitHub creates a direct exfiltration path from a local environment containing sensitive operational and financial context. Even if framed as documentation or backup, natural-language summaries and copied local content can leak secrets, private holdings, paths, or internal procedures to a remote repository.
This sequence progressively steers the agent toward autonomous skill acquisition and broader authority, which is a classic escalation pattern. In context, the agent is being taught to self-expand capabilities, search for new skills, and apply them later, increasing the attack surface far beyond the original task scope.
The trust-building language culminates in requests to search for, install, and operationalize more skills for ongoing future use, which is a strong privilege-escalation and persistence signal. In an agent framework, this can convert a one-off interaction into long-term expanded control with network, tool, and filesystem consequences.
The content endorses broad trigger conditions for skill use without clear scope limits, effectively encouraging the agent to activate capabilities in loosely defined situations. That increases the chance of unintended actions, privilege creep, and unsafe execution paths because the agent is being pushed toward autonomous behavior without tight guardrails.
Deletion-oriented cleanup instructions are presented without warning about irreversible outcomes, which is unsafe in a system capable of modifying local files. This normalizes destructive actions and increases the likelihood that the agent will perform unsafe deletions based on ambiguous user intent.
The natural-language instructions, commands, and descriptions in this skill are exclusively presented in Chinese, with no indication that users may choose another language or that the locale restriction is intentional. Under the policy, forcing a specific language without user opt-in is a locale-policy violation.
The log contains an instruction to run an external package via npx -y @tencent-weixin/openclaw-weixin-cli without pinning an exact version. This creates a supply-chain risk because future package updates or a compromised latest release could change behavior and execute unreviewed code in a privileged local environment.
The content documents instructions to reorganize or delete user files without emphasizing the destructive impact or need for backups and confirmation. In an agent-operated local environment, such vague cleanup actions can cause data loss, break workflows, or delete evidence needed for recovery.
This is a second occurrence of the same unsafe pattern: invoking an unpinned external package with npx -y trusts the latest upstream artifact at execution time. In an agent context, this is especially dangerous because it can turn a chat instruction into remote code execution through package substitution or malicious updates.
The tool scans for sensitive data in logs, then persists excerpts of those same sensitive lines into scan_report.md and suspicious.json. That creates a secondary data-at-rest exposure: secrets or personal data may remain on disk longer, in a more discoverable location, and potentially with weaker access controls than the original transient logs.
The CLI description, prompts, commands, and user-facing status messages are presented in Chinese only, and the command parser expects Chinese phrases such as 确认安全 and 确认风险. This imposes a specific language requirement on users without any opt-in, fallback, or stated regional justification, which matches the language/locale policy violation criteria.
The documented example --cmd='确认安全 1' and the responses in process_user_command imply full natural-language commands are supported, but main() splits args.cmd and passes only parts[0] as the command. As a result, process_user_command receives 确认安全 instead of the full string it checks with if "确认安全" in command, while commands like 添加白名单 某个模式 are reduced to 添加白名单 and lose their payload, contradicting the advertised behavior.
The interactive help lists commands like safe N, risk N, and add P, suggesting direct support for those actions. However, those branches call process_user_command("确认安全", item_id) / process_user_command("确认风险", item_id), and process_user_command lowercases input and only recognizes Chinese phrases such as 确认安全, 确认风险, 查看可疑, and 添加白名单, creating a mismatch between the displayed user intent and actual command semantics.
The sensitive_types values are written only in Chinese (持仓明细, 金额数据, 账号密码, 个人信息). For a generally scoped config file, this imposes a specific language/locale in natural-language content without any visible opt-in or explanation that the skill is intended only for a Chinese-language or region-specific environment.
This markdown file contains user-facing natural language entirely in Chinese, including the title, status text, and report labels. Under the policy criteria, forcing a specific language without user opt-in or a documented justification is a locale-policy issue.