跳转到正文
报告库
用途分类 / 其他用途

Momentic Mobile Test Skill 安全审计

作者说它能做什么(原文)

Create, run, and maintain Momentic mobile E2E tests and modules for Android and iOS. Use Momentic MCP tools for live device validation, and use direct v2 YAML edits only for high-confidence local mobile v2 changes.

第三方安全检查结论

发现安全风险

已检查文件
1
发现的风险
4
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。发现 1 项风险
中风险

`npx` 命令可能下载并执行未固定版本的软件包

原文依据:2 处
发现了什么

初始化诊断和 YAML 检查都要求运行 `npx momentic-mobile`,但指令没有固定版本或要求验证已安装的二进制文件。当本地不存在该包时,npx 可能从包注册表获取并执行代码。

为什么需要注意

被替换、受损或意外升级的软件包会以当前用户权限执行,可能读取项目文件、环境凭据或更改工作区。

两处都是实际工作流命令,且都使用没有版本限定的 `npx momentic-mobile`。本地缺少合适副本时,`npx` 可能联网获取并执行软件包;诊断和 lint 的正当用途并不能消除未固定依赖带来的代码变化或供应链风险。用户可要求固定并核验版本,或仅允许预先安装的受信二进制文件。

SKILL.md:66来自说明文档打开原文件
Run `npx momentic-mobile doctor` for initial setup and launch, driver, device,or connectivity failures. Use `--json` when collecting a support report. Seethe [doctor reference](https://momentic.ai/docs/cli-reference/momentic-mobile/commands/doctor).
查看另外 1 个位置
SKILL.md:205来自说明文档打开原文件
Consult [File format](https://momentic.ai/docs/core-concepts/file-format) fortop-level structure and [Steps](https://momentic.ai/docs/core-concepts/steps) forstep syntax. Run `npx momentic-mobile lint` when schema or file-reference riskwarrants it.
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
中风险

测试上下文可接触环境变量、验证码、消息、数据库和界面内容

原文依据:3 处
发现了什么

该 Skill 允许读取环境变量,并允许 JavaScript 访问 API、数据库、OTP、电子邮件和短信;设备截图和序列化状态也可能包含账号、消息或其他个人数据。

为什么需要注意

这些数据可能进入测试变量、截图、轨迹、缓存或提供商处理流程。若使用真实账号或生产环境,可能暴露凭据、验证码、客户数据或会话内容。

该 Skill 的测试能力确实可接触环境变量,并允许 JavaScript 用于 API、数据库、验证码、邮件和短信;截图或序列化设备状态也可能显示敏感界面数据。访问并非无条件:环境变量要求按需且经过筛选,设备状态也只应在截图不足时请求。用户可提供专用测试账号和假数据、限制环境变量范围,并要求日志、截图和状态输出做脱敏及限定留存。

SKILL.md:186来自说明文档打开原文件
Use mobile JavaScript for test setup, data generation, APIs, databases,OTP/email/SMS, assertions, and context writes that no native step expresses.Keep one-off code short; for reusable v2 scripts, follow nearby projectconventions. See the[mobile JavaScript command](https://momentic.ai/docs/reference/mobile-commands/javascript)for current syntax.
查看另外 2 个位置
SKILL.md:234来自说明文档打开原文件
  a different test. Prefer active session and splice responses afterward.- Use filtered `momentic_get_environment_variables` only when a step needs env  data that is not already known.- Use `momentic_module_recommend` -> `momentic_module_get` only when evaluating  reuse; recommendation invokes AI and is not required to start a session.
SKILL.md:264来自说明文档打开原文件
MCP screenshots are the default signal. Request serialized emulator state foraccessible names, native XML, webview structure, screen bounds, or offscreencontext. Read environment and installed-app artifacts only when diagnosing data,launch, or install behavior.
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 1 项风险
低风险

安装命令没有固定依赖版本

原文依据:3 处
发现了什么

安装命令没有指定依赖版本。同样的命令以后可能下载不同代码,你实际安装的内容可能与这次检查时不同。

为什么需要注意

即使命令和报告没变,以后安装时也可能下载到另一份代码。

该行是有效的设置/故障诊断指令,要求运行未注明版本的 `npx momentic-mobile doctor`。如果本机没有可用副本,`npx` 可能从软件包注册表下载并执行当时发布的版本,因此不同时间执行可能运行不同代码。用户可要求作者固定版本,并在执行前确认软件包来源与版本。

这是在存在架构或文件引用风险时运行检查器的有效指令。命令没有固定 `momentic-mobile` 的版本;若 `npx` 需要获取软件包,它可能下载并执行当前注册表版本。该操作是合理的 YAML 校验,但仍有供应链和版本漂移风险。用户可限制为已审核、固定版本的软件包。

SKILL.md:66来自说明文档打开原文件
Run `npx momentic-mobile doctor` for initial setup and launch, driver, device,or connectivity failures. Use `--json` when collecting a support report. Seethe [doctor reference](https://momentic.ai/docs/cli-reference/momentic-mobile/commands/doctor).
查看另外 2 个位置
SKILL.md:207来自说明文档打开原文件
top-level structure and [Steps](https://momentic.ai/docs/core-concepts/steps) forstep syntax. Run `npx momentic-mobile lint` when schema or file-reference riskwarrants it.
SKILL.md:205来自说明文档打开原文件
Consult [File format](https://momentic.ai/docs/core-concepts/file-format) fortop-level structure and [Steps](https://momentic.ai/docs/core-concepts/steps) forstep syntax. Run `npx momentic-mobile lint` when schema or file-reference riskwarrants it.
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。发现 1 项风险
中风险

获批的测试步骤可触发真实购买、发送或其他不可逆业务操作

原文依据:2 处
发现了什么

该 Skill 明确承认预览或运行步骤可能提交、购买、删除、发送或创建内容。虽然要求先征得同意并最多执行一次,但一次真实操作仍可能产生费用、发送外部消息或改变账号状态。

为什么需要注意

如果测试连接生产账号、真实付款方式或真实收件人,单次执行也可能造成收费、订单、通知、数据删除或无法轻易撤销的外部影响。

原文明确说明测试步骤可能执行提交、购买、删除、发送、创建等有副作用的操作。它设置了重要保护:执行前必须询问用户,获批后最多一次,并要求对非幂等动作先预览准备过程、再仅运行已批准的动作。不过一次获批执行仍可能收费、联系外部人员或改变/删除账号数据。用户应明确指定测试环境、账号、金额、收件人和允许的单次动作。

SKILL.md:85来自说明文档打开原文件
Confirm the goal, user-visible success criteria, platform, app source, provider,auth, and env requirements. Ask before previewing or running any step or AIaction that may submit, purchase, delete, send, create, or cause anothernon-idempotent side effect. If approved, execute it at most once. Also ask beforeusing local device overrides, editing a shared module, restarting a long flow, orrunning an expensive full test.
查看另外 1 个位置
SKILL.md:260来自说明文档打开原文件
Batch obvious low-risk steps. Preview uncertain targets individually. For anon-idempotent action, preview setup, splice the checkpoint, then run theapproved saved action at most once.

Skill 逻辑拆解

8 个说明模块

该 Skill 用于创建、编辑和运行 Android/iOS 端到端测试。对于已知的 v2 测试,它允许直接修改 YAML;对于 v1 或需要探索界面的情形,它通过 MCP 会话预览、写入步骤并验证结果。

查看原文
SKILL.md:45来自说明文档打开原文件
- **Known v2 change:** inspect nearby patterns -> edit YAML -> lint when syntax  or references are uncertain -> reload or restart if validating -> run the  relevant range.- **V1, unknown UI, or interactive validation:** start MCP session -> run any  prerequisites -> preview a logical checkpoint -> splice it -> validate the  saved range -> terminate.- **New test:** create with `momentic_test_create` -> author a known v2 sequence  in one YAML edit, or use MCP step-by-step when live discovery is needed.  `momentic_session_start` only opens an existing test.

该 Skill 明确要求在可能提交、购买、删除、发送或创建内容之前征得用户同意,并将已批准的非幂等操作限制为最多执行一次。它也要求在更改共享模块、使用本地设备覆盖或运行昂贵的完整测试前询问用户。

查看原文
SKILL.md:85来自说明文档打开原文件
Confirm the goal, user-visible success criteria, platform, app source, provider,auth, and env requirements. Ask before previewing or running any step or AIaction that may submit, purchase, delete, send, create, or cause anothernon-idempotent side effect. If approved, execute it at most once. Also ask beforeusing local device overrides, editing a shared module, restarting a long flow, orrunning an expensive full test.

测试执行会处理屏幕截图、原生层级、WebView 状态及缓存元数据;测试范围内的环境值还能跨步骤和模块持续存在。

查看原文
SKILL.md:8来自说明文档打开原文件
Momentic Mobile turns structured natural language into native and webviewautomation on Android emulators and iOS simulators. Interactive steps resolvetargets into device actions; assertions can inspect screenshots, nativehierarchies, and webview state.
SKILL.md:118来自说明文档打开原文件
Momentic caches native selectors, XML nodes, visible text, webview state,coordinates, and other metadata. AI checks may also reuse past-result memory.Stale cache or memory can explain a fast wrong-target action or a repeatedborderline verdict.Cache is scoped by git metadata, including branch. Protected branches read cachebut do not write it unless `--save-cache` is used or `CI` is set.
SKILL.md:170来自说明文档打开原文件
Each run has a test-scoped `env` that persists across steps and modules.- In v2, save returned values with `saveAs`; in MCP step strings, use  `--env-key`. Use `setVariable(name, value)` in JavaScript when saving several  values.- Use `env.NAME` in JavaScript and module input expressions. Use  `{{ env.NAME }}` in string fields, but not inside JavaScript source.- Module inputs are JavaScript fragments stored as strings. Quote literal
从这里开始 · 工作说明SKILL.md
momentic-mobile-test
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。 另有 2 个章节,可在原文件中查看。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • SKILL.md工作说明

代码和说明中提到的操作

安装其他软件包
SKILL.md:66来自说明文档打开原文件
Run `npx momentic-mobile doctor` for initial setup and launch, driver, device,or connectivity failures. Use `--json` when collecting a support report. See
SKILL.md:207来自说明文档打开原文件
top-level structure and [Steps](https://momentic.ai/docs/core-concepts/steps) forstep syntax. Run `npx momentic-mobile lint` when schema or file-reference riskwarrants it.
连接外部网站
SKILL.md:68来自说明文档打开原文件
or connectivity failures. Use `--json` when collecting a support report. Seethe [doctor reference](https://momentic.ai/docs/cli-reference/momentic-mobile/commands/doctor).
SKILL.md:73来自说明文档打开原文件
once a simulator build is available. Follow the[Android](https://momentic.ai/docs/platforms/android/app-setup) or[iOS](https://momentic.ai/docs/platforms/ios/app-setup) setup guide rather than
SKILL.md:74来自说明文档打开原文件
[Android](https://momentic.ai/docs/platforms/android/app-setup) or[iOS](https://momentic.ai/docs/platforms/ios/app-setup) setup guide rather thanguessing at missing dependencies.
读取了多少行
337
文件校验值(用于核对版本)
b6ef557d4437218004397f58f4b6a3b44b229300c76b32dbe46dc6d761c9b486