Published
“Read-only” says what a role cannot change. It says less about what the role can read. For a Cloud Control Scan, a client creates our discovery role in its own AWS account from a CloudFormation template we publish. Its policy names, in a comment before its first statement, the reads its denies leave open.
Who can use it
The trust policy has one statement and one principal: the Vishcore principal ARN the client enters as a parameter. As published, the trust policy permits the configured principal only when it supplies the engagement’s External ID. The External ID must be at least 16 characters, and CloudFormation masks it wherever it shows the stack’s parameters.
What the denies cover
The policy has two deny statements, and in IAM an explicit deny always wins over an allow.
- Secret values. The first statement names the five main calls that
return secret values from Secrets Manager and SSM Parameter Store, parameter
history included. Other reads that can return those values, such as
secretsmanager:BatchGetSecretValue, are refused because no allow names them; that one also needssecretsmanager:GetSecretValueon each secret, which the statement denies. - Reads that can return environment values. The same statement denies
lambda:ListFunctions,lambda:GetFunctionConfiguration, andecs:DescribeTaskDefinition, which can return environment values, andecs:ListTaskDefinitions, which returns only task-definition ARNs and is the first step of that path. It also deniesconfig:SelectResourceConfigandsecurityhub:GetFindings: AWS Config advanced queries and Security Hub findings can return that same recorded configuration. IAM cannot narrow these reads to leave that content out, so the template denies them all. - API keys. API Gateway has one IAM action for every management read,
apigateway:GET, so the template scopes it by resource path. The second statement denies it on the API key and usage-plan key paths. No allow grants those paths today either.
Three boundaries come from what no allow grants, not from a deny. No allow
names a write, so IAM refuses every write by default, such as s3:PutObject,
ec2:TerminateInstances, and iam:PassRole, and the scanner refuses mutating
calls before they are made. Nothing allows data-plane reads, so S3 objects,
table items, and log events fall to an implicit deny. And nothing grants KMS
decrypt or key-material access. As our site puts it: “The client-owned role
explicitly denies Secrets Manager secret values and SSM parameter values, and
it grants no KMS decrypt or key-material access.”
The denies have a cost. Scanner tests that need these reads, such as the Lambda environment KMS key test and the Security Hub failed-finding test, report “Not tested: read-only boundary” under this role.
The policy’s comment also says why no statement covers writes. Until
2026-10-25 the template carried a statement meant to deny every write verb,
with actions such as *:Create*. IAM rejects an action whose service prefix
is a wildcard, so the template could not be deployed. It now grants named
reads only.
What the allows grant
The role allows 172 actions by default. Two statements name 171 read calls
one by one, with no wildcards: 46 account-wide and 125 regional. All but one are
Describe, Get, or List calls; that one is the read-only
inspector2:BatchGetAccountStatus. The last is apigateway:GET, on six paths
only: the two API lists and each API’s stages and authorizers. The regional
reads and the API Gateway reads work only in the Regions the client lists in
ApprovedRegions, through the aws:RequestedRegion condition.
Seven more reads sit in a second managed policy. The stack creates and
attaches it only when EnableUserWrittenTextReads is true; its default is
false. That policy holds one account-wide read and six regional reads under
the same ApprovedRegions condition. The scanner keeps only booleans and
numbered aliases from those responses, never the user-written text.
Leave the parameter false and the scan reports the Auto Scaling launch setting, Step Functions logging and tracing, Route 53 dangling record, and SES DKIM controls as blocked, as the parameter’s Description says.
The main and opt-in allow statements together name exactly the actions in our scanner allowlist’s default set, and a test in the scanner’s codebase fails if they differ. IAM refuses any call neither policy names.
What it can still reveal
The policy’s comment has eighteen entries, each covering one or more allowed
reads that return more than the scanner keeps. Four entries name reads
granted only when EnableUserWrittenTextReads is true:
cloudfront:GetDistributionConfigandcloudfront:ListDistributionsreturn origin custom header values, which are often shared secrets between CloudFront and the origin. AWS has no CloudFront read that leaves them out. The scanner keeps aliases and booleans.apigateway:GETon stage collections returns stage variables. The scanner keeps logging and tracing booleans.inspector2:ListFindingsreturns finding metadata, such as resource identifiers and package and CVE names, with no environment or secret fields. The scanner keeps severity counts and age buckets.eks:DescribeNodegroupreturns node group labels and taints, andeks:DescribeAddonreturns add-on configuration values: both are text the client’s team writes. The scanner keeps per-node-group and per-cluster booleans.- Opt-in only:
ec2:DescribeLaunchTemplateVersionsandautoscaling:DescribeLaunchConfigurationsreturn UserData, which can hold secrets. The scanner never reads it and keeps per-Auto-Scaling-group booleans (IMDSv2, public IP, volume encryption). kms:GetKeyPolicyandsecretsmanager:GetResourcePolicyreturn policy documents. The scanner keeps one boolean per key or secret: that no unconditioned wildcard principal is named.secretsmanager:ListSecretsreturns secret names, tags, and the rotation function ARN, never a secret value. The scanner keeps per-secret booleans.iam:ListRoles,iam:GetRole, andiam:GetRolePolicyreturn role trust policy documents, descriptions, tags, and inline policy documents. The scanner reduces them in memory to per-role booleans and a whole-day last-used age, and stores no document.ec2:DescribeVpcEndpointsreturns each endpoint’s policy document. The scanner keeps one boolean per endpoint.bedrock:ListGuardrailsreturns guardrail names and descriptions. The scanner keeps a guardrail count.events:ListTargetsByRulereturns rule targets with their Input, InputPath, InputTransformer, and HttpParameters values, which can hold secrets. The scanner keeps one boolean per rule.guardduty:GetDetectorreturns detector settings and tags. The scanner keeps detector enablement and five protection-plan booleans only.- Opt-in only:
states:DescribeStateMachinereturns the state machine definition, which can embed parameters and headers. The scanner reads its logging and tracing blocks and keeps two booleans per state machine. - The tag reads (each
ListTagsForResourcecall,s3:GetBucketTagging, anddynamodb:ListTagsOfResource) return tag values. The scanner keeps tag key names. logs:DescribeMetricFiltersreturns user-written patterns. The scanner keeps only fixed event-class coverage booleans, never log events.- Opt-in only:
route53:ListResourceRecordSetsreturns record values, including TXT. The scanner compares only A/CNAME/alias targets in memory and keeps aliases. ssm:ListDocumentsandDescribeInstancePatchStates,wafv2:ListWebACLsandGetLoggingConfiguration,ses:GetConfigurationSet,iam:ListVirtualMFADevices, andec2:DescribeAddressescan return user-authored metadata or tags. The scanner discards these fields and reads no document body, MFA seed or QR field.- Opt-in only:
ses:ListIdentities,ses:GetIdentityVerificationAttributes, andses:GetIdentityDkimAttributesreturn domains/emails, verification status, and public DNS tokens. The scanner keeps only the verification and DKIM booleans.
It drops the rest before anything is stored.
The comment opens with “Residual read exposure the denies do not remove, disclosed on purpose”. For these reads, IAM is not the limit: what the scanner keeps is.
Check it yourself
Our role page explains each part and lists eight AWS CLI steps to run after deployment: steps 1 to 7 only read configuration; step 8 removes the role. The opt-in check returns implicitDeny for all seven reads on a default stack; they return allowed in an approved Region when the parameter is true. The expected decisions are computed from the published template’s default policy alone, so a service control policy or permissions boundary in the client’s account can only make them stricter. When the engagement ends, deleting the stack removes the role and its policies, and with them our access.
Review the template now. Deploy it only after the engagement scope and access details are agreed.
The template, explained line by line: The read-only role.