Security in Git
Who may do what with your repositories, which credentials reach them, and what is recorded.
IAM
Permissions are per repository: a policy can name one repository or all of them. A repository's
resource name is rn:ews::<organization id>:git:repository/<repository id>; Git is regionless, so
the region segment is empty. rn:ews::<organization id>:git:* covers every repository.
{
"Version": "2024-01-01",
"Statement": [
{
"Effect": "Allow",
"Action": ["git:GetRepository", "git:PullRepository", "git:PushRepository"],
"Resource": "rn:ews::org-EXAMPLE1234:git:repository/5d6c2a1e-7b3f-4c8d-9e0a-1b2c3d4e5f60"
}
]
}Some actions stand apart so a policy can deny them while allowing the rest:
git:PublishRepository: making a repository public, at creation, import or later.git:ConfigurePushMirror: sending code to a remote outside Deutsche Cloud.git:BypassSecretProtection: pushing past secret scanning with a reason.git:PushProtectedTag: creating, moving or deleting a protected tag.
The repository's Settings → Access grants one of three levels, each a bundle of these actions:
| Level | Grants |
|---|---|
| Read | see the repository, its pull requests, issues and releases, and clone it |
| Push | Read, plus push, open, review and merge pull requests, use the merge queue, publish releases, post commit statuses, upload SARIF |
| Administer | Push, plus settings, branch and tag protection, security alerts, secret scanning bypass, deploy keys, webhooks, publishing and deleting |
| Action | Access | What it allows |
|---|---|---|
git:GetServiceStatus | Read | View Git service status |
git:ListRepositories | Read | List Git repositories |
git:GetRepository | Read | View a repository |
git:CreateRepository | Write | Create a new repository |
git:UpdateRepository | Write · destructive | Update repository settings |
git:StopMirroring | Write · destructive | Turn a mirror into an ordinary repository: syncing from its source ends and pushes become possible |
git:ConfigurePushMirror | Write · destructive | Set, remove or trigger a push mirror: every push is copied to a remote outside Deutsche Cloud |
git:DeleteRepository | Write · destructive | Delete a repository |
git:PublishRepository | Write · destructive | Make a repository public: anyone can clone and read it without credentials |
git:PullRepository | Read · sensitive | Clone or pull from a repository |
git:PushRepository | Write · destructive | Push commits to a repository |
git:AdminRepository | Write · destructive | Manage repository settings, access, and branch protection |
git:ManageBranchProtection | Write · destructive | Create and update branch protection rules |
git:ListDeployKeys | Read | List deploy keys for a repository |
git:CreateDeployKey | Write | Add a deploy key to a repository |
git:DeleteDeployKey | Write · destructive | Remove a deploy key from a repository |
git:ListGithubInstallations | Read | List the organization's GitHub App installations and the GitHub repositories they cover |
git:ConnectGithub | Write | Bind a GitHub App installation to the organization (checked with the installer's GitHub sign-in), mirror its repositories, push them back to GitHub through it, or disconnect it |
git:ListWebhooks | Read · sensitive | List webhooks for a repository |
git:CreateWebhook | Write | Create a webhook for a repository |
git:UpdateWebhook | Write · destructive | Update a repository webhook |
git:DeleteWebhook | Write · destructive | Delete a repository webhook |
git:CreateAccessToken | Write | Create a personal Git HTTPS access token |
git:ListAccessTokens | Read | List personal Git HTTPS access tokens |
git:DeleteAccessToken | Write · destructive | Revoke a personal Git HTTPS access token |
git:RegisterSshKey | Write | Register an SSH key for Git access |
git:DeleteSshKey | Write · destructive | Remove an SSH key from Git access |
git:ListPullRequests | Read | List pull requests in a repository |
git:GetPullRequest | Read | View a pull request |
git:CreatePullRequest | Write | Open a new pull request |
git:UpdatePullRequest | Write · destructive | Update pull request title, body, or target branch |
git:MergePullRequest | Write | Merge a pull request |
git:ClosePullRequest | Write · destructive | Close a pull request without merging |
git:ReviewPullRequest | Write | Submit a review on a pull request |
git:MarkFilesViewed | Write | Mark a pull request's files viewed (or not) for yourself |
git:GetMergeQueue | Read | View a branch merge queue and its history |
git:AddToMergeQueue | Write | Add a pull request to a merge queue ("merge when ready") |
git:RemoveFromMergeQueue | Write · destructive | Remove a pull request from a merge queue |
git:ListReleases | Read | List and view a repository’s releases |
git:CreateRelease | Write | Create a release (and its tag, if new); publishing starts `on: release` workflows |
git:UpdateRelease | Write | Edit or publish a release |
git:DeleteRelease | Write · destructive | Delete a release (its tag stays) |
git:ListIssues | Read | List and read a repository's issues, their comments and its labels |
git:CreateIssue | Write | Open an issue |
git:UpdateIssue | Write | Edit, close or reopen an issue; set its labels and assignees, or a pull request’s labels |
git:CommentOnIssue | Write | Comment on an issue |
git:ManageLabels | Write | Create, change and delete a repository's labels |
git:PushProtectedTag | Write | Create, move or delete a tag matching a tag protection rule (in addition to PushRepository) |
git:BypassSecretProtection | Write | Push a commit containing a detected secret anyway, with a reason (`git push -o secret_scanning.bypass=…`) |
git:ListSecurityAlerts | Read | View secret scanning, dependency and code scanning alerts and the security overview |
git:UpdateSecurityAlert | Write | Resolve, dismiss or reopen a security alert |
git:UploadCodeScanningResults | Write | Upload a SARIF file of code scanning results for a commit |
git:ListCommitStatuses | Read | Read the statuses external tools reported on a commit |
git:CreateCommitStatus | Write | Report a status (pending, success, failure, error) on a commit |
Generated from the service’s IAM descriptor. Sensitive reads hand over secret material or source code and are recorded in the audit log like writes; destructive writes delete, overwrite or revoke.
Credentials
| Credential | Reaches | Notes |
|---|---|---|
| Access token | HTTPS and the API, for the repositories its owner may reach | Shown once; optional expiry (1 to 365 days); can be narrowed to some repositories and to read only; lastUsedAt kept |
| Account SSH key | SSH, for the repositories its owner may reach | No passwords over SSH |
| Deploy key | SSH, one repository | Read-only unless created with write access; can never push a protected tag |
A token never does more than its owner's own policies allow.
Network exposure
- Repositories are served over HTTPS and SSH on the Git host. Verify the server's SSH host key fingerprint by hand before the first connection; it is shown as Server fingerprint under Account → SSH keys.
- A public repository can be cloned anonymously; anonymous requests are rate-limited per address
and answered 429 with
Retry-Afterpast the limit. See Public repositories. - Webhooks reach only public
https://addresses and follow no redirects; imports fetch only fromhttps://sources.
Audit
Every write is authorized and recorded in the audit log, including turning secret
push protection off for a repository. A push past secret scanning is also recorded as an alert,
with the person's name and reason. Webhook deliveries of a webhook with a secret are signed with
HMAC-SHA256 in X-EWS-Signature-256.