Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
ssm_document_secretsProvider: AWS
Service:
ssmSeverity: HIGH
Categories:
secretsResource type:
AwsSsmPatchComplianceWhat this check verifies
AWS Systems Manager documents are inspected for embedded secrets within their content. Patterns resembling passwords, access keys, tokens, or private keys in document steps are flagged when values appear hardcoded rather than referenced securely.Risk
Hardcoded secrets in SSM documents weaken CIA:- Confidentiality: readers of the document can exfiltrate credentials.
- Integrity: stolen keys enable privilege escalation and automation tampering.
- Availability: abused credentials can disrupt systems and impede recovery.
Recommendation
Avoid embedding secrets. Store them in Secrets Manager or Parameter Store asSecureString (KMS-encrypted) and reference at runtime.
Apply least privilege to documents and secrets, prefer short-lived role credentials, rotate credentials, continuously scan/audit documents, and enforce separation of duties for authoring and approval.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws ssm update-document —name <example_resource_name> —content file://<SANITIZED_DOCUMENT_FILE>.json
References
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = ssm_document_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