跳转到正文
报告库
用途分类 / 浏览器操作

Flutter Setup Declarative Routing Skill 安全审计

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

Configure `MaterialApp.router` using a package like `go_router` for advanced URL-based navigation. Use when developing web applications or mobile apps that require specific deep linking and browser history support.

第三方安全检查结论

发现安全风险

已检查文件
1
发现的风险
2
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 2 项风险
中风险

示例将应用关联扩大到域名下的所有 URL

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

Android 关联声明使用 handle_all_urls 且 intent filter 没有限定路径;iOS AASA 同时使用通配路径 “*” 和 “/*”。照搬后,应用会声明处理该域名下远超示例详情页的链接。

为什么需要注意

如果域名还承载登录、付款、管理后台或其他产品页面,这些链接可能被意外导入应用。应用若未安全处理相应路径和参数,用户可能看到错误流程或依据非预期深链采取操作。

该风险有源码支持。若用户原样替换占位符并部署这些关联文件,Android 的声明要求处理该应用与域名的所有 URL,且 intent filter 未限制路径;iOS 配置也使用覆盖全部路径的通配符。这可能使本应只处理详情页的应用接管该域名下其他链接。用户可要求作者将 Android intent filter 和两种站点关联文件限制到实际需要的路径,并确认是否确实需要全域关联。

SKILL.md:102来自说明文档打开原文件
```xml<intent-filter android:autoVerify="true">    <action android:name="android.intent.action.VIEW" />    <category android:name="android.intent.category.DEFAULT" />    <category android:name="android.intent.category.BROWSABLE" />    <data android:scheme="http" android:host="yourdomain.com" />    <data android:scheme="https" /></intent-filter>```
查看另外 4 个位置
SKILL.md:112来自说明文档打开原文件
```json[{  "relation": ["delegate_permission/common.handle_all_urls"],  "target": {    "namespace": "android_app",    "package_name": "com.yourcompany.yourapp",    "sha256_cert_fingerprints": ["YOUR_SHA256_FINGERPRINT"]  }}]```
SKILL.md:138来自说明文档打开原文件
```json{  "applinks": {    "apps": [],    "details": [{      "appIDs": ["TEAM_ID.com.yourcompany.yourapp"],      "paths": ["*"],      "components": [{"/": "/*"}]    }]  }}```
SKILL.md:113来自说明文档打开原文件
[{  "relation": ["delegate_permission/common.handle_all_urls"],  "target": {    "namespace": "android_app",    "package_name": "com.yourcompany.yourapp",    "sha256_cert_fingerprints": ["YOUR_SHA256_FINGERPRINT"]  }
SKILL.md:141来自说明文档打开原文件
    "apps": [],    "details": [{      "appIDs": ["TEAM_ID.com.yourcompany.yourapp"],      "paths": ["*"],      "components": [{"/": "/*"}]    }]  }
中风险

Android 配置明确接受未加密的 HTTP 深链

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

Android intent filter 同时声明 http 和 https,而其用途是让外部 URL 进入应用。HTTP 链接没有传输加密或服务器身份保护。

为什么需要注意

用户在不可信网络中打开 HTTP 深链时,路径和查询参数可能在到达预期站点前被观察或篡改,并可能将应用打开到攻击者选择的路由。若链接携带敏感或决策相关参数,风险更高。

示例中的活动 intent filter 明确包含 `http`,并被说明用于拦截外部 URL。若用户照搬配置,Android 可将匹配的明文 HTTP 链接交给应用;这类链接在传输中不具备 HTTPS 的机密性和服务器身份验证,路径或查询参数可能被观察或篡改。源码没有显示应用会通过 HTTP 下载数据,因此风险应限于深链内容。用户可要求仅允许 HTTPS,除非存在明确的旧版兼容需求。

SKILL.md:102来自说明文档打开原文件
```xml<intent-filter android:autoVerify="true">    <action android:name="android.intent.action.VIEW" />    <category android:name="android.intent.category.DEFAULT" />    <category android:name="android.intent.category.BROWSABLE" />    <data android:scheme="http" android:host="yourdomain.com" />    <data android:scheme="https" /></intent-filter>```
查看另外 1 个位置
SKILL.md:91来自说明文档打开原文件
Configure the native platforms to intercept specific URLs and route them into the Flutter application.
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

6 个说明模块

该 Skill 指导创建 Flutter 应用、安装 go_router,并将 GoRouter 绑定到 MaterialApp.router;执行这些步骤会新增项目并引入第三方依赖。

查看原文
SKILL.md:37来自说明文档打开原文件
### 1. Scaffold the ApplicationRun the following commands to create the app and add the required routing package:```bashflutter create <app-name>cd <app-name>flutter pub add go_router```
SKILL.md:79来自说明文档打开原文件
  @override  Widget build(BuildContext context) {    return MaterialApp.router(      routerConfig: _router,      title: 'Routing App',    );  }

该 Skill 还要求修改 Android 与 iOS 的应用关联配置,并在所控制的域名上发布关联文件,使匹配的网页链接能够直接打开应用。

查看原文
SKILL.md:99来自说明文档打开原文件
### If configuring for Android:1. **Modify `AndroidManifest.xml`**: Add the intent filter inside the `<activity>` tag for `.MainActivity`.```xml<intent-filter android:autoVerify="true">    <action android:name="android.intent.action.VIEW" />    <category android:name="android.intent.category.DEFAULT" />    <category android:name="android.intent.category.BROWSABLE" />    <data android:scheme="http" android:host="yourdomain.com" />    <data android:scheme="https" /></intent-filter>```2. **Host `assetlinks.json`**: Serve the following JSON at `https://yourdomain.com/.well-known/assetlinks.json`.```json
SKILL.md:129来自说明文档打开原文件
```2. **Modify `Runner.entitlements`**: Add the associated domain.```xml<key>com.apple.developer.associated-domains</key><array>  <string>applinks:yourdomain.com</string></array>```3. **Host `apple-app-site-association`**: Serve the following JSON (without a `.json` extension) at `https://yourdomain.com/.well-known/apple-app-site-association`.```json
从这里开始 · 工作说明SKILL.md
flutter-setup-declarative-routing
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文

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

  • SKILL.md工作说明

代码和说明中提到的操作

运行命令
SKILL.md:39来自说明文档打开原文件
Run the following commands to create the app and add the required routing package:```bashflutter create <app-name>
SKILL.md:153来自说明文档打开原文件
- **Android**: Test using ADB.  ```bash  adb shell 'am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://yourdomain.com/details/123"' com.yourcompany.yourapp
SKILL.md:157来自说明文档打开原文件
- **iOS**: Test using `xcrun` on a booted simulator.  ```bash  xcrun simctl openurl booted https://yourdomain.com/details/123
连接外部网站
SKILL.md:110来自说明文档打开原文件
```2. **Host `assetlinks.json`**: Serve the following JSON at `https://yourdomain.com/.well-known/assetlinks.json`.```json
SKILL.md:136来自说明文档打开原文件
```3. **Host `apple-app-site-association`**: Serve the following JSON (without a `.json` extension) at `https://yourdomain.com/.well-known/apple-app-site-association`.```json
SKILL.md:154来自说明文档打开原文件
  ```bash  adb shell 'am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://yourdomain.com/details/123"' com.yourcompany.yourapp  ```
读取了多少行
256
文件校验值(用于核对版本)
49456d82726e8b758a78418d70fa6f6f86c970c4e5b185889e42a7093ec1acc5