git.security.fix-dependencies

Fix the security issues of this repository: open a pull request that bumps the vulnerable dependencies of its package-lock.json and pnpm-lock.yaml

POST /git/api/repositories/{repoId}/security/dependency-alerts/fixIAM git:CreatePullRequestChanges state

Answers 202; the platform creates a branch, bumps the versions, updates the lockfile with the package manager (no install scripts, public registry) and opens a pull request listing the advisories, so CI runs. It never merges. Needs git:PushRepository too. `get-dependency-fix` shows the outcome; 409 names an open fix pull request for the same package.

Request syntax

POST /git/api/repositories/{repoId}/security/dependency-alerts/fix
{
  "packages": "array of string"
}

Path parameters

  • repoIdRequired

    string

    Constraints: uuid

Request body

  • packagesOptional

    array of string

    Package groups to fix, as `ecosystem:package` (e.g. `pnpm:vite`); leave out to fix every package a fixed version exists for

    Constraints: 3-300 chars

Response

202 with `queued: true`; the fix pull request is prepared in the background and `get-dependency-fix` reports it.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Fields of data

  • queuedAlways

    boolean

    Always true: the fix was queued

Checked against the handlers: every route test validates their answers against this schema.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow git:CreatePullRequest on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud git security fix-dependencies repoId

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_git_security_fix-dependencies.