For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex CloudApplication Security

AWS S3 Bucket BlockPublicPolicy is not set to True misconfiguration detected in code

Rule Details

Cortex AppSec Rule ID

APPSEC_AWS_54

Category - Subcategory

Storage - Permissions

Provider

AWS

Severity

MEDIUM

Framework

CloudFormation, Serverless, Terraform, Terraform Plan

Impact

This rule ensures that Amazon S3 buckets have the block public policy setting enabled. Enabling this setting ensures that public bucket policies cannot be set, which helps prevent unauthorized access to the data stored in the S3 bucket. This rule checks whether the BlockPublicPolicy option is enabled in the PublicAccessBlockConfiguration of S3 buckets.

How to Fix

To fix this issue, ensure that the BlockPublicPolicy property in the PublicAccessBlockConfiguration of the AWS::S3::Bucket resource is set to true.

Example: [source,go]

Resources: MyS3Bucket: Type: AWS::S3::Bucket Properties: BucketName: example-bucket PublicAccessBlockConfiguration:

  • BlockPublicPolicy: true ...


Last updated

Was this helpful?