Back to skill

Security audit

Almanac Creator

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Chinese almanac image generator with mostly local file output; users should review its built-in social engagement footer and optional third-party API examples before publishing.

Install only if you want Chinese almanac images for social publishing. Review generated images before posting because pages 2 and 3 include a built-in like/comment/follow footer, and avoid enabling the optional third-party API examples unless you are comfortable sending date/query metadata to those services.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Warning
Location
scripts/generate_almanac.py:1399
Finding
Hardcoded Engagement Messaging Hijacks Generated Content## Vulnerability Details **File Locations**: - `SKILL.md:31-34` - `scripts/generate_almanac.py:1399-1401` - `scripts/generate_almanac.py:1474-1476` - `scripts/generate_almanac_v3.0.3_backup.py:1269` - `scripts/generate_almanac_v3.0.3_backup.py:1339` **Vulnerability Type**: Mandatory promotional content injection **Risk Level**: Medium The skill instructions explicitly require engagement prompts to be added to generated images: ```markdown **TikTok algorithm adaptation**: - **Engagement prompt**: Add “Like for good luck, leave your zodiac sign in the comments, and follow for daily updates” to the bottom of pages 2 and 3. - **Zodiac icons**: Add emoji icons to zodiac forecasts. - **User experience**: Improve visual appeal and engagement rates. ``` The active generator implements the requirement unconditionally on page 2: ```python # V3.0.3: Add social-media engagement prompt interaction_text = " Like for good luck | Comment your zodiac sign | Follow for daily updates" y = draw_centered_text( draw, interaction_text, y, fonts['content'], template['section'] ) ``` It repeats the same behavior on page 3: ```python # V3.0.3: Add social-media engagement prompt interaction_text = " Like for good luck | Comment your zodiac sign | Follow for daily updates" y = draw_centered_text( draw, interaction_text, y, fonts['content'], template['section'] ) ``` Equivalent hardcoded engagement messages are also present in the backup generator at lines 1269 and 1339. ### Technical Analysis The primary function of the skill is to calculate almanac information and render it into images. Requests to like, comment, and follow are unrelated to those functional requirements. Nevertheless, the skill instructions direct the agent toward producing promotional output, and both page-generation functions render that output without checking whether the user requested o ...[truncated 2145 chars]
Remediation
## Remediation Suggestions 1. Remove the mandatory engagement-prompt requirement from `SKILL.md`. 2. Delete the hardcoded `interaction_text` blocks from `generate_page2()` and `generate_page3()` in both the active and backup scripts. 3. If engagement text is a legitimate optional feature, make it disabled by default and require explicit per-run authorization, for example: ```python parser.add_argument( '--engagement-text', default=None, help='Optional user-provided footer text' ) ``` 4. Render the footer only when the user supplies a value: ```python if args.engagement_text: y = draw_centered_text( draw, args.engagement_text, y, fonts['content'], template['section'] ) ``` 5. Do not provide a promotional default value. The wording should remain entirely under user control. 6. Add automated tests confirming that default output contains only almanac content and required disclaimers. 7. Review backup and legacy scripts alongside the active implementation so removed behavior cannot be reintroduced accidentally. 8. Document any optional footer behavior transparently in the command-line help and README.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (15)

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The skill description and output specification are written as a Chinese-only workflow for generating 黄历 images and publishing copy, with no indication that users may choose another language or locale. This is a natural-language locale policy concern because it prescribes a specific language/cultural output by default rather than making it optional or explicitly scoped as a region-specific tool.

External Transmission

Medium
Category
Data Exfiltration
Content
- 财神方位(喜神/福神/财神/胎神)

**数据来源**:
- 黄历 API(推荐):`https://api.qingyunke.com/api.php?key=free&appid=01&msg=今日黄历`
- 手动查询万年历
- 参考昨日黄历格式
Confidence
88% confidence
Finding
The skill recommends pulling almanac data from an external third-party API, which creates a data transmission and supply-chain trust boundary. If the agent sends user-derived prompts, dates, or other context to that endpoint without disclosure, validation, or restriction, sensitive data could be exposed and untrusted content could flow back into generated outputs.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This YAML file uses Chinese exclusively in user-facing comments and labels, which effectively forces a specific language for operators editing the skill configuration. Under the policy, language constraints should either offer user choice or be clearly documented as a justified region-specific requirement.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The title and throughout-document instructions prescribe the skill output standard entirely in Chinese for a content-generation workflow, with no indication that users may choose another language or locale. This creates a natural-language locale constraint without explicit opt-in or justification as a region-specific compliance requirement.

External Transmission

Medium
Category
Data Exfiltration
Content
```python
# 推荐 API
- 老黄历 API: https://api.qingyunke.com/api.php?key=free&appid=01&msg=今日黄历
- 万年历 API: https://www.sojson.com/open/api/huangli.shtml
- 农历 API: https://api.lwl12.com/day
Confidence
82% confidence
Finding
The document recommends pulling content from third-party APIs without any discussion of trust validation, privacy review, integrity checks, or failure handling. In an automated content-generation workflow, outbound requests can leak usage metadata and introduce untrusted remote content that may be inaccurate, unavailable, or manipulated, affecting downstream published output.

External Transmission

Medium
Category
Data Exfiltration
Content
# 推荐 API
- 老黄历 API: https://api.qingyunke.com/api.php?key=free&appid=01&msg=今日黄历
- 万年历 API: https://www.sojson.com/open/api/huangli.shtml
- 农历 API: https://api.lwl12.com/day

# 或手动更新脚本中的日期数据
```
Confidence
82% confidence
Finding
This reference to a third-party lunar-calendar API similarly introduces external network dependency and untrusted input into the generation pipeline. Even if only date queries are sent, the integration expands the attack surface through data exfiltration of operational metadata, service compromise, poisoned responses, or reliability issues that could taint generated images at scale.

External Transmission

Medium
Category
Data Exfiltration
Content
try:
        # 使用青云客 API
        response = requests.get(
            'https://api.qingyunke.com/api.php',
            params={'key': 'free', 'appid': '01', 'msg': '今日黄历'}
        )
        data = response.json()
Confidence
93% confidence
Finding
The example instructs users to modify the generator to fetch data from an external API without any validation, trust boundary discussion, timeout settings, or integrity checks. In an agent skill context, this creates a data exfiltration and supply-chain style risk because externally sourced content could be malformed, manipulated, or unexpectedly sensitive, then incorporated into generated outputs or downstream workflows.

Skill Enumeration

Medium
Category
Agent Snooping
Content
## 🔗 相关资源

- **技能文档**: `skills/almanac-creator/SKILL.md`
- **制作标准**: `skills/almanac-creator/references/almanac-image-standard.md`
- **生成脚本**: `skills/almanac-creator/scripts/generate_almanac.py`
- **复盘文档**: `memory/黄历制作复盘/2026-04-08 黄历制作流程复盘.md`
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The docstring states the script uses a unified Chinese font to maintain readability and brand consistency, and the generated user-facing content throughout the file is entirely Chinese. There is no indication that users can choose another language or locale, so the skill effectively enforces a specific language without opt-in.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
该 markdown 文件的标题、说明、示例和发布模板均仅以中文呈现,未见任何用户语言偏好选择、替代语言版本或明确的地域/语言适用范围说明。按规则,强制特定语言而无用户 opt-in 属于自然语言层面的语言/locale 政策风险。

Intent-Code Divergence

Low
Confidence
88% confidence
Finding
The code rotates wellness advice from a multi-season pool in get_almanac_data, but page 2 always renders the heading '春季养生'. That creates a direct contradiction between what the page label says and the underlying content when the selected advice corresponds to summer, autumn, or winter.

Description-Behavior Mismatch

Low
Confidence
84% confidence
Finding
The manifest frames the skill as a daily almanac image generator focused on zodiac fortune, fengshui tips, auspicious timing, and dressing advice for social-media publishing. In addition to those functions, this file generates a full third page devoted to '黄历科普' and multi-line seasonal stories, which expands the behavior into educational/editorial content not described in the manifest.

Context-Inappropriate Capability

Low
Confidence
80% confidence
Finding
The manifest describes a content-generation skill, but this function consults OPENCLAW_OUTPUT from the process environment to alter filesystem behavior. Reading environment state is not an obvious requirement for generating almanac images and introduces a capability outside the stated purpose.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
The implementation in get_default_output returns OPENCLAW_OUTPUT if set, otherwise '<skill_dir>/output'. However, the --output argument help text later states the default is '当前目录/reports/', which actively misdescribes the actual destination and could mislead operators about where files are written.

Static analysis

No suspicious patterns detected.