Back to skill

Security audit

ios-sharesdk-integreation

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for iOS ShareSDK integration, but it handles many platform secrets through a plaintext project-root Excel file and app plist without enough safeguards.

Review this skill before installing if your ShareSDK setup uses real production credentials. Use throwaway or restricted app credentials where possible, keep ShareSDK_Config.xlsx out of version control and CI artifacts, delete or redact it after integration, and avoid placing any provider secret in a mobile app bundle unless that provider explicitly documents it as safe for client distribution.

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

Warning
Location
assets/generate_excel_template.py:460
Finding
Plaintext Collection and Client-Side Storage of Platform Secrets<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:254-275`, `SKILL.md:303-318`, `SKILL.md:339-359`, `SKILL.md:482-487`; `assets/generate_excel_template.py:21-25`, `assets/generate_excel_template.py:34-37`, `assets/generate_excel_template.py:58-61`, `assets/generate_excel_template.py:225-228`, `assets/generate_excel_template.py:300-303`, `assets/generate_excel_template.py:460-463` **Vulnerability Type**: Plaintext sensitive-data storage and client-side secret exposure **Risk Level**: Medium ### Vulnerable Code The workbook generator creates plaintext fields for MobTech and third-party platform secrets: ```python create_sheet( wb, "基础信息", ["字段", "值", "说明"], [ ["mobAppKey", "", "MobTech 后台申请得到的 AppKey"], ["mobAppSecret", "", "MobTech 后台申请得到的 AppSecret"], ["needShareUI", "", "YES / NO,是否需要官方分享面板 UI"], ["needAuth", "", "YES / NO,是否需要第三方登录授权"], ], {"A": 24, "B": 34, "C": 64}, ) ``` Platform worksheets similarly solicit confidential values: ```python { "title": "微信", "category": "国内", "open_url": "http://open.weixin.qq.com", "apply_tips": "链接", "fields": [ ("appId", "", "微信开放平台 appId,以 wx 开头"), ("appSecret", "", "微信开放平台 appSecret"), ("universalLink", "", "官方示例要求配置"), ("useWeChatFull", "", "YES / NO,YES 时使用 WeChatFull"), ], }, ``` The Skill instructs the agent to copy this workbook into the target project's root directory and have the user populate it: ```text 1. Run assets/generate_excel_template.py from the Skill directory. 2. Generate or update assets/ShareSDK_Config_Template.xlsx. 3. Copy assets/ShareSDK_Config_Template.xlsx to the user project's root. 4. Name the copied file ShareSDK_Config.xlsx. ``` The Skill also directs the agent to place the MobTech secret in the application property list: ```text At minimum, validate and write: - MOBAppKey - MOBAppSecret - CFBundleURLTypes - LSApplicationQueriesSchemes ``` ### Technical Anal ...[truncated 3458 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Classify every configuration value** - Document which values are public mobile client identifiers and which are confidential credentials. - Do not request server-capable secrets unless the mobile SDK strictly requires them and the provider explicitly documents them as safe for client distribution. 2. **Keep confidential credentials on a backend** - Store confidential values in a server-side secret manager. - Have the iOS application communicate with a controlled backend for operations requiring those credentials. - Issue narrowly scoped, short-lived tokens to the client where supported. 3. **Protect the generated workbook** - Automatically add `ShareSDK_Config.xlsx` and generated variants to `.gitignore`. - Warn users before creating the file that it may contain confidential data. - Apply restrictive filesystem permissions where the platform supports them. - Never print workbook values in logs, chat responses, generated documentation, command output, or error messages. - Delete the workbook after successful extraction, or replace confidential cells with redacted placeholders after obtaining explicit user consent. - Prefer a temporary file outside the repository over a file in the project root. 4. **Add repository and CI safeguards** - Run secret scanning before commits and during CI. - Reject commits containing the workbook or recognized credential patterns. - Ensure CI artifacts, caches, and diagnostic bundles do not include the workbook. - If a credential has already entered version control, rotate it and purge it from repository history. 5. **Avoid treating `Info.plist` as a secret store** - Place only provider-documented public client configuration in `Info.plist`. - Clearly warn that all application-bundle values are recoverable by end users. - Move confidential operations and credentials to a backend rather than attempting to hide them through obfuscation. 6. ...[truncated 357 chars]
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
声明描述的是一个会对 iOS 工程执行 ShareSDK 集成流程的技能,重点包括工程扫描、阻塞项确认、最小化改动接入 CocoaPods/ShareSDK、隐私合规和文档落地。实际提供的代码仅进行静态数据整理并输出 Excel 配置模板文件,主要作用是收集各平台 app key/secret、回调地址等信息。虽然主题与 ShareSDK 配置相关,属于集成前的辅助资产,但它不是声明中的主要行为,也没有实现所宣称的工程级集成能力。因此属于明显的描述与行为不匹配。

Session Persistence

Medium
Category
Rogue Agent
Content
- `MOBTwitterVer`
- `MOBForceHttps`

**⚠️ 物理 Info.plist 要点(替代 GENERATE_INFOPLIST_FILE 时)**

如果工程使用 `GENERATE_INFOPLIST_FILE = YES`(Xcode 自动生成),而你需要改为物理 Info.plist 文件,务必在 Info.plist 中包含以下关键键,否则安装会失败:
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
- `MOBTwitterVer`
- `MOBForceHttps`

**⚠️ 物理 Info.plist 要点(替代 GENERATE_INFOPLIST_FILE 时)**

如果工程使用 `GENERATE_INFOPLIST_FILE = YES`(Xcode 自动生成),而你需要改为物理 Info.plist 文件,务必在 Info.plist 中包含以下关键键,否则安装会失败:
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
- `MOBTwitterVer`
- `MOBForceHttps`

**⚠️ 物理 Info.plist 要点(替代 GENERATE_INFOPLIST_FILE 时)**

如果工程使用 `GENERATE_INFOPLIST_FILE = YES`(Xcode 自动生成),而你需要改为物理 Info.plist 文件,务必在 Info.plist 中包含以下关键键,否则安装会失败:
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
- `MOBTwitterVer`
- `MOBForceHttps`

**⚠️ 物理 Info.plist 要点(替代 GENERATE_INFOPLIST_FILE 时)**

如果工程使用 `GENERATE_INFOPLIST_FILE = YES`(Xcode 自动生成),而你需要改为物理 Info.plist 文件,务必在 Info.plist 中包含以下关键键,否则安装会失败:
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
- `MOBTwitterVer`
- `MOBForceHttps`

**⚠️ 物理 Info.plist 要点(替代 GENERATE_INFOPLIST_FILE 时)**

如果工程使用 `GENERATE_INFOPLIST_FILE = YES`(Xcode 自动生成),而你需要改为物理 Info.plist 文件,务必在 Info.plist 中包含以下关键键,否则安装会失败:
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
- `MOBTwitterVer`
- `MOBForceHttps`

**⚠️ 物理 Info.plist 要点(替代 GENERATE_INFOPLIST_FILE 时)**

如果工程使用 `GENERATE_INFOPLIST_FILE = YES`(Xcode 自动生成),而你需要改为物理 Info.plist 文件,务必在 Info.plist 中包含以下关键键,否则安装会失败:
Confidence
75% 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.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This code embeds worksheet titles, field descriptions, and user-facing guidance almost entirely in Chinese, which imposes a specific language on users without opt-in or alternative locale handling. The policy scope explicitly covers language/locale violations in code string literals, and there is no indication that this is a justified region-specific-only tool.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Session Persistence

Medium
Category
Rogue Agent
Content
## 只接指定平台

```text
使用 ios-sharesdk-integreation skill,这次只接微信和 QQ。请先确认 Podfile、Info.plist 和入口文件分别要改哪里。
```

## 带隐私合规要求
Confidence
75% 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.

Static analysis

No suspicious patterns detected.