How access works

GitClassic reads your CodeCommit repositories through an IAM role that you create in your own AWS account, with one CloudFormation click. It never gets access keys, never stores your code, and you can revoke it by deleting the stack.

Two roles

  • Read-only (gitclassic-viewer-…, required). Lists your repositories and reads files, branches, commits, diffs and pull requests. Every page uses it. It can't change anything, and it can't clone a repository.
  • Editor (gitclassic-editor-…, optional). Works on pull requests (comment, approve, merge, open, close), commits edits made in the browser, and creates branches and repositories. GitClassic uses it only for the action someone takes, never for viewing. It's a second stack, so you can add it later, or never.

Both stacks take a RepoPrefix setting: only repositories whose names start with it. Leave it empty for every repository in the account.

How connecting works

  1. In a workspace, you enter your 12-digit AWS account number. GitClassic generates a random external ID that belongs to that connection alone.
  2. GitClassic sends you to AWS CloudFormation with the template filled in. You review it there, in AWS, and click Create stack. It creates one IAM role.
  3. The role trusts GitClassic's AWS account (692859917589), and only for requests that carry your external ID and name the GitClassic user they're for. Another customer can't point GitClassic at your account: they'd need your external ID, and nobody gets to choose their own.
  4. When someone opens a page, GitClassic asks AWS STS for a session on the role. It lasts 15 minutes and lives only in the server's memory. It is never written to a database, file or log.

Who did what

Each session carries the email of the GitClassic user who opened it, twice: as its source identity, which AWS records on every call in CloudTrail and which can't be changed for the life of the session, and as its session name. The role enforces this: it refuses any session that doesn't name a user.

So a comment, approval, merge or commit made in GitClassic shows up in CodeCommit, and in CloudTrail, as gitclassic-editor-…/jamie@acme.com: the role and the person. In CloudTrail, look for sourceIdentity to see every call GitClassic made and who on your team made it.

What the read-only role allows

Template v1. Every permission is a read, and every action is listed by name.

  • List your repositories and the regions they could be in

    Repository names in each region, and which regions your account has turned on. IAM can't limit a list of names by prefix, so RepoPrefix doesn't hide names; it does keep everything below away from repositories outside it.

    codecommit:ListRepositoriesaccount:ListRegions
  • View repositories and branches

    Each repository's description, default branch, clone addresses and branches.

    codecommit:BatchGetRepositoriescodecommit:GetRepositorycodecommit:ListBranchescodecommit:GetBranch
  • Read files and folders

    The files you open and the folders you browse, one at a time, read through the CodeCommit API and sent to your browser. GitClassic never stores them. There is no codecommit:GitPull, so it can't clone a repository.

    codecommit:GetFoldercodecommit:GetFilecodecommit:GetBlob
  • Read commits and what changed in them

    Commit messages, authors and dates, and the files each commit changed. GitClassic keeps commit details (never file contents) in its database to make history pages fast, and deletes them when you disconnect.

    codecommit:GetCommitcodecommit:BatchGetCommitscodecommit:GetDifferencescodecommit:ListFileCommitHistory
  • Read pull requests

    Pull requests with their comments, events, approvals and approval rules, and whether and how they can merge. Comments are read from CodeCommit each time and never stored.

    codecommit:ListPullRequestscodecommit:GetPullRequestcodecommit:DescribePullRequestEventscodecommit:GetCommentsForPullRequestcodecommit:GetCommentsForComparedCommitcodecommit:GetCommentcodecommit:GetCommentReactionscodecommit:GetPullRequestApprovalStatescodecommit:EvaluatePullRequestApprovalRulescodecommit:GetPullRequestOverrideStatecodecommit:GetMergeOptionscodecommit:GetMergeConflictscodecommit:DescribeMergeConflictscodecommit:BatchDescribeMergeConflicts
  • Read repositories encrypted with your own KMS key

    Only when CodeCommit asks KMS on GitClassic's behalf (kms:ViaService), so the key can't be used for anything else. Repositories on AWS's default key don't need it.

    kms:Decrypt

What it can't do

  • Change anything. No write permission of any kind.
  • Clone or download a repository. There is no codecommit:GitPull. Files are read one at a time, when someone opens them.
  • Touch anything but CodeCommit. The only other permissions are listing your account's regions (to know where to look) and decrypting with your KMS key, and only when CodeCommit asks on GitClassic's behalf.
  • Keep access after you leave. Delete the stack and the next request fails. There is nothing for GitClassic to hold on to.

The editor role (optional)

Template v2. Off unless you add it, account by account. GitClassic uses it only when someone makes a change: comments, approves or merges; opens, edits or closes a pull request; commits an edit, a new file or a deletion; creates a branch or a repository. Viewing keeps using the read-only role. Commits made this way carry the person's name and email, like any other commit.

  • Comment on pull requests

    Post comments and replies, on the whole pull request or on a line of a file, edit or delete your own, and react to comments.

    codecommit:PostCommentForPullRequestcodecommit:PostCommentReplycodecommit:PostCommentForComparedCommitcodecommit:UpdateCommentcodecommit:DeleteCommentContentcodecommit:PutCommentReaction
  • Approve pull requests

    Approve a pull request, or take an approval back. Your approval rules still decide what counts.

    codecommit:UpdatePullRequestApprovalState
  • Merge pull requests

    Fast-forward, squash or three-way merge, when someone clicks Merge and your approval rules are met. It can't bypass approval rules or merge branches outside a pull request.

    codecommit:MergePullRequestByFastForwardcodecommit:MergePullRequestBySquashcodecommit:MergePullRequestByThreeWay
  • Open, close and edit pull requests

    Open a pull request from one branch to another, change its title or description, and close it.

    codecommit:CreatePullRequestcodecommit:UpdatePullRequestStatuscodecommit:UpdatePullRequestTitlecodecommit:UpdatePullRequestDescription
  • Commit changes made in GitClassic

    Edit, add or delete files in the browser and commit them, one commit at a time, on top of the branch's latest commit. It can't rewrite history or force-push. With ProtectedBranches set, AWS refuses direct commits to those branches, so changes to them go through a pull request.

    codecommit:PutFilecodecommit:CreateCommitcodecommit:DeleteFile
  • Create branches

    Start a branch from an existing commit, usually for a change you'll open a pull request from. It can't delete branches.

    codecommit:CreateBranch
  • Create repositories

    Create a repository (named within RepoPrefix), and change a repository's description or default branch. It can't delete or rename repositories.

    codecommit:CreateRepositorycodecommit:UpdateRepositoryDescriptioncodecommit:UpdateDefaultBranch
  • Keep your issues and boards

    Read and write issues, their comments and their board status in one DynamoDB table in your account, gitclassic-issues-<connection>, which this stack creates. Only that table: no other DynamoDB access, and it can't delete the table. Deleting this stack keeps the table and your issues.

    dynamodb:GetItemdynamodb:BatchGetItemdynamodb:Querydynamodb:PutItemdynamodb:UpdateItemdynamodb:DeleteItemdynamodb:DescribeTable
  • Write to repositories encrypted with your own KMS key

    Comments, merges and commits in those repositories are encrypted with your key, only when CodeCommit asks KMS on GitClassic's behalf (kms:ViaService).

    kms:Decryptkms:Encryptkms:GenerateDataKey

It can't push with git, force-push or rewrite history (every commit goes on top of the branch's latest commit), delete branches or repositories, rename repositories, or change approval rules, and a merge still has to meet your approval rules. Set ProtectedBranches on the stack (say main) and AWS refuses direct commits to those branches, so changes to them go through a pull request. Delete the gitclassic-editor-… stack to turn editing off; viewing keeps working.

What GitClassic stores

  • Your email address, your workspaces and who is in them.
  • For each connected AWS account: its number, the role names, your external ID and the RepoPrefix you chose.
  • Repository names and details: region, description and default branch, so the repository list is quick.
  • Commit details: ids, authors, dates and messages. CodeCommit has no way to list a branch's history in one call, so GitClassic keeps these as it reads them to make history pages fast. They're deleted when you disconnect the account.
  • Who has been asked to review which pull request, and your email notification setting.

Never stored: file contents, diffs, pull request comments, issues, or AWS credentials. Code and comments are read from CodeCommit each time and passed straight to your browser.

Issues and boards live in your account. CodeCommit has no issue tracker, so GitClassic keeps issues, their comments, labels and board status in a DynamoDB table that the editor stack creates in your AWS account (gitclassic-issues-…, on-demand, with point-in-time recovery). GitClassic reads and writes it through the editor role, which can use that one table and nothing else in DynamoDB. Deleting the editor stack keeps the table, so turning editing off never loses issues; delete the table yourself to remove them. A typical team's table costs cents a month.

Things we want you to know

  • RepoPrefix doesn't hide names. IAM can't limit a list of repository names by prefix, so the read-only role can see the names of every repository in the account. RepoPrefix does keep everything else (files, commits, pull requests) away from repositories outside it.
  • Sessions could be longer. The role allows sessions of up to an hour; GitClassic asks for 15 minutes.
  • The trust policy names GitClassic's account, not one machine. The role trusts GitClassic's AWS account plus your external ID, the same arrangement other AWS integrations use. Narrowing it to the single role our service runs as is on our list.
  • We're new. GitClassic for CodeCommit launched in October 2026 and hasn't had an independent audit yet. The templates are short on purpose, so you can audit them yourself.

How to revoke access

In the AWS console, open CloudFormation, then Stacks, in region us-east-1. Select the stack named gitclassic-viewer-… (and gitclassic-editor-…, if you added it) and click Delete. Access ends as soon as the role is gone. Disconnecting the account inside GitClassic forgets it on our side and deletes its stored commit details; the role stays until you delete the stack.

The templates

These are the exact files CloudFormation runs, also published at gitclassic-app-templates.s3.us-east-2.amazonaws.com/templates/gitclassic-viewer-v1.yaml and gitclassic-app-templates.s3.us-east-2.amazonaws.com/templates/gitclassic-editor-v2.yaml. A published version never changes. A new permission means a new version, which you choose to apply: your stack keeps the version you deployed until you update it.

gitclassic-viewer.yamlTemplate v1 · Plain text
# GitClassic read-only access to CodeCommit, template v1.
#
# Creates ONE IAM role in your account that GitClassic (AWS account 692859917589)
# can use, for at most an hour at a time, to show your CodeCommit repositories:
# files, branches, commits, diffs and pull requests. Every permission is a read.
# It can't clone a repository (no codecommit:GitPull) or change anything.
#
# - GitClassic never receives access keys. It asks AWS STS for a short-lived session
#   on this role, and only when the request carries your connection's ExternalId.
# - Each session is stamped with the GitClassic user's email (sts:SetSourceIdentity),
#   so every call shows up in your CloudTrail under the person who made it.
# - RepoPrefix limits it to repositories whose names start with that prefix.
# - To revoke access, delete this stack. It takes effect immediately.
#
# Plain-English version: https://gitclassic.com/security

AWSTemplateFormatVersion: '2010-09-09'
Description: >-
  GitClassic read-only access (v1). One IAM role that GitClassic can use to view
  your CodeCommit repositories and pull requests. Delete this stack to revoke access.

Parameters:
  ConnectionId:
    Type: String
    Description: Identifies this connection in GitClassic. Filled in for you.
    AllowedPattern: '[0-9a-f]{8}'
  ExternalId:
    Type: String
    Description: GitClassic must present this value to use the role. Filled in for you.
    AllowedPattern: '[0-9a-f]{32}'
  RepoPrefix:
    Type: String
    Default: ''
    Description: Only repositories whose names start with this. Leave empty for every repository.
    AllowedPattern: '[\w.-]{0,100}'

Resources:
  ViewerRole:
    Type: AWS::IAM::Role
    Properties:
      RoleName: !Sub 'gitclassic-viewer-${ConnectionId}'
      Description: Read-only CodeCommit access for GitClassic (gitclassic.com). Delete the CloudFormation stack to revoke.
      MaxSessionDuration: 3600
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          # GitClassic may use this role only with your ExternalId, and only when the
          # session names the GitClassic user it's for (so CloudTrail always can).
          - Sid: GitClassicWithExternalId
            Effect: Allow
            Principal:
              AWS: 'arn:aws:iam::692859917589:root'
            Action: sts:AssumeRole
            Condition:
              StringEquals:
                sts:ExternalId: !Ref ExternalId
              'Null':
                sts:SourceIdentity: 'false'
          # Lets that session carry the user's email as its source identity. On its
          # own it grants nothing: it only applies within an AssumeRole allowed above.
          - Sid: NameTheUser
            Effect: Allow
            Principal:
              AWS: 'arn:aws:iam::692859917589:root'
            Action: sts:SetSourceIdentity
      Policies:
        - PolicyName: gitclassic-viewer
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              # List your repositories and the regions they could be in
              - Sid: ListRepositories
                Effect: Allow
                Action:
                  - codecommit:ListRepositories
                  - account:ListRegions
                Resource: '*'
              # View repositories and branches
              - Sid: ViewRepositories
                Effect: Allow
                Action:
                  - codecommit:BatchGetRepositories
                  - codecommit:GetRepository
                  - codecommit:ListBranches
                  - codecommit:GetBranch
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Read files and folders
              - Sid: ReadCode
                Effect: Allow
                Action:
                  - codecommit:GetFolder
                  - codecommit:GetFile
                  - codecommit:GetBlob
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Read commits and what changed in them
              - Sid: ReadHistory
                Effect: Allow
                Action:
                  - codecommit:GetCommit
                  - codecommit:BatchGetCommits
                  - codecommit:GetDifferences
                  - codecommit:ListFileCommitHistory
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Read pull requests
              - Sid: ReadPullRequests
                Effect: Allow
                Action:
                  - codecommit:ListPullRequests
                  - codecommit:GetPullRequest
                  - codecommit:DescribePullRequestEvents
                  - codecommit:GetCommentsForPullRequest
                  - codecommit:GetCommentsForComparedCommit
                  - codecommit:GetComment
                  - codecommit:GetCommentReactions
                  - codecommit:GetPullRequestApprovalStates
                  - codecommit:EvaluatePullRequestApprovalRules
                  - codecommit:GetPullRequestOverrideState
                  - codecommit:GetMergeOptions
                  - codecommit:GetMergeConflicts
                  - codecommit:DescribeMergeConflicts
                  - codecommit:BatchDescribeMergeConflicts
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Read repositories encrypted with your own KMS key
              - Sid: DecryptViaCodeCommit
                Effect: Allow
                Action:
                  - kms:Decrypt
                Resource: '*'
                Condition:
                  StringLike:
                    'kms:ViaService': 'codecommit.*.amazonaws.com'
      Tags:
        - Key: gitclassic:connection
          Value: !Ref ConnectionId
        - Key: gitclassic:template-version
          Value: '1'

Outputs:
  RoleArn:
    Description: The role GitClassic uses. GitClassic finds it on its own; nothing to copy.
    Value: !GetAtt ViewerRole.Arn
gitclassic-editor.yamlTemplate v2 · Plain text
# GitClassic editor access to CodeCommit, template v2.
#
# OPTIONAL. Creates a second IAM role, used only when someone on your team makes a
# change in GitClassic: commenting on, approving, merging, opening or closing a
# pull request; editing, adding or deleting a file (one commit at a time);
# creating a branch; or creating a repository. Viewing keeps using the read-only
# role, which this doesn't change.
#
# - Same rules as the read-only role: no access keys, your ExternalId required,
#   at most an hour per session, and every session names the GitClassic user who
#   took the action, so each change shows up in CloudTrail and in CodeCommit under
#   that person.
# - RepoPrefix limits it to repositories whose names start with that prefix
#   (including the names of repositories it creates).
# - ProtectedBranches (comma-separated, e.g. main,release): AWS refuses direct
#   commits to those branches, so changes to them go through a pull request.
#   Merging an approved pull request into them still works.
# - It can't push with git, force-push, rewrite history, delete branches or
#   repositories, rename repositories, or change approval rules, and merges still
#   have to meet your approval rules.
# - Issues and boards live in one DynamoDB table in your account, created here
#   (gitclassic-issues-<ConnectionId>, on-demand, point-in-time recovery on). The
#   role can use only that table. Deleting this stack KEEPS the table and your
#   issues; delete the table yourself if you want them gone.
# - To turn editing off, delete this stack. Viewing keeps working.
#
# Plain-English version: https://gitclassic.com/security#editor

AWSTemplateFormatVersion: '2010-09-09'
Description: >-
  GitClassic editor access (v2). An optional role that lets GitClassic work on pull
  requests, commit edits made in its editor, create branches and repositories, and keep issues and
  boards in a DynamoDB table in this account, when a user asks. Delete this stack to turn editing off
  (the issues table is kept).

Parameters:
  ConnectionId:
    Type: String
    Description: Identifies this connection in GitClassic. Filled in for you.
    AllowedPattern: '[0-9a-f]{8}'
  ExternalId:
    Type: String
    Description: GitClassic must present this value to use the role. Filled in for you.
    AllowedPattern: '[0-9a-f]{32}'
  RepoPrefix:
    Type: String
    Default: ''
    Description: Only repositories whose names start with this. Leave empty for every repository.
    AllowedPattern: '[\w.-]{0,100}'
  ProtectedBranches:
    Type: String
    Default: ''
    Description: Branches that only change through pull requests (comma-separated, e.g. main,release). Leave empty to allow direct commits everywhere.
    AllowedPattern: '(|[\w./-]+(,[\w./-]+)*)'
  CreateIssuesTable:
    Type: String
    Default: 'true'
    AllowedValues: ['true', 'false']
    Description: "'false' only when the issues table from an earlier editor stack is still in this account (GitClassic fills this in)."

Conditions:
  HasProtectedBranches: !Not [!Equals [!Ref ProtectedBranches, '']]
  CreatesIssuesTable: !Equals [!Ref CreateIssuesTable, 'true']

Resources:
  EditorRole:
    Type: AWS::IAM::Role
    Properties:
      RoleName: !Sub 'gitclassic-editor-${ConnectionId}'
      Description: Editing for GitClassic (gitclassic.com). Delete the CloudFormation stack to turn it off.
      MaxSessionDuration: 3600
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          # GitClassic may use this role only with your ExternalId, and only when the
          # session names the GitClassic user it's for (so CloudTrail always can).
          - Sid: GitClassicWithExternalId
            Effect: Allow
            Principal:
              AWS: 'arn:aws:iam::692859917589:root'
            Action: sts:AssumeRole
            Condition:
              StringEquals:
                sts:ExternalId: !Ref ExternalId
              'Null':
                sts:SourceIdentity: 'false'
          # Lets that session carry the user's email as its source identity. On its
          # own it grants nothing: it only applies within an AssumeRole allowed above.
          - Sid: NameTheUser
            Effect: Allow
            Principal:
              AWS: 'arn:aws:iam::692859917589:root'
            Action: sts:SetSourceIdentity
      Policies:
        - PolicyName: gitclassic-editor
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              # Comment on pull requests
              - Sid: CommentOnPullRequests
                Effect: Allow
                Action:
                  - codecommit:PostCommentForPullRequest
                  - codecommit:PostCommentReply
                  - codecommit:PostCommentForComparedCommit
                  - codecommit:UpdateComment
                  - codecommit:DeleteCommentContent
                  - codecommit:PutCommentReaction
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Approve pull requests
              - Sid: ApprovePullRequests
                Effect: Allow
                Action:
                  - codecommit:UpdatePullRequestApprovalState
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Merge pull requests
              - Sid: MergePullRequests
                Effect: Allow
                Action:
                  - codecommit:MergePullRequestByFastForward
                  - codecommit:MergePullRequestBySquash
                  - codecommit:MergePullRequestByThreeWay
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Open, close and edit pull requests
              - Sid: ManagePullRequests
                Effect: Allow
                Action:
                  - codecommit:CreatePullRequest
                  - codecommit:UpdatePullRequestStatus
                  - codecommit:UpdatePullRequestTitle
                  - codecommit:UpdatePullRequestDescription
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Commit changes made in GitClassic
              - Sid: CommitChanges
                Effect: Allow
                Action:
                  - codecommit:PutFile
                  - codecommit:CreateCommit
                  - codecommit:DeleteFile
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Create branches
              - Sid: CreateBranches
                Effect: Allow
                Action:
                  - codecommit:CreateBranch
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Create repositories
              - Sid: CreateRepositories
                Effect: Allow
                Action:
                  - codecommit:CreateRepository
                  - codecommit:UpdateRepositoryDescription
                  - codecommit:UpdateDefaultBranch
                Resource: !Sub 'arn:aws:codecommit:*:${AWS::AccountId}:${RepoPrefix}*'
              # Keep your issues and boards
              - Sid: IssuesAndBoards
                Effect: Allow
                Action:
                  - dynamodb:GetItem
                  - dynamodb:BatchGetItem
                  - dynamodb:Query
                  - dynamodb:PutItem
                  - dynamodb:UpdateItem
                  - dynamodb:DeleteItem
                  - dynamodb:DescribeTable
                Resource:
                  - !Sub 'arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/gitclassic-issues-${ConnectionId}'
                  - !Sub 'arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/gitclassic-issues-${ConnectionId}/index/*'
              # Write to repositories encrypted with your own KMS key
              - Sid: UseKeyViaCodeCommit
                Effect: Allow
                Action:
                  - kms:Decrypt
                  - kms:Encrypt
                  - kms:GenerateDataKey
                Resource: '*'
                Condition:
                  StringLike:
                    'kms:ViaService': 'codecommit.*.amazonaws.com'
      Tags:
        - Key: gitclassic:connection
          Value: !Ref ConnectionId
        - Key: gitclassic:template-version
          Value: '2'

  # Issues, comments and board status. Kept when this stack is deleted (Retain), so
  # turning editing off never loses issues; point-in-time recovery covers mistakes.
  IssuesTable:
    Type: AWS::DynamoDB::Table
    Condition: CreatesIssuesTable
    DeletionPolicy: Retain
    UpdateReplacePolicy: Retain
    Properties:
      TableName: !Sub 'gitclassic-issues-${ConnectionId}'
      BillingMode: PAY_PER_REQUEST
      AttributeDefinitions:
        - AttributeName: PK
          AttributeType: S
        - AttributeName: SK
          AttributeType: S
        - AttributeName: GSI1PK
          AttributeType: S
        - AttributeName: GSI1SK
          AttributeType: S
      KeySchema:
        - AttributeName: PK
          KeyType: HASH
        - AttributeName: SK
          KeyType: RANGE
      GlobalSecondaryIndexes:
        - IndexName: GSI1
          KeySchema:
            - AttributeName: GSI1PK
              KeyType: HASH
            - AttributeName: GSI1SK
              KeyType: RANGE
          Projection:
            ProjectionType: ALL
      PointInTimeRecoverySpecification:
        PointInTimeRecoveryEnabled: true
      Tags:
        - Key: gitclassic:connection
          Value: !Ref ConnectionId

  # Only while ProtectedBranches is set: no direct commits to those branches.
  # An explicit Deny overrides the Allow above.
  ProtectedBranchesPolicy:
    Type: AWS::IAM::RolePolicy
    Condition: HasProtectedBranches
    Properties:
      RoleName: !Ref EditorRole
      PolicyName: gitclassic-editor-protected-branches
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Sid: NoDirectCommitsToProtectedBranches
            Effect: Deny
            Action:
              - codecommit:PutFile
              - codecommit:CreateCommit
              - codecommit:DeleteFile
            Resource: '*'
            Condition:
              StringEqualsIfExists:
                'codecommit:References': !Split
                  - ','
                  - !Sub
                    - 'refs/heads/${Joined}'
                    - Joined: !Join [',refs/heads/', !Split [',', !Ref ProtectedBranches]]
              'Null':
                'codecommit:References': 'false'

Outputs:
  RoleArn:
    Description: The role GitClassic uses for changes. GitClassic finds it on its own; nothing to copy.
    Value: !GetAtt EditorRole.Arn