Check ID: secretsmanager_has_restrictive_resource_policy
Provider: AWS
Service: secretsmanager
Severity: HIGH
Categories: secrets, trust-boundaries
Resource type: AwsSecretsManagerSecret

What this check verifies

Secrets Manager secrets are evaluated for restrictive resource-based policies: explicit Deny for unauthorized principals, Organization boundary via PrincipalOrgID, 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 StringNotEquals on aws:PrincipalArn
  • Deny access from outside the AWS Organization via aws:PrincipalOrgID
  • Constrain AWS service access with aws:SourceAccount (additional restrictive conditions like ArnLike are accepted)
  • Optionally, restrict each authorized principal to least-privilege actions using per-principal Deny/NotAction statements (defense-in-depth)

Remediation

aws secretsmanager put-resource-policy —secret-id <example_resource_id> —resource-policy file://policy.json

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check 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