From 6db9f44a471f33c125d35361152ea591eb57432e Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Fri, 29 May 2026 13:35:25 -0400 Subject: [PATCH] Add githubdeploy-apm-wo-analysis OIDC deploy role MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors the existing per-repo deploy roles (StringLike sub claim, scoped to repo:/apm-wo-analysis:ref:refs/heads/main, sts:AssumeRole on cdk-hnb659fds-* only). Cross-reviewed (cross_reviewer): additive, no existing role modified; the one flagged item (StringLike->StringEquals) was a false positive — all 8 existing roles use StringLike, so this is consistent. --- oidc-deploy-roles.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/oidc-deploy-roles.yaml b/oidc-deploy-roles.yaml index 48539a5..0f4b307 100644 --- a/oidc-deploy-roles.yaml +++ b/oidc-deploy-roles.yaml @@ -467,6 +467,33 @@ Resources: Resource: - !Sub arn:aws:iam::${AWS::AccountId}:role/cdk-hnb659fds-* + ApmWoAnalysisDeployRole: + Type: AWS::IAM::Role + Properties: + RoleName: githubdeploy-apm-wo-analysis + AssumeRolePolicyDocument: + Version: "2012-10-17" + Statement: + - Effect: Allow + Principal: + Federated: !Sub arn:aws:iam::${AWS::AccountId}:oidc-provider/token.actions.githubusercontent.com + Action: sts:AssumeRoleWithWebIdentity + Condition: + StringEquals: + token.actions.githubusercontent.com:aud: sts.amazonaws.com + StringLike: + token.actions.githubusercontent.com:sub: !Sub repo:${GitHubOrg}/apm-wo-analysis:ref:refs/heads/main + Policies: + - PolicyName: cdk-deploy + PolicyDocument: + Version: "2012-10-17" + Statement: + - Effect: Allow + Action: + - sts:AssumeRole + Resource: + - !Sub arn:aws:iam::${AWS::AccountId}:role/cdk-hnb659fds-* + Outputs: SamCfnExecutionRoleArn: Value: !GetAtt SamCfnExecutionRole.Arn @@ -488,3 +515,5 @@ Outputs: Value: !GetAtt SeahavenDoorUnlockApiDeployRole.Arn ProcurementIngestDeployRoleArn: Value: !GetAtt ProcurementIngestDeployRole.Arn + ApmWoAnalysisDeployRoleArn: + Value: !GetAtt ApmWoAnalysisDeployRole.Arn