git.security.getThe repository’s security overview: settings, policy, open alert counts
`policy` is the first of .github/SECURITY.md, SECURITY.md, docs/SECURITY.md on the default branch (null without git:PullRepository). `dependencyScan` is the last lockfile scan.
Without git:PullRepository the answer is reduced rather than refused.
Request syntax
GET /git/api/repositories/{repoId}/securityPath parameters
repoIdRequiredstring
Constraints: uuid
Response
200 with `settings` (secretPushProtection, dependencyAlerts, maxFileSizeMb), `policy`, `counts` (secretsBypassed, secretsBlocked30d, dependencyCritical, dependencyHigh, dependencyOther, codeScanOpen) and `dependencyScan` (status, commitOid, error, summary, startedAt, finishedAt, or null).
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
settingsAlwaysobject
The security settings of the repositorysettings.secretPushProtectionAlwaysboolean
Pushes that add a known credential format are refusedsettings.dependencyAlertsAlwaysboolean
The default branch's lockfiles are checked against the vulnerability databasesettings.maxFileSizeMbAlwaysnumber, may be null
Largest file a push may add, in MB; null for the platform default of 100policyAlwaysobject, may be null
The security policy on the default branch; null without one or without git:PullRepositorypolicy.pathAlwaysstring
Where the policy file is, e.g. SECURITY.mdpolicy.markdownAlwaysstring
Its text (Markdown), at most 200,000 characterscountsAlwaysobject
Open alert countscounts.secretsBypassedAlwaysnumber
Secrets pushed past protection and not yet resolvedcounts.secretsBlocked30dAlwaysnumber
Pushes refused for a secret in the last 30 dayscounts.dependencyCriticalAlwaysnumber
Open dependency alerts of critical severitycounts.dependencyHighAlwaysnumber
Open dependency alerts of high severitycounts.dependencyOtherAlwaysnumber
Open dependency alerts of medium, low or unknown severitycounts.codeScanOpenAlwaysnumber
Open code scanning alerts on the default branchdependencyScanAlwaysobject, may be null
The last lockfile scan; null if none ran yetdependencyScan.statusAlwaysone of running, succeeded, failed
Where the scan isdependencyScan.commitOidAlwaysstring, may be null
The default-branch commit it scanneddependencyScan.errorAlwaysstring, may be null
Why it failed; null otherwisedependencyScan.summaryAlwaysmap, may be null
Counts the scan reported, by name; null while runningdependencyScan.startedAtAlwaysstring
When it started (ISO 8601)dependencyScan.finishedAtAlwaysstring, may be null
When it finished (ISO 8601); null while running
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 get repoIdcurl -X GET "https://console.platform-development.deutschecloud.app/git/api/repositories/repoId/security" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY"Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_git_security_get.