resolve-docker-vulnerabilities

โดย firebase

ทักษะในการแก้ไขช่องโหว่ของ Docker สำหรับอิมเมจ firebase-cli ใช้ทักษะนี้เมื่อคุณต้องการตรวจสอบช่องโหว่ในอิมเมจ Docker ของ firebase-cli…

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.

Skills เพิ่มเติมจาก firebase

developing-genkit-dart
firebase
Unified AI SDK สำหรับ Dart ที่รองรับการสร้างโค้ด, ผลลัพธ์ที่มีโครงสร้าง, เครื่องมือ, โฟลว์, และเอเจนต์ ให้ API หลักสำหรับการสร้าง, การกำหนดเครื่องมือ, การจัดระเบียบโฟลว์, การฝังข้อมูล, และการสตรีมด้วยอินเทอร์เฟซเดียว รวมถึงปลั๊กอิน 8+ ตัวสำหรับผู้ให้บริการ LLM (Google Gemini, Anthropic Claude, OpenAI GPT), Firebase AI, Model Context Protocol, การรวมเบราว์เซอร์ Chrome, และการโฮสต์เซิร์ฟเวอร์ HTTP ผ่าน Shelf มี CLI ในตัวพร้อม UI สำหรับการพัฒนาในเครื่องสำหรับการดำเนินการโฟลว์, การติดตาม, การทดลองโมเดล, และ...
official
developing-genkit-js
firebase
สร้างแอปพลิเคชัน Node.js/TypeScript ที่ขับเคลื่อนด้วย AI ด้วย Genkit flows, tools และการรองรับหลายโมเดล Genkit ไม่ยึดติดกับผู้ให้บริการ รองรับ Google AI, OpenAI, Anthropic, Ollama และผู้ให้บริการ LLM อื่นๆ ผ่านปลั๊กอิน กำหนด flows ด้วยสคีมาที่ปลอดภัยชนิดข้อมูลโดยใช้ Zod ดำเนินการสร้างคำขอ และประกอบเวิร์กโฟลว์ AI แบบหลายขั้นตอนใน TypeScript ต้องใช้ Genkit CLI v1.29.0+ การเปลี่ยนแปลง API หลักเมื่อเร็วๆ นี้หมายความว่าคุณต้องปรึกษา genkit docs:read และ common-errors.md สำหรับรูปแบบปัจจุบัน ไม่ใช่ความรู้เดิม...
official
extension-to-functions-codebase
firebase
ทักษะสำหรับการแปลง Firebase Extension ที่ติดตั้งแล้ว (หรือซอร์สของ extension) ให้เป็นโค้ดเบส Cloud Functions for Firebase แบบสแตนด์อโลน หรือแพ็กเกจ npm ที่เผยแพร่ได้,…
official
firebase-ai-logic
firebase
การผสานรวม Gemini ฝั่งไคลเอ็นต์สำหรับเว็บแอปพลิเคชัน รองรับการอนุมานแบบหลายรูปแบบ การสตรีม และการทำงานแบบไฮบริดบนอุปกรณ์ รองรับอินพุตแบบข้อความเท่านั้นและแบบหลายรูปแบบ (รูปภาพ เสียง วิดีโอ PDF) ไฟล์ที่เกิน 20 MB จะถูกส่งผ่าน Cloud Storage รวมถึงเซสชันแชทที่มีประวัติอัตโนมัติ การตอบสนองแบบสตรีมสำหรับการแสดงผลแบบเรียลไทม์ และการบังคับใช้เอาต์พุต JSON ที่มีโครงสร้าง รองรับการอนุมานแบบไฮบริดบนอุปกรณ์ผ่าน Gemini Nano ใน Chrome โดยจะเปลี่ยนไปใช้การทำงานบนคลาวด์โดยอัตโนมัติ ต้องใช้ App Check สำหรับการใช้งานจริง...
official
firebase-ai-logic-basics
firebase
ทักษะอย่างเป็นทางการสำหรับการรวม Firebase AI Logic (Gemini API) เข้ากับเว็บแอปพลิเคชัน ครอบคลุมการตั้งค่า การอนุมานแบบหลายรูปแบบ ผลลัพธ์ที่มีโครงสร้าง และความปลอดภัย
official
firebase-app-hosting-basics
firebase
ปรับใช้และจัดการเว็บแอปแบบฟูลสแต็กด้วย Firebase App Hosting โดยใช้ Next.js, Angular และเฟรมเวิร์กอื่นๆ ที่รองรับ ต้องมีโปรเจกต์ Firebase ในแผนราคา Blaze รองรับการทำงาน Server-Side Rendering (SSR) และ Incremental Static Regeneration (ISR) ปรับใช้ผ่านการกำหนดค่า firebase.json พร้อม apphosting.yaml สำหรับตั้งค่าแบ็กเอนด์ หรือเปิดใช้งาน "git push to deploy" อัตโนมัติผ่าน GitHub รวมถึงการจัดการความลับผ่านคำสั่ง CLI เพื่อการเข้าถึงคีย์ที่ละเอียดอ่อนอย่างปลอดภัย...
official
firebase-auth-basics
firebase
ตั้งค่า Firebase Authentication กับผู้ให้บริการหลายรายและกฎการเข้าถึงข้อมูลที่ปลอดภัย รองรับอีเมล/รหัสผ่าน, เบอร์โทรศัพท์, ไม่ระบุตัวตน, ผู้ให้บริการแบบรวม (Google, Facebook, Twitter, GitHub, Microsoft, Apple) และการรวมระบบการยืนยันตัวตนแบบกำหนดเอง ผู้ใช้ที่ได้รับการยืนยันตัวตนแต่ละคนจะได้รับ ID เฉพาะและโทเค็นแบบ JWT (โทเค็น ID อายุสั้นและโทเค็นรีเฟรชอายุยาว) สำหรับการเข้าถึงบริการ Firebase เปิดใช้งานผู้ให้บริการผ่าน CLI สำหรับ Google Sign In, ไม่ระบุตัวตน และอีเมล/รหัสผ่าน; ใช้ Firebase Console...
official
firebase-basics
firebase
การตั้งค่าโปรเจกต์ Firebase และขั้นตอนการทำงาน CLI สำหรับการรวม AI agent ต้องทำทักษะ firebase-local-env-setup ให้เสร็จก่อน และติดตั้ง Firebase CLI ขั้นตอนหลักครอบคลุมการยืนยันตัวตนผ่าน firebase login การสร้างโปรเจกต์ด้วย ID ที่ไม่ซ้ำกัน และการเริ่มต้นบริการผ่านคำสั่ง firebase init แบบโต้ตอบ รองรับการเลือกฟีเจอร์ระหว่างการตั้งค่ารวมถึง Firestore, Functions และ Hosting พร้อมการสร้างไฟล์กำหนดค่าอัตโนมัติ CLI ที่มีเอกสารในตัวพร้อมแฟล็ก --help สำหรับ...
official