Back to controls

Service Identities With Access to Everything

### Overview

Category

Controls

Medium

Applies to

Alibaba CloudAWSGoogle CloudKubernetesMicrosoft Azure

Coverage

4 queries

Asset types

4 covered

Overview

Overview

Service identities with permissions to access every resource in the given environment. It is almost never the case that an identity used by a workload requires access to everything.

Remediation guidance

Remediation strategy

Reduce service identity permissions to minimum required.

AWS

aws iam detach-role-policy --role-name <role-name> --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
aws iam attach-role-policy --role-name <role-name> --policy-arn arn:aws:iam::<account-id>:policy/<least-privilege-policy>

GCP

gcloud projects remove-iam-policy-binding <project-id> --member="serviceAccount:<sa>@<project-id>.iam.gserviceaccount.com" --role="roles/editor"

Azure

az role assignment delete --assignee <principal-id> --role Owner --scope /subscriptions/<sub-id>

References

  • https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
  • https://cloud.google.com/iam/docs/using-iam-securely
  • https://learn.microsoft.com/en-us/azure/role-based-access-control/best-practices

Service-wide remediation

Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.

AWS

Use AWS Organizations guardrails, AWS Config rules or conformance packs where they fit, approved account baselines, and IaC modules so new resources inherit the secure setting.

Alibaba Cloud

Use Resource Directory guardrails, account baselines, and IaC modules so the secure setting is applied consistently across environments.

Google Cloud

Use organization or folder policies where available, shared project templates, logs and alerting baselines, and IaC modules so new resources inherit the secure setting.

Kubernetes

Use admission policies, baseline cluster configuration, GitOps templates, and namespace or workload guardrails so new deployments follow the control by default.

Azure

Use management group or subscription Azure Policy assignments, remediation tasks where supported, landing-zone standards, and IaC modules so drift is prevented at scale.

Operational rollout

  1. Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
  2. Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
  3. Re-scan and track approved exceptions with an owner and expiry date.

Query logic

These are the stored checks tied to this control.

AWS/Alibaba roles granting access to everything

Connectors

Alibaba CloudAWS

Covered asset types

IAMRole

Expected check: eq []

{
  iamRoles(
    where: {
      cloudProvider_IN: ["alibaba", "aws"]
      iamPolicies_SOME: {
        iamPolicyStatements_SOME: {
          actions_INCLUDES: "*"
          resources_INCLUDES: "*"
        }
      }
    }
  ) {
    ...AssetFragment
  }
}
Google Cloud Service Accounts with access to everything

Connectors

Google Cloud

Covered asset types

IAMServiceAccount

Expected check: eq []

{
  iamServiceAccounts(
    where: { hasIAMRole_SOME: { name_IN: ["roles/owner", "roles/editor"] } }
  ) {
    ...AssetFragment
  }
}
K8s Service Accounts granting access to everything

Connectors

Kubernetes

Covered asset types

ServiceAccount

Expected check: eq []

{
  serviceAccounts(
    where: {
      OR: [
        {
          podIdentityAssociations_SOME: {
            role: {
              iamPolicies_SOME: {
                iamPolicyStatements_SOME: {
                  actions_INCLUDES: "*"
                  resources_INCLUDES: "*"
                }
              }
            }
          }
        }
        {
          annotations_SOME: {
            awsRole: {
              iamPolicies_SOME: {
                iamPolicyStatements_SOME: {
                  actions_INCLUDES: "*"
                  resources_INCLUDES: "*"
                }
              }
            }
          }
        }
      ]
    }
  ) {
    ...AssetFragment
  }
}
Azure Managed Identities with access to everything

Connectors

Microsoft Azure

Covered asset types

ManagedIdentity

Expected check: eq []

{
  managedIdentities(
    where: {
      servicePrincipals_SOME: { roles_SOME: { permissions_INCLUDES: "*" } }
    }
  ) {
    ...AssetFragment
  }
}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon