@@ -709,6 +709,57 @@ resource "aws_iam_policy" "kinesis_management" {
709709 tags = merge (local. tags , { Name = " kinesis-management" })
710710}
711711
712+ resource "aws_iam_policy" "code_signing_management" {
713+ name = " code-signing-management"
714+ description = " Allow GitHub Actions to manage Lambda code signing and start Signer jobs"
715+ path = " /service-policies/"
716+
717+ policy = jsonencode ({
718+ Version = " 2012-10-17" ,
719+ Statement = [
720+ {
721+ Sid = " LambdaCodeSigningConfigManagement" ,
722+ Effect = " Allow" ,
723+ Action = [
724+ " lambda:CreateCodeSigningConfig" ,
725+ " lambda:UpdateCodeSigningConfig" ,
726+ " lambda:DeleteCodeSigningConfig" ,
727+ " lambda:GetCodeSigningConfig" ,
728+ " lambda:ListCodeSigningConfigs" ,
729+ " lambda:GetFunctionCodeSigningConfig"
730+ ],
731+ Resource = " *"
732+ },
733+ {
734+ Sid = " SignerJobUsage" ,
735+ Effect = " Allow" ,
736+ Action = [
737+ " signer:StartSigningJob" ,
738+ " signer:DescribeSigningJob"
739+ ],
740+ Resource = " *"
741+ },
742+ {
743+ Sid = " SignerProfileManagement" ,
744+ Effect = " Allow" ,
745+ Action = [
746+ " signer:PutSigningProfile" ,
747+ " signer:GetSigningProfile" ,
748+ " signer:ListSigningProfiles" ,
749+ " signer:ListTagsForResource" ,
750+ " signer:TagResource" ,
751+ " signer:UntagResource" ,
752+ " signer:CancelSigningProfile" ,
753+ " signer:RevokeSignature"
754+ ],
755+ Resource = " *"
756+ }
757+ ]
758+ })
759+
760+ tags = merge (local. tags , { Name = " code-signing-management" })
761+ }
762+
712763resource "aws_iam_policy" "cloudwatch_management" {
713764 # checkov:skip=CKV_AWS_355: GetMetricWidgetImage requires wildcard resource
714765 # checkov:skip=CKV_AWS_290: GetMetricWidgetImage requires wildcard resource
@@ -828,3 +879,8 @@ resource "aws_iam_role_policy_attachment" "kinesis_management_attach" {
828879 role = aws_iam_role. github_actions . name
829880 policy_arn = aws_iam_policy. kinesis_management . arn
830881}
882+
883+ resource "aws_iam_role_policy_attachment" "code_signing_management" {
884+ role = aws_iam_role. github_actions . name
885+ policy_arn = aws_iam_policy. code_signing_management . arn
886+ }
0 commit comments