Skip to content

BOOTSTRAP-02: S3 bucket write scope

Property Value
Severity high
Platform AWS Nitro Enclaves
Lifecycle stage deploy
Policy P-01: Bootstrap state is writable only by the attested enclave
Mode Passive: read-only cloud API calls.

What a failure enables

  • RCE as root in enclave

What it checks

It passes when:

  • Bucket policy restricts s3:PutObject to the enclave; no public write path.

Example failures:

  • No bucket policy exists. Any IAM principal with s3:PutObject permission can upload files to the state bucket.

How to fix

  • Scope s3:PutObject to the enclave's instance role: grant it to a specific Principal ARN, or add a Deny on s3:PutObject with NotPrincipal the enclave role (or a StringNotEquals/ArnNotEquals aws:PrincipalArn condition). A public Allow with only a TLS or ACL condition does not restrict who may write.
  • Add a bucket policy that restricts s3:PutObject to only the enclave's instance role ARN. Deny all other principals from writing to the state prefix.

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

When it is not assessed

SKIP:

  • No target bucket specified; skipping check.

ERROR:

  • Bucket policy is not a JSON object.
  • Could not retrieve bucket policy: …
  • Bucket policy is not valid JSON.
  • Access denied reading bucket policy: …

Scan inputs

The untrust scan options this check reads:

Option Description
--region AWS region.
--target-bucket S3 bucket holding the enclave's bootstrap state.

Permissions

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

Cloud API call Permission Access
AWS s3.get_bucket_policy s3:GetBucketPolicy read

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

  • Runtime detection DET-01 (AWS Nitro Enclaves): s3:PutObject to state bucket by a non-enclave principal
  • Runtime detection DET-05 (AWS Nitro Enclaves): Guardrail change on the state bucket
  • Runtime detection DET-22 (AWS Nitro Enclaves): Enclave host disk imaged or snapshotted

Evidence recorded

Keys in the finding's evidence: bucket_policy

Generated from untrust 1.3.0 (commit 7ef462d9a0c3).