Skip to content

Add Dependabot alert support#36

Open
mmaikel wants to merge 2 commits intomainfrom
add-dependabot-alert-support
Open

Add Dependabot alert support#36
mmaikel wants to merge 2 commits intomainfrom
add-dependabot-alert-support

Conversation

@mmaikel
Copy link
Copy Markdown

@mmaikel mmaikel commented Apr 6, 2026

Summary

Add GHDependabotAlert support to the library, following the same pattern as GHCodeScanningAlert and GHSecretScanningAlert.

Additionally, bump the "setup-java" and "checkout" actions to v4 -- the v2 version is deprecated and causes build errors in CI (as seen in commit 22872d3)

New classes

  • GHDependabotAlert — Main alert class with nested Dependency, SecurityAdvisory, SecurityVulnerability, Package, PatchedVersion
  • GHDependabotAlertStateOPEN, DISMISSED, FIXED, AUTO_DISMISSED
  • GHDependabotAlertsIterable — Paginated iteration with owner wrapping

New GHRepository methods

  • listDependabotAlerts() / listDependabotAlerts(state) / listDependabotAlerts(filters)
  • getDependabotAlert(number)

Endpoint

GET /repos/{owner}/{repo}/dependabot/alerts

Context

Needed by brain-backend (CET-24466) to fetch Dependabot alerts via REST API instead of GraphQL vulnerabilityAlerts, which silently returns empty on GHES instances with restricted token permissions.

Add GHDependabotAlert, GHDependabotAlertState, and
GHDependabotAlertsIterable following the same pattern as the existing
GHCodeScanningAlert and GHSecretScanningAlert implementations.

New classes:
- GHDependabotAlert: Main alert class with nested Dependency,
  SecurityAdvisory, SecurityVulnerability, Package, PatchedVersion
- GHDependabotAlertState: OPEN, DISMISSED, FIXED, AUTO_DISMISSED
- GHDependabotAlertsIterable: Paginated iteration with owner wrapping

New GHRepository methods:
- listDependabotAlerts() / listDependabotAlerts(state) /
  listDependabotAlerts(filters)
- getDependabotAlert(number)

Endpoint: GET /repos/{owner}/{repo}/dependabot/alerts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mmaikel mmaikel force-pushed the add-dependabot-alert-support branch from cac066e to 22872d3 Compare April 6, 2026 13:26
@rychang03
Copy link
Copy Markdown

rychang03 commented Apr 7, 2026

deploy step is trying to publish to a maven repo, but we don't need that here.

https://cortexio.slack.com/archives/CRKQXMSM6/p1750954398537059

^some additional context on the deploy error; previous prs have bypassed this check

example pr: #35

@akwirick
Copy link
Copy Markdown

akwirick commented Apr 8, 2026

@rychang03 I think you might want to take a run at just simplifying the CI. That deploy failure makes it look like we are trying to push to a public nexus repo still (probably from the original fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants