git.security.code-scanning-at-commit

Code scanning results reported for one commit, per tool

GET /git/api/repositories/{repoId}/commits/{sha}/code-scanningIAM git:ListSecurityAlertsRead

Request syntax

GET /git/api/repositories/{repoId}/commits/{sha}/code-scanning

Path parameters

  • repoIdRequired

    string

    Constraints: uuid

  • shaRequired

    string

    Constraints: /^[0-9a-f]{40}$/

Response

200 with one entry per tool: `tool`, `analysedAt` and the `alerts` it reported.

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

Fields of data

  • [].​toolAlways

    string

    The tool, e.g. Semgrep
  • [].​analysedAtAlways

    string

    When its latest analysis was uploaded (ISO 8601)
  • [].​alertsAlways

    array of object

    The alerts that analysis reported
  • [].​alerts[].​idAlways

    string

    The alert
  • [].​alerts[].​orgIdAlways

    string

    The organization
  • [].​alerts[].​repoIdAlways

    string

    The repository
  • [].​alerts[].​toolAlways

    string

    The tool that reported it, e.g. Semgrep
  • [].​alerts[].​fingerprintAlways

    string

    Identifies the same finding across uploads
  • [].​alerts[].​stateAlways

    one of open, fixed, dismissed

    fixed once an analysis of the default branch no longer reports it
  • [].​alerts[].​ruleIdAlways

    string

    The tool's rule id
  • [].​alerts[].​ruleDescriptionAlways

    string, may be null

    The rule's description; null when the tool gives none
  • [].​alerts[].​severityAlways

    one of critical, high, medium, low, note

    The severity
  • [].​alerts[].​messageAlways

    string

    What the tool says about this finding
  • [].​alerts[].​pathAlways

    string

    The file, from the repository root
  • [].​alerts[].​startLineAlways

    number, may be null

    First line of the finding; null when not given
  • [].​alerts[].​endLineAlways

    number, may be null

    Last line of the finding; null when not given
  • [].​alerts[].​helpUriAlways

    string, may be null

    A link to the rule's documentation; null when none
  • [].​alerts[].​firstSeenCommitOidAlways

    string

    The commit it was first reported on
  • [].​alerts[].​lastSeenCommitOidAlways

    string

    The commit it was last reported on
  • [].​alerts[].​lastSeenRefAlways

    string

    The ref of the analysis that last saw it: the default branch or a pull request head
  • [].​alerts[].​dismissedReasonAlways

    string, may be null

    Why it was dismissed; null unless dismissed
  • [].​alerts[].​dismissedByIamUserIdAlways

    string, may be null

    Who dismissed it; null unless dismissed
  • [].​alerts[].​fixedAtAlways

    string, may be null

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

    string

    When it was first reported (ISO 8601)
  • [].​alerts[].​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: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 code-scanning-at-commit repoId sha

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_git_security_code-scanning-at-commit.