git.security.set-dependency-alert

Dismiss a dependency alert with a reason, or reopen it

PATCH /git/api/repositories/{repoId}/security/dependency-alerts/{alertId}IAM git:UpdateSecurityAlertChanges state

Request syntax

PATCH /git/api/repositories/{repoId}/security/dependency-alerts/{alertId}
{
  "state": "enum",
  "reason": "string",
  "comment": "string"
}

Path parameters

  • repoIdRequired

    string

    Constraints: uuid

  • alertIdRequired

    string

    Constraints: uuid

Request body

  • stateRequired

    enum

    `dismissed` closes the alert, `open` reopens it

    One of: open, dismissed

  • reasonOptional

    string

    Why it is dismissed: false positive, not exploitable, accepted risk, fix later, or your own words

    Constraints: max 2000 chars

  • commentOptional

    string

    Your own words beside the reason

    Constraints: max 2000 chars

Response

200 with the alert in its new state, with dismissedReason and dismissedComment.

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

Fields of data

  • idAlways

    string

    The alert
  • orgIdAlways

    string

    The organization
  • repoIdAlways

    string

    The repository
  • stateAlways

    one of open, fixed, dismissed

    fixed once a scan no longer finds the vulnerable version
  • manifestPathAlways

    string

    The lockfile the package is installed by
  • ecosystemAlways

    string

    The package ecosystem, e.g. npm
  • packageNameAlways

    string

    The vulnerable package
  • installedVersionAlways

    string

    The version the lockfile installs
  • fixedVersionAlways

    string, may be null

    The first version with the fix; null if none yet
  • vulnerabilityIdAlways

    string

    The advisory id, e.g. GHSA-… or CVE-…
  • severityAlways

    one of critical, high, medium, low, unknown

    The severity
  • titleAlways

    string

    The advisory's title
  • urlAlways

    string, may be null

    A link to the advisory; null when it has none
  • cvssScoreAlways

    number, may be null

    CVSS base score, 0 to 10; null when not published
  • cvssVectorAlways

    string, may be null

    CVSS vector string; null when not published
  • referencesAlways

    array of string

    Links the advisory cites
  • aliasesAlways

    array of string

    Other ids of the same advisory
  • publishedAtAlways

    string, may be null

    When the advisory was published (ISO 8601); null when unknown
  • relationshipAlways

    one of direct, indirect, may be null

    direct: named in the manifest; indirect: pulled in by another package; null when unknown
  • chainAlways

    array of string

    From a direct dependency down to this package, name@version each
  • devAlways

    boolean, may be null

    Only a development dependency; null when unknown
  • lastSeenCommitOidAlways

    string

    The default-branch commit of the scan that last saw it
  • dismissedReasonAlways

    string, may be null

    Why it was dismissed; null unless dismissed
  • dismissedCommentAlways

    string, may be null

    Own words beside the reason; null unless given
  • dismissedAtAlways

    string, may be null

    When it was dismissed (ISO 8601); null unless dismissed
  • dismissedByIamUserIdAlways

    string, may be null

    Who dismissed it; null unless dismissed
  • fixedAtAlways

    string, may be null

    When a scan found it fixed (ISO 8601); null until then
  • createdAtAlways

    string

    When it was first found (ISO 8601)
  • updatedAtAlways

    string

    When the alert last changed (ISO 8601)
  • descriptionAlways

    string, may be null

    The advisory as published (Markdown); null for alerts found before it was kept

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:UpdateSecurityAlert 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 set-dependency-alert repoId alertId --state open

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