git.security.resolve-secret-alert

Say what was done about a bypassed secret (revoked, false positive, …)

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

Request syntax

PATCH /git/api/repositories/{repoId}/security/secret-alerts/{alertId}
{
  "resolution": "enum",
  "comment": "string"
}

Path parameters

  • repoIdRequired

    string

    Constraints: uuid

  • alertIdRequired

    string

    Constraints: uuid

Request body

  • resolutionRequired

    enum

    What was done about the secret that was pushed

    One of: revoked, false_positive, used_in_tests, wont_fix

  • commentOptional

    string

    A note on the resolution, in your own words

    Constraints: max 2000 chars

Response

200 with the alert, resolved: resolution, resolutionComment, resolvedByIamUserId, resolvedAt. 404 for an alert that was not bypassed.

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 blocked, bypassed, resolved

    blocked: the push was refused; bypassed: pushed anyway and in the history; resolved: someone said what was done
  • ruleIdAlways

    string

    The detector that matched
  • ruleNameAlways

    string

    The kind of credential, in words
  • pathAlways

    string

    The file the secret is in
  • lineAlways

    number

    The line it is on, from 1
  • blobOidAlways

    string

    The id of the file content it was found in
  • refNameAlways

    string

    The ref that was pushed
  • commitOidAlways

    string

    The pushed tip of the ref; the secret is in its history
  • fingerprintAlways

    string

    A sha256 fingerprint to recognise the same secret again
  • previewAlways

    string

    A redacted preview; never the secret itself
  • pushedByAlways

    string

    Who pushed: user:<IAM user id>, deploy:<deploy key id> or unknown
  • pushedByIamUserIdAlways

    string, may be null

    The IAM user who pushed; null for a deploy key or a deleted user
  • bypassReasonAlways

    string, may be null

    Why it was pushed anyway; null unless bypassed
  • resolutionAlways

    one of revoked, false_positive, used_in_tests, wont_fix, may be null

    What was done about it; null until resolved
  • resolutionCommentAlways

    string, may be null

    A note on the resolution, if any
  • resolvedByIamUserIdAlways

    string, may be null

    Who resolved it; null until resolved
  • resolvedAtAlways

    string, may be null

    When it was resolved (ISO 8601); null until then
  • createdAtAlways

    string

    When the push was scanned (ISO 8601)
  • updatedAtAlways

    string

    When the alert last changed (ISO 8601)

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 resolve-secret-alert repoId alertId --resolution revoked

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