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

AWS CodeBuild project environment privileged mode is enabled misconfiguration detected in code

Rule Details

Cortex AppSec Rule ID

APPSEC_AWS_316

Category - Subcategory

Compute - Default Credentials Or Auth

Provider

AWS

Severity

MEDIUM

Framework

Terraform, Terraform Plan

Mapped CSPM/KSPM Rule

a773b6a4-69d3-427e-98b6-0ca45290c829

Impact

This rule is checking to make sure that the environments within AWS CodeBuild project do not have privileged mode enabled. Having privileged mode enabled can be a significant risk as it provides enhanced permissions that could potentially be misused or exploited. This could lead to unauthorized access or changes within the environment, which might cause damage or loss of data. Therefore, it is critical to maintain only the necessary permissions and avoid enabling privileged mode, as this can potentially breach secure practices.

How to Fix

Resource: aws_codebuild_project

  • Arguments: environment.privileged_mode

To fix this issue, you need to ensure that the privileged mode is not enabled in the CodeBuild project environment configuration.

The above code sets the privileged_mode attribute of the aws_codebuild_project's environment block to false. This means the CodeBuild project will not run in privileged mode, mitigating the potential security risks associated with elevated privileges such as unauthorized system alterations or data breaches. [source,go]

resource "aws_codebuild_project" "example" { environment { privileged_mode = false } }

Last updated

Was this helpful?