[Missing API] Add dependabot_malware_alerts to security_and_analysis on PATCH /repos/{owner}/{repo}

オープン
#6,251 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
openapi
領域
api

調査の方向性

PATCH /repos/{owner}/{repo} の OpenAPI 定義から始め、PATCH リクエストと GET レスポンスの両方で security_and_analysis フィールドがどのように表現されているかを調べます。まず、GitHub API がこのフィールドをサポートしていることを確認します。エンドポイントの説明で dependabot_malware_alerts が両方向で一貫して公開され、リポジトリの検証チェックが通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

documentation

Missing dependabot_malware_alerts in security_and_analysis (PATCH /repos)

The security_and_analysis object on the Update a repository endpoint currently supports toggling:

  • dependabot_security_updates
  • secret_scanning
  • secret_scanning_push_protection
  • secret_scanning_non_provider_patterns
  • secret_scanning_validity_checks

However, Dependabot malware alerts - which is a separate toggle in the repository settings UI under Security → Advanced Security - has no corresponding field in the API.

Why this matters

I maintain tooling that manages GitHub security settings across ~80+ repositories. Everything else can be configured via the REST API, but malware alerts require either clicking through the UI for each repo or setting up an org-wide security configuration (which requires org admin).

Having a dependabot_malware_alerts field in security_and_analysis (both GET and PATCH) would make it possible to:

  • Enable malware alerts in bulk across many repos
  • Audit whether it's enabled as part of compliance checks
  • Include it in IaC / GitOps workflows alongside the other security toggles
Expected behavior
// PATCH /repos/{owner}/{repo}
{
  "security_and_analysis": {
    "dependabot_malware_alerts": {
      "status": "enabled"
    }
  }
}

And the GET response should include the current state, same as the other fields.

Current workaround

Manual toggle per repo via the UI, or org-level security configurations (requires org admin).

主要言語
言語のデータがありません
スター
1.6k
フォーク
342
平均マージ
3時間 33分
マージ済み PR(30日)
51

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/rest-api-description のほかの issue

github/rest-api-description の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。