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

Firebase Remote Config Basics Skill 安全审计

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

>-

第三方安全检查结论

发现安全风险

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

反复执行未固定版本的 firebase-tools@latest

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

模板获取、部署和验证都通过 `npx -y firebase-tools@latest` 执行。`latest` 会随注册表内容变化,`-y` 自动接受安装,因此用户无法仅凭该 Skill 确定将执行的具体工具版本。

为什么需要注意

如果未来发布的版本有缺陷、被供应链攻击或出现不兼容变化,它会以代理当前权限运行,并可能读取 Firebase 登录状态、修改工作区文件或操作云端项目。

获取模板、部署和版本验证都调用自动接受安装的 `firebase-tools@latest`。因此每次涉及本地文件和 Firebase 项目的操作都可能由不同版本的工具执行;部署命令还会改变云端配置。用户可要求固定 CLI 版本、核验包来源,并仅在明确批准后允许部署。

SKILL.md:5来自说明文档打开原文件
  Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.compatibility: This skill is best used with the Firebase CLI, but does not require it. Firebase CLI can be accessed through `npx -y firebase-tools@latest`.metadata:
查看另外 3 个位置
SKILL.md:107来自说明文档打开原文件
  - Deploy: Execute the partial deployment command        ```bash    npx -y firebase-tools@latest deploy --only remoteconfig    ```
SKILL.md:82来自说明文档打开原文件
  ```bash  npx -y firebase-tools@latest remoteconfig:get -o remote_config.json  ```
SKILL.md:113来自说明文档打开原文件
- **Verification**: After deployment, verify the update by listing the version  history.  ```bash  npx -y firebase-tools@latest remoteconfig:versions:list  ```
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
中风险

Remote Config 设置额外引入 Firebase Analytics

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

Android 指南称 Analytics 为“高度推荐”并把 Analytics 依赖与 Remote Config 一同加入;iOS 指南也要求安装 FirebaseAnalytics。Analytics 并不是获取基础 Remote Config 值所必需的。

为什么需要注意

如果应用随后初始化并启用 Analytics,可能开始向 Firebase 发送应用使用情况、设备或受众相关数据,扩大数据处理范围,并影响隐私披露和同意要求。

Android 指南把 Analytics 描述为推荐项,却在依赖示例中与 Remote Config 一并加入;iOS 指南则直接要求安装两个包。这会扩大依赖和潜在的数据处理范围,而 Skill 的声明用途是 Remote Config。用户可要求作者说明 Analytics 的必要性、数据行为和同意要求,并将其设为明确的可选项。

references/android_setup.md:26来自说明文档打开原文件
These changes are made to your Android project's Gradle files. Google Analyticsis highly recommended as it enables conditional targeting based on userproperties and audiences.
查看另外 3 个位置
references/android_setup.md:59来自说明文档打开原文件
       // Import the Firebase BoM       implementation(platform("com.google.firebase:firebase-bom:32.7.0"))       // Add the dependencies for Remote Config and Analytics       implementation("com.google.firebase:firebase-config-ktx")       implementation("com.google.firebase:firebase-analytics-ktx")   }   ```
references/ios_setup.md:23来自说明文档打开原文件
## Add Swift Package DependenciesInstall the Remote Config and Analytics SDKs using the Swift package manager.Install the `FirebaseRemoteConfig` and `FirebaseAnalytics` packages from the[https://github.com/firebase/firebase-ios-sdk.git](https://github.com/firebase/firebase-ios-sdk.git)repository.
references/android_setup.md:52来自说明文档打开原文件
1. Add the Firebase Remote Config and Analytics dependencies. Using the Firebase   Bill of Materials (BoM) is the best practice for version management.   ```kotlin   dependencies {       // ... other dependencies       // Import the Firebase BoM       implementation(platform("com.google.firebase:firebase-bom:32.7.0"))       // Add the dependencies for Remote Config and Analytics       implementation("com.google.firebase:firebase-config-ktx")       implementation("com.google.firebase:firebase-analytics-ktx")   }   ```
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 3 项风险
中风险

已有但错误的活动项目不会触发项目确认

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

项目检查流程只在“没有活动项目”导致命令失败时要求 Project ID。模板获取和部署命令本身没有明确的 `--project`,因此已选中的项目不会被重新核对。

为什么需要注意

如果 Firebase CLI 当前指向另一个有效项目,代理可能从错误项目下载模板,随后把修改部署到该项目,改变另一款应用的功能开关或用户体验。

项目确认仅在命令因“没有活动项目”而失败时触发;若 CLI 已选择了一个错误但有效的项目,该流程不会要求核对。获取与部署命令也未携带 `--project`,所以可能读取或改动当前活动项目。用户可要求每次先显示账号和项目 ID,并在部署命令中使用其明确批准的 `--project`。

SKILL.md:37来自说明文档打开原文件
If a command fails because "no active project is selected":1. **Check login**: Run `npx -y firebase-tools@latest login:list`.1. **Prompt for ID**: If logged in but no project is active, ask the user:   "Please provide your Firebase Project ID to proceed."1. **Use Flag**: Append `--project <PROJECT_ID>` to every subsequent command.
查看另外 2 个位置
SKILL.md:82来自说明文档打开原文件
  ```bash  npx -y firebase-tools@latest remoteconfig:get -o remote_config.json  ```
SKILL.md:107来自说明文档打开原文件
  - Deploy: Execute the partial deployment command        ```bash    npx -y firebase-tools@latest deploy --only remoteconfig    ```
中风险

缺少项目或应用时可直接创建云端资源

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

平台指南在没有现有项目或应用时给出 `projects:create` 和 `apps:create` 操作,但这些步骤附近没有要求先展示目标账号、项目名称和标识符并取得明确创建授权。

为什么需要注意

代理可能在登录的 Firebase 账号中注册不需要或命名错误的项目和应用,消耗项目配额,并留下需要用户管理或清理的云端资源。

这段证据能说明什么

指南确实提供了创建 Firebase 项目和应用的云端变更命令,附近没有明确的逐次确认步骤;但这些内容也可理解为由用户执行的前置设置说明,源码没有明确指示代理必须无确认自动运行。因此存在授权边界不清,而不能断定会直接创建。用户可限制为仅检查现有资源,并要求创建前展示账号、项目 ID、显示名称及应用标识符并单独确认。

这项判断针对展示的代码和适用条件,不表示风险已经实际发生。
references/android_setup.md:14来自说明文档打开原文件
- **Firebase CLI**: Installed and logged in (see `firebase-basics`).- **Firebase Project**: Created via  `npx -y firebase-tools@latest projects:create` (see `firebase-basics`).- **Firebase App**: Created via  `npx -y firebase-tools@latest apps:create <IOS|ANDROID|WEB> <package-name-or-bundle-id>`
查看另外 2 个位置
references/ios_setup.md:13来自说明文档打开原文件
1. **Find Bundle ID:** Read the Xcode project to find the iOS bundle ID. Check   the `PRODUCT_BUNDLE_IDENTIFIER` value in the `.pbxproj` file or the   `Info.plist` file.1. **Create Firebase Project:** If no project exists, create one:   `npx -y firebase-tools@latest projects:create <project-id> --display-name="My Awesome App"`1. **Create Firebase App:** Register the iOS app with the discovered bundle ID:   `npx -y firebase-tools@latest apps:create IOS <bundle-id>`1. **Link the GoogleService-Info.plist file:** Use the script in the   `xcode-project-setup` skill to obtain the config and link.
references/ios_setup.md:11来自说明文档打开原文件
Use the `firebase-tools` CLI to set up the project if necessary.1. **Find Bundle ID:** Read the Xcode project to find the iOS bundle ID. Check   the `PRODUCT_BUNDLE_IDENTIFIER` value in the `.pbxproj` file or the   `Info.plist` file.1. **Create Firebase Project:** If no project exists, create one:   `npx -y firebase-tools@latest projects:create <project-id> --display-name="My Awesome App"`1. **Create Firebase App:** Register the iOS app with the discovered bundle ID:   `npx -y firebase-tools@latest apps:create IOS <bundle-id>`1. **Link the GoogleService-Info.plist file:** Use the script in the
低风险

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

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

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

为什么需要注意

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

兼容性说明建议通过 `npx -y` 获取 `firebase-tools@latest`;`latest` 未固定版本,`-y` 又会自动接受安装。运行时取得的代码可能随软件仓库更新而变化。用户可要求作者固定并审核具体版本,或限制 Skill 只能使用本机已批准的 Firebase CLI。

SKILL.md:26来自说明文档打开原文件
### Handling npx 403 Forbidden Errors
查看另外 2 个位置
SKILL.md:5来自说明文档打开原文件
  Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.compatibility: This skill is best used with the Firebase CLI, but does not require it. Firebase CLI can be accessed through `npx -y firebase-tools@latest`.metadata:
SKILL.md:28来自说明文档打开原文件
If `npx -y firebase-tools@latest` fails due to registry permissions (403 error):
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

4 个说明模块

该 Skill 指导代理下载当前 Remote Config 模板、直接修改本地 JSON,并在部署前强制停止,等待用户检查并明确回复“deploy”。

查看原文
SKILL.md:79来自说明文档打开原文件
- **Get current template**: Save the remote template to a local JSON file for  auditing or modification.  ```bash  npx -y firebase-tools@latest remoteconfig:get -o remote_config.json  ```- **Autonomous Editing & Discovery** : Modify the local `remote_config.json`  directly. Determine the correct signal (e.g., device.country or percent) and  update the "conditions" array and "parameters" map accordingly.
SKILL.md:90来自说明文档打开原文件
- **MANDATORY: User Review and Verification** : STOP and ask the user to verify  your changes before proceeding to deployment.  - Action: Inform the user: "I have prepared the changes in remote_config.json.    Please review the file for accuracy. Once you are satisfied, tell me to    'deploy' to make the changes live."

获得部署授权后,该 Skill 会在缺少配置时创建 firebase.json,把本地模板映射到 Remote Config,然后执行仅限 Remote Config 的线上部署并列出版本进行验证。

查看原文
SKILL.md:97来自说明文档打开原文件
- **Deployment Orchestration** : To push changes, you must ensure the  environment is configured for deployment.  - Config Mapping: If a firebase.json file is missing, create one to map the    local JSON to the Remote Config service:  ```json    { "remoteconfig": { "template": "remote_config.json" } }  ```  - Deploy: Execute the partial deployment command        ```bash    npx -y firebase-tools@latest deploy --only remoteconfig    ```
SKILL.md:113来自说明文档打开原文件
- **Verification**: After deployment, verify the update by listing the version  history.  ```bash  npx -y firebase-tools@latest remoteconfig:versions:list  ```

Android 和 iOS 指南会修改应用依赖和初始化代码,并设置本地默认值及 fetchAndActivate,使云端配置能影响应用界面或逻辑。

查看原文
SKILL.md:123来自说明文档打开原文件
- **Set In-App Defaults**: Define baseline values to ensure the app functions  offline or before the first fetch.- **Fetch and Activate**: Retrieve values from the Firebase backend and apply  them to the local UI/Logic.- **Template Management**: Use the Firebase CLI to version-control, get, and  deploy your config JSON files.
references/android_setup.md:83来自说明文档打开原文件
```kotlinval remoteConfig = Firebase.remoteConfigremoteConfig.setDefaultsAsync(R.xml.remote_config_defaults)```````
references/ios_setup.md:77来自说明文档打开原文件
```````swiftremoteConfig.fetchAndActivate { (status, error) in    if status == .successFetchedFromRemote || status == .successUsingPreFetchedData {        print("Config fetched and activated!")    } else {        print("Config not fetched")    }        // Access a value    let message = remoteConfig.configValue(forKey: "welcome_message").stringValue}```
从这里开始 · 工作说明SKILL.md
firebase-remote-config-basics
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

2 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录3 个文件

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文
  • references/android_setup.md已纳入全文
  • references/ios_setup.md已纳入全文

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

  • SKILL.md工作说明
  • references/android_setup.md配套文件
  • references/ios_setup.md配套文件

代码和说明中提到的操作

安装其他软件包
SKILL.md:5来自说明文档打开原文件
  Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndAct compatibility: This skill is best used with the Firebase CLI, but does not require it. Firebase CLI can be accessed through `npx -y firebase-tools@latest`.metadata:
SKILL.md:26来自说明文档打开原文件
### Handling npx 403 Forbidden Errors
SKILL.md:28来自说明文档打开原文件
If `npx -y firebase-tools@latest` fails due to registry permissions (403 error):
连接外部网站
SKILL.md:61来自说明文档打开原文件
patterns (see[Loading Strategies](https://firebase.google.com/docs/remote-config/loading)):
references/ios_setup.md:28来自说明文档打开原文件
Install the `FirebaseRemoteConfig` and `FirebaseAnalytics` packages from the[https://github.com/firebase/firebase-ios-sdk.git](https://github.com/firebase/firebase-ios-sdk.git)repository.
references/ios_setup.md:49来自说明文档打开原文件
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0">
运行命令
SKILL.md:82来自说明文档打开原文件
  ```bash  npx -y firebase-tools@latest remoteconfig:get -o remote_config.json
SKILL.md:109来自说明文档打开原文件
        ```bash    npx -y firebase-tools@latest deploy --only remoteconfig
SKILL.md:116来自说明文档打开原文件
  ```bash  npx -y firebase-tools@latest remoteconfig:versions:list
读取了多少行
311
文件校验值(用于核对版本)
ee610fa0984ed0d02f80a38be040161e658ef5e0659c665d3728559164df7990