Back to skill

Security audit

Periodic Reflection

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate-report.js:41
Finding

Automatic mode generates fabricated metrics and unconditional healthy status reports

Content
View full analysis
Remediation
View remediation

T06 · System Persistence

Note
Location
README.md:19
Finding

Documentation recommends persistent cron execution without lifecycle safeguards

Content
View full analysis
> /tmp/reflection.log 2>&1 ``` ``` ### Technical Analysis The instructions ask the user to create a cron entry that survives the current Skill invocation and runs every eight hours. This is a system-persistence mechanism. The behavior is disclosed, manually installed, user-scoped, and directly related to the declared periodic-reporting functionality. It does not install a hidden backdoor or request elevated privileges. Consequently, the persistence is functionally reasonable and does not exceed the privileges needed to run as the user. However, the instructions omit important safeguards: - No removal or disablement procedure is provided. - No duplicate-job prevention is described. - No execution lock prevents overlapping runs. - No output or log retention policy is configured. - The command relies on shell expansion of `~` and an environment-dependent `node` executable. - The log uses a shared `/tmp` pathname. - The scheduled command invokes the misleading `--auto` behavior described in the preceding finding. ### Attack Path 1. A user follows the setup instructions and edits the user crontab. 2. The cron entry remains active across sessions and system restarts handled by the cron service. 3. The script executes every eight hours with the user's permissions. 4. Each execution creates another report and appends output to `/tmp/reflection.log`. 5. Without retention or locking, reports and logs can grow indefinitely or concurrent runs can overlap. 6. Because `--auto` currently uses fabricated metrics, every scheduled run produces another misleadin ...[truncated 865 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

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.

Content

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

bash
# 每 8 小时生成一次反思报告
crontab -e

# 添加以下行:
0 */8 * * * cd ~/workspace/agent/workspace/skills/periodic-reflection && node scripts/generate-report.js --auto >> /tmp/reflection.log 2>&1

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

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.

Content

Scanner excerpt · RELEASE.md (reported line 45)May include surrounding context.

bash
# 每 8 小时生成一次反思报告
crontab -e

# 添加以下行:
0 */8 * * * cd ~/workspace/agent/workspace/skills/periodic-reflection && node scripts/generate-report.js --auto >> /tmp/reflection.log 2>&1

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

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.

Content

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

bash
# 每 8 小时生成一次反思报告
crontab -e

# 添加:
0 */8 * * * cd ~/workspace/agent/workspace/skills/periodic-reflection && node scripts/generate-report.js --auto

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.