Check ID:
Provider: AWS
Service:
Severity: CRITICAL
Categories:
Resource type:
cloudformation_stack_outputs_find_secretsProvider: AWS
Service:
cloudformationSeverity: CRITICAL
Categories:
secretsResource type:
AwsCloudFormationStackWhat this check verifies
CloudFormation stack Outputs are analyzed for hardcoded secrets-passwords, API keys, tokens-using pattern-based detection across output values. A finding indicates potential secret strings present withinOutputs of the template or stack.
Risk
Secrets in Outputs are readable to anyone with stack metadata access, enabling credential theft, unauthorized API calls, and lateral movement. Exposure via consoles, exports, or CI logs undermines confidentiality and can lead to privilege escalation and data exfiltration.Recommendation
Remove secrets fromOutputs. Store credentials in Secrets Manager or Parameter Store and reference them via dynamic references; set NoEcho for sensitive parameters. Apply least privilege to view stack metadata, avoid exporting sensitive values, and add automated IaC secret scanning for defense in depth.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws cloudformation update-stack —stack-name <STACK_NAME> —template-body file://<TEMPLATE_WITHOUT_SENSITIVE_OUTPUTS>.yaml
References
- https://docs.aws.amazon.com/secretsmanager/latest/userguide/best-practices.html
- https://support.icompaas.com/support/solutions/articles/62000127093-ensure-no-secrets-are-found-in-cloudformation-outputs
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.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 = cloudformation_stack_outputs_find_secrets. 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