Fetch fixes for vulnerabilities in a repository, scan, or uploaded manifest

Fetches available fixes for vulnerabilities in a repository, scan, or uploaded manifest. Requires exactly one of repo_slug, full_scan_id, or tar_hash, as well as vulnerability_ids to be provided. vulnerability_ids can be a comma-separated list of GHSA or CVE IDs, or "*" for all vulnerabilities.

Response Structure

The response contains a fixDetails object where each key is a vulnerability ID (GHSA or CVE) and the value is a discriminated union based on the type field.

Common Fields

All response variants include:

  • type: Discriminator field (one of: "fixFound", "partialFixFound", "noFixAvailable", "fixNotApplicable", "errorComputingFix")
  • value: Object containing the variant-specific data

The value object always contains:

  • ghsa: string | null - The GHSA ID
  • cve: string | null - The CVE ID (if available)
  • advisoryDetails: object | null - Advisory details (only if include_details=true)

Response Variants

fixFound: A complete fix is available for all vulnerable packages

  • value.fixDetails.fixes: Array of fix objects, each containing:
    • purl: Package URL to upgrade
    • fixedVersion: Version to upgrade to
    • manifestFiles: Array of manifest files containing the package
    • updateType: "patch" | "minor" | "major" | "unknown"
  • value.fixDetails.responsibleDirectDependencies: (optional) Map of direct dependencies responsible for the vulnerability

partialFixFound: Fixes available for some but not all vulnerable packages

  • Same as fixFound, plus:
  • value.fixDetails.unfixablePurls: Array of packages that cannot be fixed, each containing:
    • purl: Package URL
    • manifestFiles: Array of manifest files
    • reasons: Human-readable explanations of why the package cannot be upgraded. May contain multiple distinct entries when different dependency chains are blocked for different causes (e.g. one chain has no compatible upstream version; another would require a major version bump skipped by --no-major-updates).

noFixAvailable: No fix exists for this vulnerability (no patched version published)

fixNotApplicable: A patched version of the vulnerable package exists but cannot be applied. The most common cause is that there is no upgrade path through the dependency tree — for example, given a chain App → [email protected][email protected] where B < 2.0.0 is vulnerable, if no version of A accepts [email protected] the fix cannot be applied without a manual override (e.g. pnpm overrides). Other causes include callers passing --no-major-updates when the only patched version is a major bump.

  • value.vulnerableArtifacts: Array of vulnerable packages with their manifest files

errorComputingFix: An error occurred while computing fixes

  • value.message: Error description

Advisory Details (when include_details=true)

  • title: string | null
  • description: string | null
  • cwes: string[] - CWE identifiers
  • severity: "LOW" | "MODERATE" | "HIGH" | "CRITICAL"
  • cvssVector: string | null
  • publishedAt: string (ISO date)
  • kev: boolean - Whether it's a Known Exploited Vulnerability
  • epss: number | null - Exploit Prediction Scoring System score
  • affectedPurls: Array of affected packages with version ranges

This endpoint consumes 10 units of your quota.

This endpoint requires the following org token scopes:

  • fixes:list
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The slug of the organization

Query Params
string

The slug of the repository to fetch fixes for (e.g. "my-repo" or "my-org/my-repo"). Use the full org/repo path to disambiguate when multiple GitHub orgs share the same repo name. Computes fixes based on the latest scan on the default branch

string

The ID of the scan to fetch fixes for

string

A tarball hash from the upload-manifest-files endpoint. Mutually exclusive with repo_slug and full_scan_id.

string
required

Comma-separated list of GHSA or CVE IDs, or "*" for all vulnerabilities

boolean
required
Defaults to false

Whether to allow major version updates in fixes

string
Defaults to 0d

Minimum release age for fixes packages (e.g., "1h", "2d", "1w"). Higher values reduces risk of installing recently released untested package versions.

boolean
Defaults to false

Whether to include advisory details in the response

boolean
Defaults to false

Set to include the direct dependencies responsible for introducing the dependency or dependencies with the vulnerability in the response

boolean
Defaults to false

Set to include an allDetectedGhsas field listing every GHSA detected in the project, regardless of the vulnerability_ids filter. Useful for CLI clients that request a specific GHSA and want to show the user which GHSAs actually exist when the request has no overlap.

string

The id of an autofix-or-upgrade-cli-run record (created via /fixes/register-autofix-or-upgrade-cli-run) to associate this computation with. When set, the server records per-GHSA fix-computation telemetry into autofix_compute_vulnerability and updates the run's autofix_run row, mirroring the legacy /v0/fixes/compute-fixes endpoint. The caller must own the run's organization; foreign-org or unknown ids return 404.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json