Skip to content

IAM-01: Instance role least privilege

Property Value
Severity high
Platform AWS Nitro Enclaves
Lifecycle stage deploy
Mode Passive: read-only cloud API calls.

What a failure enables

  • Any bucket / key in the account

What it checks

It passes when:

  • No wildcard Resource grants on S3/KMS actions found in instance role policies.
  • No IAM instance profile attached.
  • Instance profile has no roles.

Example failures:

  • Instance role has … overly permissive statement(s) with wildcard Resource on S3/KMS actions.
  • Instance role has 2 overly permissive statement(s) with wildcard Resource on S3/KMS actions.

How to fix

  • Scope the instance role to the specific S3 bucket and KMS key ARN used by the enclave. Replace Resource: '*' with the exact ARNs. Example: the bucket's ARN for S3 and the key's ARN for KMS.
  • Resolve the policy inspection errors and rerun this check.

After the fix, scan again: the check should report PASS.

When it is not assessed

SKIP:

  • No instance ID specified; skipping check.

ERROR:

  • Instance … not found.
  • Instance role policy inspection is incomplete; least privilege is unverified.
  • Could not describe instance: …
  • Could not get instance profile: …

Scan inputs

The untrust scan options this check reads:

Option Description
--instance-id EC2 instance ID running the Nitro Enclave.
--region AWS region.

Permissions

The cloud API calls this check makes, read from the scanner's source:

Cloud API call Permission Access
AWS ec2.describe_instances ec2:DescribeInstances read
AWS iam.get_instance_profile iam:GetInstanceProfile read
AWS iam.get_policy iam:GetPolicy read
AWS iam.get_policy_version iam:GetPolicyVersion read
AWS iam.get_role_policy iam:GetRolePolicy read
AWS iam.list_attached_role_policies iam:ListAttachedRolePolicies read
AWS iam.list_role_policies iam:ListRolePolicies read

Every AWS scan also calls sts:GetCallerIdentity. See Required permissions for a complete policy.

  • Runtime detection DET-16 (AWS Nitro Enclaves): Enclave host role permissions changed
  • Runtime detection DET-23 (AWS Nitro Enclaves): Enclave host instance profile swapped

Evidence recorded

Keys in the finding's evidence: wildcard_statements

Generated from untrust 1.3.0 (commit 7ef462d9a0c3).