Connect AWS (read-only)
TrustEvidence reads your AWS account's security configuration through an IAM identity that you create, with a policy that allows only the 44 actions the checks use.
Choose how to connect
Connect with an access key for a dedicated IAM user that has only the read-only policy below. Connecting through a cross-account role, with no long-lived key, is not available on this service yet. When it is, this guide will describe it and you can switch.
An access key for a dedicated IAM user
In AWS CloudShell of the account you want to connect, run:
curl -fsSO https://gettrustevidence.com/docs/aws/trustevidence-readonly-policy.json ACCOUNT=$(aws sts get-caller-identity --query Account --output text) aws iam create-policy --policy-name TrustEvidenceReadOnlyChecks --policy-document file://trustevidence-readonly-policy.json aws iam create-user --user-name trustevidence-readonly aws iam attach-user-policy --user-name trustevidence-readonly --policy-arn arn:aws:iam::$ACCOUNT:policy/TrustEvidenceReadOnlyChecks aws iam create-access-key --user-name trustevidence-readonly
The last command prints an access key ID and secret. Paste them into Connect AWS on the Integrations page, choose your regions, and delete them from your terminal history. The secret is encrypted as soon as it is saved and is never shown again.
The policy
All actions below are reads (Describe, Get, List) except iam:GenerateCredentialReport, which asks IAM to compile the account's credential report and changes no setting. Download: trustevidence-readonly-policy.json.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "TrustEvidenceReadOnlyChecks",
"Effect": "Allow",
"Action": [
"access-analyzer:ListAnalyzers",
"backup:ListBackupPlans",
"cloudtrail:DescribeTrails",
"cloudtrail:GetEventSelectors",
"cloudtrail:GetTrailStatus",
"config:DescribeConfigurationRecorderStatus",
"config:DescribeConfigurationRecorders",
"ec2:DescribeFlowLogs",
"ec2:DescribeInstances",
"ec2:DescribeSecurityGroups",
"ec2:DescribeVolumes",
"ec2:DescribeVpcs",
"ec2:GetEbsEncryptionByDefault",
"ecr:DescribeRepositories",
"ecr:GetRegistryScanningConfiguration",
"guardduty:GetDetector",
"guardduty:GetFindings",
"guardduty:ListDetectors",
"guardduty:ListFindings",
"iam:GenerateCredentialReport",
"iam:GetAccountPasswordPolicy",
"iam:GetAccountSummary",
"iam:GetCredentialReport",
"iam:GetPolicyVersion",
"iam:ListAttachedUserPolicies",
"iam:ListPolicies",
"iam:ListUsers",
"kms:DescribeKey",
"kms:GetKeyRotationStatus",
"kms:ListKeys",
"rds:DescribeDBInstances",
"s3:GetAccountPublicAccessBlock",
"s3:GetBucketLocation",
"s3:GetBucketLogging",
"s3:GetBucketPolicy",
"s3:GetBucketPolicyStatus",
"s3:GetBucketPublicAccessBlock",
"s3:GetBucketVersioning",
"s3:GetEncryptionConfiguration",
"s3:ListAllMyBuckets",
"secretsmanager:ListSecrets",
"securityhub:DescribeHub",
"ssm:ListResourceComplianceSummaries"
],
"Resource": "*"
}
]
}What is read and what is never touched
What TrustEvidence reads
- IAM: users, whether they use MFA and how old their access keys are (from the credential report), the password policy, attached policies
- S3: each bucket's encryption, versioning, logging, public access block and policy status
- EC2 and VPC: security group rules, flow logs, EBS encryption, instance metadata settings
- RDS, KMS, ECR and Backup: encryption, rotation, scanning and backup settings
- CloudTrail, AWS Config, GuardDuty, Security Hub and Access Analyzer: whether they are on, and GuardDuty findings
- Secrets Manager: secret names and rotation settings
What it never touches
- The contents of buckets, databases, volumes or snapshots
- Secret values, passwords and access keys (the policy has no GetSecretValue or GetObject)
- Any write: nothing is created, changed or deleted in your account
- Billing and payment information
Checks
| Check | What it reads | Passes when |
|---|---|---|
| Access keys rotated within 90 days | Checks the last-rotated date of every active access key. | No active key older than 90 days. |
| Account-level S3 Block Public Access | Reads the account-level S3 public access block. | All four settings true. |
| AWS Backup plans exist | Lists AWS Backup plans per region. | At least one plan, or documented alternative backups. |
| AWS Config is recording | Checks for an active configuration recorder in each assessed region. | A recorder is recording in every assessed region. |
| Bucket server access logging | Checks server access logging per bucket. | Logging enabled (log buckets themselves may be exempted via exception). |
| Bucket versioning enabled | Checks versioning per bucket. | Versioning = Enabled. |
| Buckets block public access | Evaluates every bucket's public access block and policy status (skipped when the account-level block is on). | Block Public Access enabled and policy not public. |
| Buckets deny non-TLS access | Looks for a Deny statement on aws:SecureTransport=false in each bucket policy. | Bucket policy denies insecure transport. |
| Buckets have default encryption | Reads default encryption for every bucket. | A default SSE algorithm is configured. |
| CloudTrail log file validation enabled | Checks LogFileValidationEnabled for every trail. | LogFileValidationEnabled = true |
| CloudTrail logs encrypted with KMS | Checks KmsKeyId for every trail. | Each trail uses a KMS key. |
| Default security groups restrict all traffic | Checks the default SG in every VPC. | No inbound or outbound rules. |
| EBS encryption by default | Checks the regional EBS default-encryption setting. | Enabled in every assessed region. |
| EBS volumes encrypted | Checks Encrypted on every volume. | All volumes encrypted. |
| EC2 instances require IMDSv2 | Checks MetadataOptions.HttpTokens on every instance. | HttpTokens = required. |
| ECR images scanned on push | Checks registry-level enhanced scanning or per-repo scan-on-push. | Every repository is scanned. |
| GuardDuty enabled | Checks for an enabled detector per region. | GuardDuty enabled in every assessed region. |
| IAM Access Analyzer enabled | Checks for an ACTIVE analyzer per region. | An active analyzer exists in each assessed region. |
| IAM console users have MFA | Evaluates every IAM user with a console password from the credential report. | mfa_active = true for every user with password_enabled = true |
| IAM password policy meets baseline | Reads the account password policy. | Length ≥ 14, all character classes, reuse prevention 24. |
| KMS key rotation enabled | Checks rotation for enabled, customer-managed symmetric keys. | KeyRotationEnabled = true. |
| Managed instances are patch compliant | Reads SSM Patch compliance summaries. | All managed instances COMPLIANT. |
| Multi-region CloudTrail is logging management events | Evaluates all trails visible from the home region, including multi-region shadow trails. | At least one trail is multi-region, logging, and records all management events. |
| No admin/database ports open to the internet | Evaluates every ingress rule for 0.0.0.0/0 or ::/0 on SSH, RDP and database ports. | No such rule exists. |
| No customer-managed policy grants *:* | Inspects the default version of every attached customer-managed policy. | No statement allows Action * on Resource *. |
| No IAM user has AdministratorAccess attached directly | Lists managed policies attached directly to each user. | Admin rights are granted through groups or roles, not directly. |
| No unresolved high-severity GuardDuty findings | Lists unarchived findings with severity ≥ 7. | No active high-severity findings. |
| RDS automated backups retained ≥ 7 days | Checks BackupRetentionPeriod. | ≥ 7 days. |
| RDS deletion protection | Checks DeletionProtection. | true. |
| RDS instances not publicly accessible | Checks PubliclyAccessible on every DB instance. | PubliclyAccessible = false. |
| RDS Multi-AZ | Checks MultiAZ. | true for production. |
| RDS storage encrypted | Checks StorageEncrypted on every DB instance. | StorageEncrypted = true. |
| Root user has MFA enabled | Reads the account summary to determine whether an MFA device is registered for the root user. | AccountMFAEnabled = 1 |
| Root user has no access keys | Reads the account summary for root access keys. | AccountAccessKeysPresent = 0 |
| Root user not used for routine operations | Uses the IAM credential report to find the last time the root password or keys were used. | No root usage in the last 90 days, or each use documented as break-glass. |
| Secrets Manager rotation configured | Checks RotationEnabled for every secret. | Rotation enabled (or an exception recorded for secrets that cannot rotate). |
| Security Hub enabled | Checks for Security Hub per region. | Security Hub enabled in every assessed region. |
| Unused credentials are removed | Finds passwords and active keys unused for 90+ days. | No credential unused for more than 90 days (users created in the last 90 days are excluded). |
| VPC flow logs enabled | Checks every VPC for an active flow log. | Every VPC has an active flow log. |
39 checks. A check that cannot read what it needs reports insufficient evidence, never a pass.
Rotate or remove access
- Rotate a key:
aws iam create-access-key --user-name trustevidence-readonly, reconnect the integration with the new key, run a scan, then delete the old key withaws iam delete-access-key. - Remove access: disconnect the integration in TrustEvidence (stored credentials are deleted at once), then delete the IAM user.