Note: Dependabot auto-triage rules are currently in beta and are subject to change.
About custom auto-triage rules
You can create your own Dependabot auto-triage rules based on alert metadata. You can choose to auto-dismiss alerts indefinitely, or snooze alerts until a patch becomes available, and you can specify which alerts you want Dependabot to open pull requests for.
Since any rules that you create apply to both future and current alerts, you can also use auto-triage rules to manage your Dependabot alerts in bulk.
Repository administrators can create custom auto-triage rules for their public, private, and internal repositories.
Organization owners and security managers can set custom auto-triage rules at the organization-level, and then choose if a rule is enforced or enabled across all public and private repositories in the organization.
- Enforced: If an organization-level rule is "enforced", repository administrators cannot edit, disable, or delete the rule.
- Enabled: If an organization-level rule is "enabled", repository administrators can still disable the rule for their repository.
Note: In the event that an organization-level rule and a repository-level rule specify conflicting behaviors, the action set out by the organization-level rule takes precedence. Dismissal rules always act before rules which trigger Dependabot pull requests.
You can create rules to target alerts using the following metadata:
- CVE ID
- CWE
- Dependency scope (
devDependency
orruntime
) - Ecosystem
- GHSA ID
- Manifest path (for repository-level rules only)
- Package name
- Patch availability
- Severity
Understanding how custom auto-triage rules and Dependabot security updates interact
You can use custom auto-triage rules to tailor which alerts you want Dependabot to open pull requests for. However, for an "open a pull request" rule to take effect, you must ensure that Dependabot security updates are disabled for the repository (or repositories) that the rule should apply to.
When Dependabot security updates are enabled for a repository, Dependabot will automatically try to open pull requests to resolve every open Dependabot alert that has an available patch. If you prefer to customize this behavior using a rule, you must leave Dependabot security updates disabled.
For more information about enabling or disabling Dependabot security updates for a repository, see "Configuring Dependabot security updates (Dependabot セキュリティ アップデートの構成)."
Adding custom auto-triage rules to your repository
Note: During the public beta, you can create up to 10 custom auto-triage rules for a repository.
-
GitHub.com で、リポジトリのメイン ページへ移動します。
-
リポジトリ名の下にある [設定] をクリックします。 [設定] タブが表示されない場合は、 [] ドロップダウン メニューを選び、 [設定] をクリックします。
-
サイドバーの [セキュリティ] セクションで、 [コードのセキュリティと分析] をクリックします。
-
「Dependabot alerts」で、「Dependabot rules」ルール付近の をクリックします。
-
[新しいルール] をクリックします。
-
「ルール名前」の下で、このルールの実行内容を説明します。
-
Under "State", use the dropdown menu to select whether the rule should be enabled or disabled for the repository.
-
「ターゲット アラート」で、アラートのフィルター処理に使用するメタデータを選択します。
-
Under "Rules", select the action you want to take on alerts that match the metadata:
- Select Dismiss alerts to auto-dismiss alerts that match the metadata. You can choose to dismiss alerts indefinitely or until a patch is available.
- Select Open a pull request to resolve this alert if you want Dependabot to suggest changes to resolve alerts that match the targeted metadata. Note that this option is unavailable if you have already selected the option to dismiss alerts indefinitely, or if Dependabot security updates are enabled in your repository settings.
-
[ルールの作成] をクリックします。
Adding custom auto-triage rules to your organization
Note: During the public beta, you can create up to 25 custom auto-triage rules for your organization.
-
GitHub.com の右上隅にあるプロファイル写真を選択し、次に自分の組織をクリックします。
-
組織の隣の [設定] をクリックします。
-
サイドバーの [セキュリティ] セクションで、 [コードのセキュリティと分析] をクリックします。
-
"Dependabot" 、"Dependabot alerts"の下で、"Dependabot ルール" の近くにある をクリックします。
-
[新しいルール] をクリックします。
-
「ルール名前」の下で、このルールの実行内容を説明します。
-
Under "State", use the dropdown menu to choose how you want to apply the rule.
- Choose Enforced to prevent repository administrators from being able to edit, disable, or delete the rule in the repository's settings page.
- Choose Enabled to set the rule on-by-default for all repositories, while also allowing repository administrators to disable the rule in the repository's settings page.
- Alternatively, you can choose to set the rule as Disabled, which cannot be overridden at the repository level. Disabled rules are hidden for all repositories.
-
「ターゲット アラート」で、アラートのフィルター処理に使用するメタデータを選択します。
-
Under "Rules", select the action you want to take on alerts that match the metadata:
- Select Dismiss alerts to auto-dismiss alerts that match the metadata. You can choose to dismiss alerts indefinitely, or until a patch is available.
- Select Open a pull request to resolve this alert if you want Dependabot to suggest changes to resolve alerts that match the metadata. Note that this option is unavailable if you have selected the option to dismiss the alerts indefinitely.
-
[ルールの作成] をクリックします。
Editing or deleting custom auto-triage rules for your repository
-
GitHub.com で、リポジトリのメイン ページへ移動します。
-
リポジトリ名の下にある [設定] をクリックします。 [設定] タブが表示されない場合は、 [] ドロップダウン メニューを選び、 [設定] をクリックします。
-
サイドバーの [セキュリティ] セクションで、 [コードのセキュリティと分析] をクリックします。
-
「Dependabot alerts」で、「Dependabot rules」ルール付近の をクリックします。
-
Under "Repository rules", to the right of the rule that you want to edit or delete, click .
-
ルールを編集するには、該当するフィールドに変更を加え、**[変更の保存] ** をクリックします。
-
ルールを削除するには、[Danger Zone] で [ルールの削除] をクリックします。
-
[このルールを削除しますか?] ダイアログ ボックスで情報を確認し、[ルールの削除] をクリックします。
Editing or deleting custom auto-triage rules for your organization
-
GitHub.com の右上隅にあるプロファイル写真を選択し、次に自分の組織をクリックします。
-
組織の隣の [設定] をクリックします。
-
サイドバーの [セキュリティ] セクションで、 [コードのセキュリティと分析] をクリックします。
-
"Dependabot" 、"Dependabot alerts"の下で、"Dependabot ルール" の近くにある をクリックします。
-
Under "Organization rules", to the right of the rule that you want to edit or delete, click .
-
ルールを編集するには、該当するフィールドに変更を加え、**[変更の保存] ** をクリックします。
-
ルールを削除するには、[Danger Zone] で [ルールの削除] をクリックします。
-
[このルールを削除しますか?] ダイアログ ボックスで情報を確認し、[ルールの削除] をクリックします。