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

Flutter Setup Localization Skill 安全审计

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

Add `flutter_localizations` and `intl` dependencies, enable "generate true" in `pubspec.yaml`, and create an `l10n.yaml` configuration file. Use when initializing localization support for a new Flutter project.

第三方安全检查结论

发现低风险问题

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

`intl:any` 允许首次解析时选择任意可用版本

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

Skill 明确添加不带版本边界的 `intl:any`。在没有锁文件,或锁文件被刷新时,解析结果会取决于当时包源提供的版本,而不是 Skill 审核过的固定兼容范围。

为什么需要注意

项目可能获得未经该 Skill 验证的新版本,造成构建或运行行为变化;用户也较难仅凭配置复现同一依赖集合。证据没有显示恶意包、凭据访问或已发生攻击。

这是实际设置命令,不是示例警告;它会把 `intl` 以无版本边界的 `any` 约束加入项目。首次解析、缺少锁文件或锁文件更新时,Pub 可选择当时满足其他约束的任意可用版本,降低构建可复现性,并可能引入未经该 Skill 审核的新版本行为。该操作符合本 Skill 的本地化用途,因此不是越权证据。用户可要求作者提供经测试的版本范围,并保留、审查 `pubspec.lock` 与解析后的依赖变更。

SKILL.md:34来自说明文档打开原文件
flutter pub add flutter_localizations --sdk=flutterflutter pub add intl:any```
查看另外 3 个位置
SKILL.md:42来自说明文档打开原文件
    sdk: flutter  flutter_localizations:    sdk: flutter  intl: any```
SKILL.md:3来自说明文档打开原文件
name: flutter-setup-localizationdescription: Add `flutter_localizations` and `intl` dependencies, enable "generate true" in `pubspec.yaml`, and create an `l10n.yaml` configuration file. Use when initializing localization support for a new Flutter project.metadata:
SKILL.md:31来自说明文档打开原文件
### 1. Add DependenciesAdd the required localization packages to the project. Execute the following commands in the terminal:```bashflutter pub add flutter_localizations --sdk=flutterflutter pub add intl:any```
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

6 个说明模块

该 Skill 的实际工作是修改 Flutter 项目的依赖和本地化配置,并要求在终端运行 Flutter 包管理命令;这会改动 pubspec 配置并解析依赖。

查看原文
SKILL.md:31来自说明文档打开原文件
### 1. Add DependenciesAdd the required localization packages to the project. Execute the following commands in the terminal:```bashflutter pub add flutter_localizations --sdk=flutterflutter pub add intl:any```
SKILL.md:47来自说明文档打开原文件
### 2. Enable Code GenerationOpen `pubspec.yaml` and enable the `generate` flag within the `flutter` section to automate localization tasks:```yamlflutter:  generate: true```
SKILL.md:54来自说明文档打开原文件
### 3. Create Configuration FileCreate a new file named `l10n.yaml` in the root directory of the Flutter project. Define the input directory, template file, and output file:```yamlarb-dir: lib/l10ntemplate-arb-file: app_en.arboutput-localization-file: app_localizations.dartsynthetic-package: true```

它还指导用户修改应用入口及所有受支持语言的 ARB 文件,并通过 `flutter pub get` 生成本地化代码;其行为与 Flutter 本地化设置这一声明用途一致。

查看原文
SKILL.md:63来自说明文档打开原文件
### 4. Configure the App Entry PointImport the generated localizations and the `flutter_localizations` library in your `main.dart`. Inject the delegates and supported locales into your `MaterialApp` or `CupertinoApp`.
SKILL.md:90来自说明文档打开原文件
### 1. Define ARB Files*   **If creating NEW content:** Add the base string to the template file (`lib/l10n/app_en.arb`). Include a description for context.*   **If EDITING existing content:** Locate the key in all supported `.arb` files and update the values.
SKILL.md:110来自说明文档打开原文件
### 2. Generate Localization ClassesRun the following command to trigger code generation:```bashflutter pub get```*Feedback Loop:* Run validator -> review terminal output for ARB syntax errors -> fix missing commas or mismatched placeholders -> re-run `flutter pub get`.
从这里开始 · 工作说明SKILL.md
flutter-setup-localization
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文

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

  • SKILL.md工作说明

代码和说明中提到的操作

运行命令
SKILL.md:32来自说明文档打开原文件
Add the required localization packages to the project. Execute the following commands in the terminal:```bashflutter pub add flutter_localizations --sdk=flutter
SKILL.md:112来自说明文档打开原文件
Run the following command to trigger code generation:```bashflutter pub get
读取了多少行
211
文件校验值(用于核对版本)
e52babe87afa1694f1e34f08c8b938d0b4aef54454f093e7df84b4c21596b485