Back to skill

Security audit

iOS Shortcut Builder

Security checks for vulnerabilities and agentic risk

Overview

This skill is marked suspicious because its documented file-sharing workflow may expose private certificate keys, and device trust setup carries security consequences; the scanner’s inspection was incomplete.

Consider avoiding installation until the delivery workflow and packaged signing executable have been independently reviewed. If you proceed, do not share the project directory through the documented server; the scan says that could make private keys downloadable. Treat installing the generated root certificate and enabling full trust as a lasting, broad device trust change. Coverage was partial: the packaged executable was not inspected, and some static analysis was limited.

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
SKILL.md
Finding

LAN delivery server exposes the CA and shortcut-signing private keys

Content
View full analysis

Impact

A reachable network peer can download the CA and signing private keys and use them to issue certificates or produce signatures under the compromised identity. Devices that retain trust in this CA are exposed to forged artifacts; use of those artifacts still depends on the relevant device workflow.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (66)

The file-delivery workflow starts an HTTP server without warning that it can expose the CA private key.

High
Category
Output Handling
Confidence
99% confidence
Finding

The delivery instructions recommend an unauthenticated HTTP server rooted at the current directory without explaining that the default certs/ directory contains downloadable private keys. This unsafe default undermines the private-key confidentiality warnings elsewhere and can expose those keys to any client able to reach the server.

Content

No source excerpt is available for this finding.

The delivery command exposes the private-key directory despite the promise that private keys never leave the machine.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

Following the documented workflow from the skill directory, python3 -m http.server 8000 -d . serves certs/ alongside deliverable files, with no authentication and an all-interface bind by default. A reachable client can download CA and signing private keys, compromising signing authority and potentially enabling certificate impersonation against devices trusting that CA.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · bin/sc (reported line 149)May include surrounding context.

text
def _cert_env():
    """把证书目录透传给 gen-certs.sh,两边必须认同一个位置。"""
    return {**os.environ, "CERT_DIR": str(CERT_DIR)}


def cmd_init(args):

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding

An executable artifact remains available under the skill install path but its content is outside analyzer coverage.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/sign.sh (reported line 102)May include surrounding context.

sh
echo "==> 反解校验(签名前后动作数必须一致)"
  TMP="$(mktemp -d)"
  "${ENVV[@]}" "$SIGN" extract -i "$OUT" -o "$TMP/back.shortcut" >/dev/null 2>&1 || {
    echo "    ✗ 反解失败"; rm -rf "$TMP"; exit 6; }
  python3 - "$IN" "$TMP/back.shortcut" <<'PY'
import sys, plistlib
def n(p):

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · tests/selftest.sh (reported line 86)May include surrounding context.

sh
chk "同一张时明确说不用重装" 'grep -q "不用再装" <<< "$same"'

COPY="$TMP/skill"
cp -a "$DIR" "$COPY"; rm -rf "$COPY/certs" "$COPY/out"
NOKEYS="$TMP/nokeys"   # 副本用空目录,模拟「本机还没有证书」
aout=$(SC_CERT_DIR="$NOKEYS" "$PY" "$COPY/bin/sc" adopt "$TMP/SignTest-signed.shortcut" --dry-run 2>&1)
chk "无证书时沿用样本里的 CA 名" 'grep -q "沿用它的 CA 名" <<< "$aout"'

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · tests/selftest.sh (reported line 86)May include surrounding context.

sh
chk "同一张时明确说不用重装" 'grep -q "不用再装" <<< "$same"'

COPY="$TMP/skill"
cp -a "$DIR" "$COPY"; rm -rf "$COPY/certs" "$COPY/out"
NOKEYS="$TMP/nokeys"   # 副本用空目录,模拟「本机还没有证书」
aout=$(SC_CERT_DIR="$NOKEYS" "$PY" "$COPY/bin/sc" adopt "$TMP/SignTest-signed.shortcut" --dry-run 2>&1)
chk "无证书时沿用样本里的 CA 名" 'grep -q "沿用它的 CA 名" <<< "$aout"'

Session Persistence

Medium
Category
Rogue Agent
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.

Content

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

ca.crt / ca.key CA 证书与私钥 sign.crt / sign.key 签名证书与私钥 key.bin X9.63 裸私钥(97 字节) auth.plist 证书链,签名时用 ca.mobileconfig 发到手机上装的那个

text

Session Persistence

Medium
Category
Rogue Agent
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.

Content

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

md
| 导入报「无法验证」 | 只装了描述文件 | 还要去「证书信任设置」开完全信任 |
| 导入后名字变问号 | 文件名或指令名带中文 | 全改 ASCII 重新生成 |
| `ModuleNotFoundError: shortcutkit` | 装到了另一个 Python | 用同一个解释器:`python3 -m pip install shortcutkit` |
| 生成成功但手机上动作是空的 | 参数键写错、被 iOS 静默丢弃 | 生成阶段的校验会拦;不要手改 plist |
| 签名器 `verify` 返回 0 却报失败 | 该命令失败也返回 0 | 用 `sc verify`,它已封装这层判断 |
| `shortcut-sign verify` 段错误(139) | 喂了未签名文件,它不判空 | 别直接调它;`sc verify` 会先查文件头 |
| 备忘录/提醒跑出来是空的 | `entity` 指向的列表不存在 | `note.append` 会自动建;`reminder.add` 固定「任务」列表 |

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · THIRD-PARTY-NOTICES.md (reported line 26)May include surrounding context.

md
- 来源:https://github.com/frontboat/shortcutkit
- 版本:3.2.0(`pip install shortcutkit`)
- 许可证:MIT
- 用途:把动作定义编译成 `.shortcut` 的 plist 结构,注册了 1714 个动作
- 分发方式:由用户在自己机器上 pip 安装,本包不含其源码

### libplist

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · THIRD-PARTY-NOTICES.md (reported line 46)May include surrounding context.

md
## 关于签名证书

`certs/` 目录里的一切(CA 私钥、签名私钥、`key.bin`、`auth.plist`)
都是**使用者自己机器上生成的**,不属于本项目的分发内容,也不含任何第三方材料。
发布包永远不含 `certs/`。

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · lib/compile.py (reported line 13)May include surrounding context.

python
import difflib
import json
import plistlib
import re
from pathlib import Path

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · lib/compile.py (reported line 322)May include surrounding context.

python
out_path.parent.mkdir(parents=True, exist_ok=True)
        self._s.write(str(out_path))
        doc = plistlib.load(open(out_path, "rb"))
        # 需要人点的动作放进自动化会卡住,提前说清楚
        blocking = [a for a in doc.get("WFWorkflowActions", [])
                    if a["WFWorkflowActionIdentifier"] in INTERACTIVE

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · lib/compile.py (reported line 333)May include surrounding context.

python
f"配方里有 {len(blocking)} 个需要人操作的动作(菜单/弹框/输入框/听写),"
                "放进「自动化」跑到那里仍会停下等人——想全自动就别用它们")
        doc["WFWorkflowName"] = name
        plistlib.dump(doc, open(out_path, "wb"), fmt=plistlib.FMT_BINARY)
        return self.report(doc, out_path)

    def report(self, doc, out_path) -> dict:

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · lib/compile.py (reported line 333)May include surrounding context.

python
f"配方里有 {len(blocking)} 个需要人操作的动作(菜单/弹框/输入框/听写),"
                "放进「自动化」跑到那里仍会停下等人——想全自动就别用它们")
        doc["WFWorkflowName"] = name
        plistlib.dump(doc, open(out_path, "wb"), fmt=plistlib.FMT_BINARY)
        return self.report(doc, out_path)

    def report(self, doc, out_path) -> dict:

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · lib/shortcut_file.py (reported line 14)May include surrounding context.

python
import json
import os
import plistlib
import re
import tempfile
import urllib.error

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · lib/shortcut_file.py (reported line 80)May include surrounding context.

python
if kind(path) != "unsigned":
        return None
    try:
        d = plistlib.loads(Path(path).read_bytes())
    except Exception:
        return None
    return d.get("WFWorkflowName") or None

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · lib/shortcut_file.py (reported line 112)May include surrounding context.

python
return []
    try:
        n = struct.unpack("<I", raw[8:12])[0]
        meta = plistlib.loads(raw[12:12 + n])
        return list(meta.get("SigningCertificateChain") or [])
    except Exception:
        return []

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · scripts/gen-certs.sh (reported line 2)May include surrounding context.

sh
#!/usr/bin/env bash
# gen-certs.sh — 生成一套专属的快捷指令自签证书(CA + 签名证书 + 私钥 + auth.plist + mobileconfig)
#
# 用法:
#   ./scripts/gen-certs.sh                 # 输出到 ./certs/

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · scripts/gen-certs.sh (reported line 15)May include surrounding context.

sh
#   sign.key      签名私钥(PEM)
#   sign.crt      签名证书(含 Apple OID 1.2.840.113635.100.18.1)
#   key.bin       X9.63 格式私钥(97 字节:04||X||Y||K),shortcut-sign 只认这个
#   auth.plist    签名身份数据(二进制 plist,SigningCertificateChain=[签名证书,CA])
#   ca.mobileconfig  iPhone 安装用的描述文件(内含根证书)
set -euo pipefail

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · scripts/gen-certs.sh (reported line 15)May include surrounding context.

sh
#   sign.key      签名私钥(PEM)
#   sign.crt      签名证书(含 Apple OID 1.2.840.113635.100.18.1)
#   key.bin       X9.63 格式私钥(97 字节:04||X||Y||K),shortcut-sign 只认这个
#   auth.plist    签名身份数据(二进制 plist,SigningCertificateChain=[签名证书,CA])
#   ca.mobileconfig  iPhone 安装用的描述文件(内含根证书)
set -euo pipefail

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · scripts/gen-certs.sh (reported line 43)May include surrounding context.

sh
command -v openssl >/dev/null || die "缺 openssl"
command -v python3 >/dev/null || die "缺 python3"

if [ -f "$CERT_DIR/auth.plist" ] && [ "$FORCE" != 1 ]; then
  die "certs/ 已有证书。重生成请加 --force(旧证书作废,手机上要重新装)"
fi

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · scripts/gen-certs.sh (reported line 103)May include surrounding context.

sh
PY
chmod 600 "$CERT_DIR/key.bin"

log "4/6 生成 auth.plist(证书链)"
python3 - "$CERT_DIR" <<'PY'
import sys, pathlib, plistlib
d = pathlib.Path(sys.argv[1])

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · scripts/gen-certs.sh (reported line 105)May include surrounding context.

sh
log "4/6 生成 auth.plist(证书链)"
python3 - "$CERT_DIR" <<'PY'
import sys, pathlib, plistlib
d = pathlib.Path(sys.argv[1])
chain = [(d / "sign.der").read_bytes(), (d / "ca.der").read_bytes()]
plistlib.dump({"SigningCertificateChain": chain}, open(d / "auth.plist", "wb"), fmt=plistlib.FMT_BINARY)

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · scripts/gen-certs.sh (reported line 108)May include surrounding context.

sh
import sys, pathlib, plistlib
d = pathlib.Path(sys.argv[1])
chain = [(d / "sign.der").read_bytes(), (d / "ca.der").read_bytes()]
plistlib.dump({"SigningCertificateChain": chain}, open(d / "auth.plist", "wb"), fmt=plistlib.FMT_BINARY)
print("   auth.plist 写入,链长 2(签名证书 + CA)")
PY
chmod 600 "$CERT_DIR/auth.plist"