git.security.list-secret-alerts

Secrets push protection found: blocked, bypassed and resolved, plus scan gaps

GET /git/api/repositories/{repoId}/security/secret-alertsIAM git:ListSecurityAlertsRead

Never the secret itself: a redacted preview and a fingerprint. `gaps` lists pushes the scan could not finish (fail-open past its time or size budget).

Request syntax

GET /git/api/repositories/{repoId}/security/secret-alerts

Path parameters

  • repoIdRequired

    string

    Constraints: uuid

Response

200 with `alerts` (state, ruleName, path, line, commitOid, refName, preview, fingerprint, who pushed it, and the resolution) and `gaps` (refName, commitOid, reason, blobsScanned, blobsSkipped).

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

Fields of data

  • alertsAlways

    array of object

    The newest 500 alerts, newest first
  • alerts[].​idAlways

    string

    The alert
  • alerts[].​orgIdAlways

    string

    The organization
  • alerts[].​repoIdAlways

    string

    The repository
  • alerts[].​stateAlways

    one of blocked, bypassed, resolved

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

    string

    The detector that matched
  • alerts[].​ruleNameAlways

    string

    The kind of credential, in words
  • alerts[].​pathAlways

    string

    The file the secret is in
  • alerts[].​lineAlways

    number

    The line it is on, from 1
  • alerts[].​blobOidAlways

    string

    The id of the file content it was found in
  • alerts[].​refNameAlways

    string

    The ref that was pushed
  • alerts[].​commitOidAlways

    string

    The pushed tip of the ref; the secret is in its history
  • alerts[].​fingerprintAlways

    string

    A sha256 fingerprint to recognise the same secret again
  • alerts[].​previewAlways

    string

    A redacted preview; never the secret itself
  • alerts[].​pushedByAlways

    string

    Who pushed: user:<IAM user id>, deploy:<deploy key id> or unknown
  • alerts[].​pushedByIamUserIdAlways

    string, may be null

    The IAM user who pushed; null for a deploy key or a deleted user
  • alerts[].​bypassReasonAlways

    string, may be null

    Why it was pushed anyway; null unless bypassed
  • alerts[].​resolutionAlways

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

    What was done about it; null until resolved
  • alerts[].​resolutionCommentAlways

    string, may be null

    A note on the resolution, if any
  • alerts[].​resolvedByIamUserIdAlways

    string, may be null

    Who resolved it; null until resolved
  • alerts[].​resolvedAtAlways

    string, may be null

    When it was resolved (ISO 8601); null until then
  • alerts[].​createdAtAlways

    string

    When the push was scanned (ISO 8601)
  • alerts[].​updatedAtAlways

    string

    When the alert last changed (ISO 8601)
  • gapsAlways

    array of object

    The newest 50 pushes the scan could not finish
  • gaps[].​idAlways

    string

    The gap
  • gaps[].​orgIdAlways

    string

    The organization
  • gaps[].​repoIdAlways

    string

    The repository
  • gaps[].​refNameAlways

    string

    The ref that was pushed
  • gaps[].​commitOidAlways

    string

    The pushed tip of the ref
  • gaps[].​reasonAlways

    string

    Why the scan stopped short (time or size budget)
  • gaps[].​blobsScannedAlways

    number

    Files the scan checked
  • gaps[].​blobsSkippedAlways

    number

    Files the scan did not get to
  • gaps[].​createdAtAlways

    string

    When the push was scanned (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:ListSecurityAlerts 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 list-secret-alerts 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_list-secret-alerts.