Back to skill

Security audit

配置拉取代码生成

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent code-generation purpose, but it needs review because it requires writing generated app code into the workspace without clear safeguards for confirmation, overwrites, or unsafe template values.

Install only if you expect this skill to modify an Android project. Review generated diffs before keeping them, avoid using untrusted names, keys, URLs, or JSON fields as inputs, and validate or escape template values before compiling generated code.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
references/config-center-template.md:10
Finding

Unvalidated Template Interpolation Enables Kotlin Source-Code Injection

Content
View full analysis
query{Name}Config(@Body {Name}Request request); } ``` `references/config-center-template.md:10-13`: ```kotlin private const val CONFIG_KEY_CONFIG_VERSION = "1.0.0" private const val CONFIG_KEY_YZ_HD_{NAME}_CONFIG = "{componentKey}" private const val TAG = "{Name}ConfigManager" private const val CONFIG_KEY_YZ_HD_{NAME}_CONFIG_KEY = "{fieldKey}" ``` `references/push-pull-template.md:10-11`: ```kotlin private const val PUSH_KEY = "{pushKey}" private const val PULL_URL = "{pullUrl}" ``` `references/whitelist-template.md:9`: ```kotlin WhiteListTask.isInWhiteList({key}).subscribe({ result -> // TODO 待实现 }, { error -> // TODO 待实现 }) ``` ### Technical Analysis The placeholders include configuration names, JSON-derived field names, API URLs, component keys, field keys, push keys, pull URLs, and whitelist keys. These values can enter either: 1. **Kotlin string-literal contexts**, such as `"{componentKey}"` and `"{pullUrl}"`; or 2. **Kotlin identifier contexts**, such as `{Name}`, `{NAME}`, method names, class names, and generated JSON property names. No instruction requires escaping Kotlin string literals, rejecting line breaks or control characters, validating identifiers ...[truncated 2393 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs the agent to write generated code directly into workspace files without requiring explicit user confirmation or warning that local files will be modified. In an agent setting, this creates an unsafe side effect boundary: a user may believe they are only requesting a template, while the skill performs file mutations that could overwrite existing code or introduce unintended changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This repeated requirement reinforces mandatory workspace modification as part of normal execution, again without any user warning or consent step. Repetition increases the chance the agent treats file writes as compulsory behavior, making accidental or unauthorized project changes more likely in a real development workspace.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s instructional content and examples are presented in Chinese only, beginning with the title and continuing through the usage guidance. Under the policy, forcing a specific language without user opt-in or documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L087-L142 声称是“完整示例”,但 ActivityRefreshUtils 中定义的是 registerMemberPriceNotification(),回调里又调用 MemberPriceConfigManager.saveActivityConfig(...) 和 queryOfflineMemberPriceConfig()。这使示例文档对“该模板生成何种配置拉取/推送代码”的开发者意图产生直接冲突,属于注释/文档与代码示例行为不一致。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document’s instructional content is written in Chinese and does not indicate that language selection is optional or that the template is intended only for a Chinese-speaking or region-specific context. This can violate language/locale policy when a skill implicitly forces one language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file’s user-facing headings and instructions are entirely in Chinese, such as the title and usage notes, with no indication that other languages are supported. This can violate a language/locale policy when a skill or template imposes a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language instructions and headings are presented only in Chinese, which can amount to a language policy violation when no user opt-in or locale limitation is stated. There is no indication that the skill is intended exclusively for a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This markdown file explains generating a configuration manager with push notification registration logic, which implies remote communication and automatic configuration updates. The description and usage notes do not warn that the skill/template performs network-backed config pulls/push-triggered refreshes that may affect application behavior or data handling.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

L068-L082 标注为“对应的 Manager 示例”,但示例中的函数命名和参数类型前后不一致:MemberPriceConfigManager 暴露 queryOfflineMemberPriceConfig(),却又提供 saveActivityConfig(config: ActivityConfig)。这不是单纯信息缺失,而是文档示例主动把 MemberPrice 与 Activity 两种不同配置意图混在一起,和其宣称的 manager 对应关系相矛盾。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.