resolve-docker-vulnerabilities

作者: firebase

用于解决firebase-cli镜像中Docker漏洞的技能。当您需要检查firebase-cli Docker镜像中的漏洞时,可使用此技能…

npx skills add https://github.com/firebase/firebase-tools --skill resolve-docker-vulnerabilities

Resolve Docker Vulnerabilities

This skill guides you through the process of listing images, checking for vulnerabilities, planning remediation, and verifying the fixes by publishing to a staging repository.

Workflow

1. Publish to Staging

Run the build on fir-tools-builds and publish to the staging repository in firebase-cli to see the baseline vulnerabilities after the build's own updates.

./scripts/publish/firebase-docker-image/run.sh --build-project fir-tools-builds --repo staging --target firebase-cli

2. Check Vulnerabilities

Check the vulnerability reports for the image just pushed to staging. You will need to find the digest of the image first.

gcloud artifacts docker images list us-docker.pkg.dev/firebase-cli/staging/firebase

Then check vulnerabilities using the digest:

gcloud artifacts vulnerabilities list us-docker.pkg.dev/firebase-cli/staging/firebase@sha256:<DIGEST>

To investigate which layers and file paths are causing the vulnerabilities, run the command with --format=json:

gcloud artifacts vulnerabilities list us-docker.pkg.dev/firebase-cli/staging/firebase@sha256:<DIGEST> --format=json

Look for fileLocation and layerDetails in the output to understand if the vulnerability is in:

  • Project dependencies (e.g., under /usr/local/node_packages/node_modules). Recommend updating the package.json and running the build again. You can use overrides as needed here to upgrade transitive dependencies to non-breaking versions.
  • Global tools (e.g., under /usr/local/lib/node_modules/npm). Recommend waiting for upstream fixes (which will be pulled in as soon as they are available).
  • External binaries (e.g., emulator JARs under /root/.cache/firebase/emulators). Recommend raising these issues to the team owning the emulator.

3. Plan Remediation

For each vulnerable package identified:

  • Determine if it can be updated in the Dockerfile.
  • Check if a fix is available.
  • Create a plan to address it (e.g., upgrading the base image, upgrading the specific package).

4. Present Plan to User

Present the proposed plan to the user for approval before making changes.

5. Apply Fix and Re-Verify

After making changes to the Dockerfile or related files, repeat Step 1 and Step 2 to publish a new staged image and verify that the vulnerabilities have been resolved.

来自 firebase 的更多技能

developing-genkit-dart
firebase
面向 Dart 的统一 AI SDK,支持代码生成、结构化输出、工具、流程和智能体。提供核心 API,涵盖生成、工具定义、流程编排、嵌入和流式处理,采用统一接口。包含 8 个以上插件,支持 LLM 提供商(Google Gemini、Anthropic Claude、OpenAI GPT)、Firebase AI、模型上下文协议、Chrome 浏览器集成,以及通过 Shelf 托管 HTTP 服务器。内置 CLI 和本地开发 UI,用于流程执行、追踪、模型实验等。
official
developing-genkit-js
firebase
使用Genkit流程、工具和多模型支持,构建AI驱动的Node.js/TypeScript应用程序。Genkit与提供商无关;通过插件支持Google AI、OpenAI、Anthropic、Ollama及其他LLM提供商。使用Zod定义类型安全的模式流程,执行生成请求,并在TypeScript中组合多步骤AI工作流。需要Genkit CLI v1.29.0及以上版本;近期主要API变更意味着您必须查阅genkit文档:read和common-errors.md以获取当前模式,而非依赖先前知识...
official
extension-to-functions-codebase
firebase
用于将已安装的Firebase Extension(或扩展源代码)转换为独立的Cloud Functions for Firebase代码库或可发布的npm包技能,…
official
firebase-ai-logic
firebase
客户端Gemini集成,适用于网页应用,支持多模态推理、流式传输及设备端混合执行。支持纯文本和多模态输入(图像、音频、视频、PDF);超过20MB的文件通过Cloud Storage路由。包含自动历史记录的聊天会话、用于实时显示的流式响应,以及结构化JSON输出强制。通过Chrome中的Gemini Nano提供混合设备端推理,并自动回退到云端执行。生产环境需启用App Check...
official
firebase-ai-logic-basics
firebase
用于将Firebase AI Logic(Gemini API)集成到Web应用程序中的官方技能。涵盖设置、多模态推理、结构化输出和安全性。
official
firebase-app-hosting-basics
firebase
使用Firebase App Hosting部署和管理基于Next.js、Angular及其他支持框架的全栈Web应用。需使用Blaze定价计划的Firebase项目;支持服务端渲染(SSR)和增量静态再生(ISR)工作流。通过firebase.json配置部署,可选apphosting.yaml进行后端设置,或通过GitHub集成启用自动化"git push部署"。包含通过CLI命令进行密钥管理,以安全访问敏感密钥...
official
firebase-auth-basics
firebase
配置 Firebase Authentication,集成多种身份提供商并设置安全的数据访问规则。支持邮箱/密码、手机号、匿名登录、联合身份提供商(Google、Facebook、Twitter、GitHub、Microsoft、Apple)以及自定义身份认证集成。每个经过身份验证的用户会获得唯一 ID 和基于 JWT 的令牌(短期 ID 令牌和长期刷新令牌),用于访问 Firebase 服务。通过 CLI 启用 Google 登录、匿名登录和邮箱/密码提供商;使用 Firebase 控制台...
official
firebase-basics
firebase
Firebase项目设置及AI代理集成的CLI工作流程。需先完成firebase-local-env-setup技能及Firebase CLI安装。核心流程涵盖通过firebase login进行身份验证、使用唯一ID创建项目、以及通过交互式firebase init命令初始化服务。设置过程中支持功能选择,包括Firestore、Functions和Hosting,并自动生成配置文件。CLI自带文档功能,可通过--help标志查看...
official