List, triage, and resolve GitHub secret scanning alerts via the REST API

domain: docs.github.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate with a token scoped for repo/security_events (or fine-grained secret_scanning_alerts read/write) and confirm secret scanning is enabled for the repository.
  2. Call GET /repos/{owner}/{repo}/secret-scanning/alerts to list alerts, optionally filtering by state, secret_type, or resolution.
  3. Call GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number} to inspect an individual alert's locations and secret type display name.
  4. Call PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number} with state and, if resolving, a resolution value such as false_positive, wont_fix, revoked, or used_in_tests.
  5. For alerts under delegated bypass review, use the alert-dismissal-requests endpoints to list and approve or reject requests.

Known gotchas

Related routes

List organization-wide secret scanning alerts via the GitHub REST API
docs.github.com · 6 steps · unrated
Retrieve GitHub code scanning and Dependabot alerts via the REST API
docs.github.com · 6 steps · unrated
List and dismiss GitHub Dependabot alerts across a repository and organization via the REST API
docs.github.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans