You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request - Warn when AWS::Lambda::Permission.SouceAccount is missing
When setting a Lamba permission using the AWS::Lambda::Permission resource, if (and I believe only if) the SourceArn is an S3 Arn, it is almost always appropriate to specify a SourceAccount in addition to the SourceArn, since S3 Arns do not specify an account id.
I'm not sure how feasible it is, given that you would presumably need to be able to at least partially resolve whatever value / intrinsic are specified for SourceArn, but it would be useful if a warning could be raised when the SourceArn will resolve to an S3 Arn, but SourceAccount is missing.
If a SourceAccount is missing there are potential security issues with the deployed resources, especially if wildcards have been used in the SourceArn, and Security Hub will flag the permission as a Critical security issue.
The CloudFormation Docs say the following about SourceAccount:
For Amazon S3, the ID of the account that owns the resource. Use this together with SourceArn to ensure that the resource is owned by the specified account. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.
The text was updated successfully, but these errors were encountered:
cfn-lint version: (
cfn-lint --version
)Feature Request - Warn when AWS::Lambda::Permission.SouceAccount is missing
When setting a Lamba permission using the AWS::Lambda::Permission resource, if (and I believe only if) the SourceArn is an S3 Arn, it is almost always appropriate to specify a SourceAccount in addition to the SourceArn, since S3 Arns do not specify an account id.
I'm not sure how feasible it is, given that you would presumably need to be able to at least partially resolve whatever value / intrinsic are specified for SourceArn, but it would be useful if a warning could be raised when the SourceArn will resolve to an S3 Arn, but SourceAccount is missing.
If a SourceAccount is missing there are potential security issues with the deployed resources, especially if wildcards have been used in the SourceArn, and Security Hub will flag the permission as a Critical security issue.
The CloudFormation Docs say the following about SourceAccount:
The text was updated successfully, but these errors were encountered: