Back to controls

Service Identities attached to publicly accessible workloads

Service identities attached to public-facing workloads increase blast radius.

Category

Controls

Medium

Applies to

Alibaba CloudAWSGoogle CloudMicrosoft Azure

Coverage

3 queries

Asset types

3 covered

Overview

Service identities attached to public-facing workloads increase blast radius.

What this control checks

Identities attached to workloads that are reachable from the public internet.

Why this matters

If a public workload is compromised, over-privileged service identities can accelerate account-wide compromise.

Remediation guidance

Remediation strategy

  1. Remove unnecessary public exposure from workloads.
  2. Replace broad identity permissions with least privilege.
  3. Use dedicated identities per workload.

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/active-directory/managed-identities-azure-resources/overview

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.

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 used by public workloads

Connectors

Alibaba CloudAWS

Covered asset types

IAMRole

Expected check: eq []

{
  iamRoles(
    where: {
      OR: [
        {
          vms_SOME: {
            NOT: { publicIpAddress: null }
            networkInterfaces_SOME: {
              securityGroups_SOME: {
                rules_SOME: {
                  direction: "Inbound"
                  action: "Allow"
                  OR: [
                    { sources_INCLUDES: "cidr:0.0.0.0/0" }
                    { sources_INCLUDES: "cidr:::/0" }
                  ]
                }
              }
            }
          }
        }
        { functions_SOME: { NOT: { functionURL: "" }, authType: "NONE" } }
      ]
    }
  ) {
    ...AssetFragment
  }
}
Google Cloud Service Accounts used by public workloads

Connectors

Google Cloud

Covered asset types

IAMServiceAccount

Expected check: eq []

{
  iamServiceAccounts(
    where: {
      OR: [
        {
          vms_SOME: {
            networkInterfaces_SOME: {
              hasNetworkInterfaceAccessConfig_NOT: null
            }
            firewalls_SOME: {
              rules_SOME: {
                direction: "Inbound"
                OR: [
                  { sources_INCLUDES: "cidr:0.0.0.0/0" }
                  { sources_INCLUDES: "cidr:::/0" }
                ]
              }
            }
          }
        }
      ]
    }
  ) {
    ...AssetFragment
  }
}
Managed Identities used by publicly accessible workloads

Connectors

Microsoft Azure

Covered asset types

ManagedIdentity

Expected check: eq []

{
  managedIdentities(
    where: {
      OR: [
        {
          vms_SOME: {
            networkInterfaces_SOME: {
              publicIp_NOT: null
              securityGroups_SOME: {
                rules_SOME: {
                  direction: "Inbound"
                  action: "Allow"
                  OR: [
                    { sources_INCLUDES: "cidr:0.0.0.0/0" }
                    { sources_INCLUDES: "cidr:::/0" }
                    { sources_INCLUDES: "tag:Internet" }
                    { sources: [] }
                  ]
                }
              }
            }
          }
        }
        {
          functions_SOME: {
            bindings_SOME: { direction: "in", type: "httpTrigger" }
          }
        }
        { appServices_SOME: { authSettings: { NOT: { enabled: true } } } }
      ]
    }
  ) {
    ...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