T09 · Insecure Skill Coding Practices
- Location
scripts/generate-report.js:41- Finding
Automatic mode generates fabricated metrics and unconditional healthy status reports
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill writes local reflection reports, but its automatic mode can repeatedly produce reports that falsely look data-backed and healthy.
Install only if you are comfortable reviewing and correcting the report generator first. Do not rely on --auto reports for monitoring or compliance decisions until real metric collection and unknown/unhealthy states are implemented, and avoid enabling the cron job unless you add clear removal, private log paths, retention, and duplicate-run safeguards.
scripts/generate-report.js:41Automatic mode generates fabricated metrics and unconditional healthy status reports
README.md:19Documentation recommends persistent cron execution without lifecycle safeguards
The generated report asserts specific operational outcomes, completed remediations, node health, and file/config changes that the script never checks or performs. In a reflection/reporting skill, this is especially dangerous because the tool's purpose is to drive human decisions; fabricated status can conceal incidents, compliance gaps, or failed changes.
The guide explicitly instructs users to create a public GitHub repository and publish/upload the skill contents, but it provides no review step to check for secrets, internal paths, environment-specific data, or other sensitive artifacts before exposure. In a skill packaging context, this can lead to accidental disclosure of local filesystem structure, tokens, proprietary documentation links, or embedded operational details that become publicly accessible once pushed or uploaded.
The natural-language instructions and descriptions are presented in Chinese throughout the README, with no indication that the user can choose another language. This can violate a language/locale policy when a skill forces a specific language without user opt-in or documented regional justification.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# 每 8 小时生成一次反思报告
crontab -e
# 添加以下行:
0 */8 * * * cd ~/workspace/agent/workspace/skills/periodic-reflection && node scripts/generate-report.js --auto >> /tmp/reflection.log 2>&1
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# 每 8 小时生成一次反思报告
crontab -e
# 添加以下行:
0 */8 * * * cd ~/workspace/agent/workspace/skills/periodic-reflection && node scripts/generate-report.js --auto >> /tmp/reflection.log 2>&1
The document instructs users to set up a cron job that runs the report generator automatically and appends output to /tmp/reflection.log. It also states that --auto collects data from logs, but provides no warning that reports and logs may contain project or operational data and will be written to disk on a schedule.
The trigger conditions are very broad and match common words like “反思”, “复盘”, “周期性总结”, which can cause the skill to activate in many unrelated conversations. Over-broad activation increases the chance of unintended tool use, report generation, or follow-on actions in contexts where the user did not explicitly request this skill.
The documentation instructs automated report generation and unattended scheduled execution, including writing output files, but does not warn about filesystem writes, directory creation, overwriting behavior, or operational safeguards. In an agent setting, this can normalize autonomous modification of local state and recurring execution without operator review.
The skill recommends installing a cron job for repeated unattended execution, creating persistence beyond the immediate session. Even though presented as convenience, persistent scheduled execution increases risk because it can continue generating files or invoking scripts without fresh user intent or review.
# 每 8 小时生成一次反思报告
crontab -e
# 添加:
0 */8 * * * cd ~/workspace/agent/workspace/skills/periodic-reflection && node scripts/generate-report.js --auto
The package description is written entirely in Chinese, and the usage examples also include Chinese text, with no indication that other languages are supported. This creates a natural-language/locale constraint without user opt-in or a documented region-specific justification.
The file's user-facing docstring, CLI usage text, and generated report content are written exclusively in Chinese, and the runtime console messages are also Chinese-only. This imposes a specific language on users without opt-in or any stated region-specific justification, which matches the language/locale policy violation criteria.
The script documents --auto as collecting real log-derived metrics, but collectMetrics() returns hard-coded values instead. This can mislead users into believing the report reflects actual operational telemetry when it does not, causing false assurance and potentially unsafe decisions based on fabricated health metrics.
The template title and all reporting sections are written in Chinese, which effectively prescribes a single output language for the skill artifact. There is no indication that users may choose another language or that the locale restriction is required for a region-specific purpose.
The markdown instructs users to set up a cron job that repeatedly runs a script and appends output to /tmp/reflection.log, which affects the local system and creates persistent automated behavior. The documentation does not include any caution about recurring execution, generated report files, or log growth, so users are not explicitly warned about these system-impacting behaviors.
The file is entirely presented in Chinese, starting with the product description, with no indication that language is optional or that the skill is intended only for a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.
This markdown file contains user-facing guidance only in Chinese, and there is no indication that the skill or document is intended exclusively for a Chinese-speaking audience. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy violation.
No suspicious patterns detected.