Skip to content

Add Dependabot alerts REST API functions [Changelog 2022-10-18] #620

@MariusStorhaug

Description

Summary

Dependabot alerts have no coverage in this module — there is no Dependabot command category under src/functions/public/. The Dependabot alerts REST API lets you list and update vulnerability alerts at the repository, organization, and enterprise level — essential for supply-chain security automation and reporting.

Changelog reference

Desired capability

Add functions for the Dependabot alerts REST API:

  • Get-GitHubDependabotAlert — list/get alerts at repo, org, and enterprise level, with filters (state, severity, ecosystem, package, scope).
  • Set-GitHubDependabotAlert — update alert state (dismissed/open) with dismissed reason/comment.

Acceptance criteria

  • Functions use Invoke-GitHubAPI and the active GitHubContext; pagination handled.
  • Repo-, org-, and enterprise-level listing supported via parameter sets.
  • Typed alert objects with default formats (severity, package, advisory summary).
  • Integration tests against an owned repo with Dependabot alerts enabled (skipped gracefully when unavailable).

Notes

  • Requires security_events (or repo) scope; org/enterprise listing requires appropriate admin permissions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions