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

State machine does not have X-ray tracing enabled misconfiguration detected in code

Rule Details

Cortex AppSec Rule ID

APPSEC_AWS_284

Category - Subcategory

Logging - Disabled or missing

Provider

AWS

Severity

LOW

Framework

Terraform, Terraform Plan

Impact

This rule is checking to make sure that X-Ray tracing is enabled for the State Machine in Amazon Web Services (AWS). X-Ray tracing provides insight into the behavior of your applications. By enabling this feature, you can analyze your applications' performance and troubleshoot issues that could potentially affect the user experience. If X-Ray tracing is not enabled, you may lack the necessary visibility into your applications' operations, which could make it difficult to identify and resolve issues quickly and effectively. This could potentially lead to prolonged downtimes and may negatively impact your service's reliability and your users' satisfaction.

How to Fix

Resource: aws_sfn_state_machine

  • Arguments: tracing_configuration.enabled

To fix the issue, you need to enable X-Ray tracing for your State Machine. You can do this by setting the tracing_configuration block in your AWS Step Function (State Machine) resource to enabled = true.

The fixed code would look like this:

The above code is secure because it enables X-Ray tracing for the State Machine. This allows you to trace the execution of the State Machine, which is important for debugging and latency analysis. It also helps in identifying performance bottlenecks, which can be critical in optimizing your application. [source,go]

resource "aws_sfn_state_machine" "sfn_state_machine" { name = "sfn_state_machine" role_arn = aws_iam_role.role.arn

definition = <<EOF { /* Step Function definition */ } EOF tracing_configuration { enabled = true } }

Last updated

Was this helpful?