Check ID:
Provider: AWS
Service:
Severity: CRITICAL
Categories:
Resource type:
stepfunctions_statemachine_no_secrets_in_definitionProvider: AWS
Service:
stepfunctionsSeverity: CRITICAL
Categories:
secretsResource type:
AwsStepFunctionStateMachineWhat this check verifies
AWS Step Functions state machines are inspected for hardcoded secrets (keys, tokens, passwords) embedded directly in the state machine definition (Amazon States Language JSON). Such values indicate sensitive data is stored directly in task parameters instead of being sourced securely.Risk
Plaintext secrets in state machine definitions reduce confidentiality: values can be viewed in the AWS Console, CLI, and may leak into execution logs or public outputs. Compromised credentials enable unauthorized AWS actions, lateral movement, and data exfiltration.Recommendation
Store secrets outside the state machine definition and retrieve them securely at runtime using AWS Secrets Manager or AWS Systems Manager Parameter Store.- Use the
aws-sdk:secretsmanager:getSecretValueintegration to fetch secrets dynamically - Enforce least privilege on the state machine IAM role
- Rotate secrets regularly and never embed them in the definition
Remediation
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html
- https://docs.aws.amazon.com/step-functions/latest/dg/security-best-practices.html
- https://docs.aws.amazon.com/secretsmanager/latest/userguide/integrating_how-services-use-secrets_step-functions.html
- https://docs.aws.amazon.com/systems-manager/latest/userguide/integration-ps-secretsmanager.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = stepfunctions_statemachine_no_secrets_in_definition. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks