A boto3 S3 call names a bucket without ExpectedBucketOwner, so it would also act on a bucket of the same name in another account
What it finds
Bucket names are global; if a bucket is deleted and its name taken by another account, calls keep working against the stranger's bucket. ExpectedBucketOwner=account_id makes S3 refuse the request when the owner differs.
From the rule's source, s3_call_without_bucket_owner.rs.
import boto3 s3 = boto3.client("s3") def read(key, owner): a = s3.get_object(Bucket="data", Key=key)tx0 reports: this S3 call does not check who owns the bucket b = s3.get_object(Bucket="data", Key=key, ExpectedBucketOwner=owner) return a, b Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/python:s3-call-without-bucket-owner" = "note"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
# tx0: ignore[tx0/python:s3-call-without-bucket-owner] reason="..."tx0 explain tx0/python:s3-call-without-bucket-owner shows the same in the terminal. Found a false positive? Report it.