# Security Considerations Read this file before using review tooling, sharing findings, or persisting review artifacts. - Workload code and configuration excerpts are shared with the documentation-retrieval and subagent tools you use. Use trusted MCP servers and fetch documentation only over HTTPS from `docs.aws.amazon.com`. - Verify audit logging is enabled on the AWS MCP server (or equivalent tooling) so documentation fetches and workload code access during the review leave an audit trail. - Enable AWS CloudTrail for AWS API calls made during the review. Configure log file validation, encrypt trail logs with a customer managed KMS key, and restrict access to the trail's S3 bucket with S3 Block Public Access enabled and a restrictive bucket policy. Configure CloudWatch alarms or metric filters on CloudTrail events to alert on unexpected or unauthorized API activity during the review, such as write calls from the review role or access from unexpected source IPs. Use existing monitoring and audit controls to investigate anomalous access during the review. - The AWS MCP server (or equivalent tooling) should assume IAM roles that issue temporary role credentials, such as instance profiles, ECS task roles, or IAM Identity Center sessions. Do not configure long-lived IAM access keys. - Scope roles to the minimum read permissions required for the review. If the Well-Architected Tool API is used, allow only required actions such as `wellarchitected:Get*` and `wellarchitected:List*`; do not grant workload write access, `AdministratorAccess`, or wildcard `*:*` policies. - If tooling requires other stored secrets, such as third-party API keys, retrieve them from AWS Secrets Manager or AWS Systems Manager Parameter Store using `SecureString`; do not store secrets in environment variables, configuration files, or source control. - Recommendations for network and resource policies must use secure defaults: scope security groups to required CIDR ranges or security group references rather than `0.0.0.0/0`, and use condition keys such as `aws:SourceArn` and `aws:SourceAccount` where applicable. - Recommendations for public APIs or websites must require authentication, ACM-managed TLS certificates, AWS WAF defense in depth, input validation, throttling, rate limiting, and access logging. For web responses, recommend `Content-Security-Policy`, `Strict-Transport-Security`, `X-Frame-Options`, `X-Content-Type-Options`, `Referrer-Policy`, and `Permissions-Policy`. - Tool invocations (MCP calls and subagent dispatches) may log workload excerpts and findings in plaintext. Ensure those log destinations are encrypted, such as with KMS-encrypted CloudWatch Logs, and access-restricted to authorized personnel. - If findings are sent through notifications, require TLS in transit. For SNS, enable server-side encryption on the topic using a customer managed KMS key, and verify that topic policies, subscriptions, and email recipients are restricted to authorized personnel. - The report concentrates sensitive infrastructure detail, including file paths, resource names, and unremediated security gaps. Treat it as confidential, and do not post it to broadly visible channels or ticketing systems without the user's consent. - If the report or review artifacts are persisted, enable encryption at rest and restrict access to authorized principals. For S3, use SSE-KMS, enable S3 Block Public Access, apply a restrictive bucket policy, and enable S3 server access logging or CloudTrail S3 data events to audit access; use equivalent encryption, access controls, and audit logging for other storage. - Findings and evidence stay local to the conversation unless the user asks to export them. Never upload workload code to external services as part of the review. - Any generated examples must use secure non-production defaults and placeholders. Do not use production-like names or simplified open-access settings as defaults. - Apply the [AWS Security best practices](https://docs.aws.amazon.com/security/), [Well-Architected Security Pillar](https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/welcome.html), [IAM best practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html), and [AWS Shared Responsibility Model](https://aws.amazon.com/compliance/shared-responsibility-model/) when configuring these controls.