Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)40k · #7170

dependabot

Skill này làm gì

Dependabot là một công cụ của GitHub giúp giữ các thư viện (dependencies) của dự án luôn cập nhật và an toàn. Nó có thể cảnh báo bạn về lỗ hổng bảo mật và tự động tạo bản cập nhật.

Khi nào nên dùng

  • ✓Khi bạn muốn được thông báo về các thư viện có lỗ hổng bảo mật.
  • ✓Để tự động nâng cấp các thư viện cũ lên phiên bản mới hơn.
  • ✓Để tổ chức cách xử lý cập nhật thư viện trong dự án.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/dependabot/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/dependabot/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm sao để cấu hình Dependabot cập nhật các dependency Node.js của tôi mỗi tuần?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn cấu hình Dependabot trong một file tên `dependabot.yml` ở thư mục gốc của dự án. Trong file này, bạn cho Dependabot biết nó nên theo dõi những loại thư viện nào (như npm, pip, Docker), tìm chúng ở đâu và bao lâu kiểm tra cập nhật một lần.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Dependabot Configuration & Management

Overview

Dependabot is GitHub's built-in dependency management tool with three core capabilities:

  1. Dependabot Alerts — Notify when dependencies have known vulnerabilities (CVEs)
  2. Dependabot Security Updates — Auto-create PRs to fix vulnerable dependencies
  3. Dependabot Version Updates — Auto-create PRs to keep dependencies current

All configuration lives in a single file: .github/dependabot.yml on the default branch. GitHub does not support multiple dependabot.yml files per repository.

Configuration Workflow

Follow this process when creating or optimizing a dependabot.yml:

Step 1: Detect All Ecosystems

Scan the repository for dependency manifests. Look for:

Ecosystem YAML Value Manifest Files
npm/pnpm/yarn npm package.json, package-lock.json, pnpm-lock.yaml, yarn.lock
pip/pipenv/poetry pip requirements.txt, Pipfile, pyproject.toml, setup.py
uv uv pyproject.toml, uv.lock
Docker docker Dockerfile
Docker Compose docker-compose docker-compose.yml
GitHub Actions github-actions .github/workflows/*.yml
Go modules gomod go.mod
Bundler (Ruby) bundler Gemfile
Cargo (Rust) cargo Cargo.toml
Composer (PHP) composer composer.json
NuGet (.NET) nuget *.csproj, packages.config
.NET SDK dotnet-sdk global.json
Maven (Java) maven pom.xml
Gradle (Java) gradle build.gradle
Terraform terraform *.tf
OpenTofu opentofu *.tf
Helm helm Chart.yaml
Hex (Elixir) mix mix.exs
Swift swift Package.swift
Pub (Dart) pub pubspec.yaml
Bun bun bun.lockb
Dev Containers devcontainers devcontainer.json
Git Submodules gitsubmodule .gitmodules
Pre-commit pre-commit .pre-commit-config.yaml

Notes:

  • pnpm and yarn both use the npm ecosystem value.
  • Prefer uv ecosystem value when uv.lock is present; otherwise use pip.

Step 2: Map Directory Locations

For each ecosystem, identify where manifests live. Use directories (plural) with glob patterns for monorepos:

directories:
  - "/"           # root
  - "/apps/*"     # all app subdirs
  - "/packages/*" # all package subdirs
  - "/lib-*"      # dirs starting with lib-
  - "**/*"        # recursive (all subdirs)

Important: directory (singular) does NOT support globs. Use directories (plural) for wildcards.

Step 3: Configure Each Ecosystem Entry

Every entry needs at minimum:

- package-ecosystem: "npm"
  directory: "/"
  schedule:
    interval: "weekly"

Step 4: Optimize with Grouping, Labels, and Scheduling

See sections below for each optimization technique.

Monorepo Strategies

Glob Patterns for Workspace Coverage

For monorepos with many packages, use glob patterns to avoid listing each directory:

- package-ecosystem: "npm"
  directories:
    - "/"
    - "/apps/*"
    - "/packages/*"
    - "/services/*"
  schedule:
    interval: "weekly"

Cross-Directory Grouping

Use group-by: dependency-name to create a single PR when the same dependency updates across multiple directories:

groups:
  monorepo-deps:
    group-by: dependency-name

This creates one PR per dependency across all specified directories, reducing CI costs and review burden.

Limitations:

  • All directories must use the same package ecosystem
  • Applies to version updates only
  • Incompatible version constraints create separate PRs

Standalone Packages Outside Workspaces

If a directory has its own lockfile and is NOT part of the workspace (e.g., scripts in .github/), create a separate ecosystem entry for it.

Dependency Grouping

Reduce PR noise by grouping related dependencies into single PRs.

By Dependency Type

groups:
  dev-dependencies:
    dependency-type: "development"
    update-types: ["minor", "patch"]
  production-dependencies:
    dependency-type: "production"
    update-types: ["minor", "patch"]

By Name Pattern

groups:
  angular:
    patterns: ["@angular*"]
    update-types: ["minor", "patch"]
  testing:
    patterns: ["jest*", "@testing-library*", "ts-jest"]

For Security Updates

groups:
  security-patches:
    applies-to: security-updates
    patterns: ["*"]

…
Câu hỏi thường gặp

“Dependabot Alerts” là gì?

Đó là các thông báo Dependabot gửi khi phát hiện một thư viện bạn đang dùng có lỗ hổng bảo mật đã biết.

“Dependabot Security Updates” là gì?

Đó là các bản cập nhật tự động Dependabot tạo để sửa các lỗ hổng bảo mật được phát hiện trong thư viện.

“Dependabot Version Updates” là gì?

Đó là các bản cập nhật tự động Dependabot tạo để giữ thư viện ở phiên bản mới nhất, ngay cả khi không có vấn đề bảo mật.

Chi tiết

Mô tả gốc của tác giả

Comprehensive guide for configuring and managing GitHub Dependabot. Use this skill when users ask about creating or optimizing dependabot.yml files, managing Dependabot pull requests, configuring dependency update strategies, setting up grouped updates, monorepo patterns, multi-ecosystem groups, security update configuration, auto-triage rules, or any GitHub Advanced Security (GHAS) supply chain s

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7170
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự