本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)40k · #7170

dependabot

できること

Dependabot は GitHub のツールで、プロジェクトのコードライブラリ(依存関係)を最新かつ安全な状態に保つのを助けます。セキュリティの問題をアラートで知らせたり、更新を自動で作成したりできます。

使う場面

  • ✓セキュリティ上の欠陥がある依存関係について通知を受け取りたいとき。
  • ✓古いライブラリを新しいバージョンに自動で更新したいとき。
  • ✓プロジェクトで依存関係の更新をどのように扱うかを整理したいとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/github/awesome-copilot/blob/main/skills/dependabot/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Dependabot を設定して、Node.js の依存関係を毎週更新するにはどうすればよいですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

プロジェクトのルートにある `dependabot.yml` というファイルで Dependabot を設定します。このファイルでは、監視するライブラリの種類(npm、pip、Docker など)、その場所、更新を確認する頻度を指定します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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: ["*"]

…
よくある質問

Dependabot Alerts とは何ですか?

使用しているライブラリに既知のセキュリティ脆弱性があることを検出したときに、Dependabot が送る通知です。

Dependabot Security Updates とは何ですか?

検出されたライブラリのセキュリティ脆弱性を修正するために、Dependabot が自動で作成する更新です。

Dependabot Version Updates とは何ですか?

セキュリティの問題がなくても、ライブラリを最新バージョンに保つために Dependabot が自動で作成する更新です。

詳細

作者による元の説明

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

人気

GitHubのスター
40k
ランキング
#7170
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル