Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
secretsmanager_has_restrictive_resource_policyProvider: AWS
Service:
secretsmanagerSeverity: HIGH
Categories:
secrets, trust-boundariesResource type:
AwsSecretsManagerSecretWhat this check verifies
Secrets Manager secrets are evaluated for restrictive resource-based policies: explicit Deny for unauthorized principals, Organization boundary viaPrincipalOrgID, aws:SourceAccount for service access. Per-principal NotAction restrictions are optional (defense-in-depth). Regionalized service principals are supported.
Risk
Without a restrictive resource policy, any IAM principal in the account—or even cross-account entities—can read, modify, or delete the secret, compromising confidentiality and integrity. Overly broad policies enable lateral movement and privilege escalation through exposed credentials.Recommendation
Apply deny-by-default resource policies to every secret:- Deny all principals except explicitly authorized roles via
StringNotEqualsonaws:PrincipalArn - Deny access from outside the AWS Organization via
aws:PrincipalOrgID - Constrain AWS service access with
aws:SourceAccount(additional restrictive conditions likeArnLikeare accepted) - Optionally, restrict each authorized principal to least-privilege actions using per-principal
Deny/NotActionstatements (defense-in-depth)
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws secretsmanager put-resource-policy —secret-id <example_resource_id> —resource-policy file://policy.json
References
- https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-policies.html
- https://docs.aws.amazon.com/secretsmanager/latest/userguide/determine-acccess_examine-iam-policies.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 = secretsmanager_has_restrictive_resource_policy. 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