atmos aws security analyze
Analyze AWS security findings from Security Hub, Config, Inspector, and GuardDuty, then map them to the Atmos components and stacks that manage the affected resources. Generates remediation reports with optional AI-powered analysis.
Description
The atmos aws security analyze command connects to AWS security services via Atmos Auth, retrieves security findings, and maps them to the Terraform/Atmos components that manage the affected resources. By default, it works without any AI provider. When the --ai flag is passed, it uses the configured AI provider to analyze each finding and generate remediation guidance with concrete code changes.
Use it for:
- Security Posture Review: Get a prioritized view of security findings mapped to your Atmos components and stacks
- Remediation Planning: Use
--aifor AI-generated code changes to fix security issues in your Terraform components - CI/CD Integration: Export findings as JSON or CSV for automated security gates in deployment pipelines
- Compliance Reporting: Filter findings by severity, source, or compliance framework for targeted reports
Usage
atmos aws security analyze [flags]
Flags
--stack, -s- Filter findings to a specific Atmos stack (e.g.,
prod-us-east-1). --component, -c- Filter findings to a specific Atmos component (e.g.,
vpc,eks). --severity- Comma-separated list of severity levels (case-insensitive):
CRITICAL,HIGH,MEDIUM,LOW,INFORMATIONAL. Default:critical,high. --source- Filter findings by source service:
security-hub,config,inspector,guardduty,macie,access-analyzer,all(default:all). --format, -f- Output format:
markdown,json,yaml,csv(default:markdown). --file- Write output to a file instead of stdout. Creates parent directories if they don't exist.
--max-findings- Maximum number of findings to retrieve and analyze (default:
500). --ai- Enable AI-powered analysis and remediation suggestions. Requires
ai.enabled: truein youratmos.yaml. --region- AWS region to query for findings (overrides
aws.security.regionconfig). --identity, -i- Atmos Auth identity for AWS credentials (overrides
aws.security.identityconfig). --framework- Filter findings by compliance framework (e.g.,
cis-aws,pci-dss). --no-group- Disable grouping of duplicate findings. By default, findings with the same title are collapsed into a summary table. Use
--no-groupto show each finding individually with full tags — useful for AI pipelines and detailed analysis.
Examples
Basic Usage
AI-Powered Analysis
Output Formats
Filtering and Targeting
Saving to a File
CI/CD Integration
Configuration
Configure the security command in your atmos.yaml under the aws.security section:
aws:
security:
enabled: true
identity: "security-readonly" # Atmos Auth identity
region: "us-east-2" # Security Hub aggregation region
default_severity:
- CRITICAL
- HIGH
sources:
security_hub: true
inspector: true
guardduty: true
max_findings: 50
tag_mapping:
stack_tag: "atmos:stack"
component_tag: "atmos:component"
account_map: # For account-level findings
"123456789012": "prod"
"234567890123": "security"
To enable AI-powered analysis with the --ai flag, also configure your AI provider:
ai:
enabled: true
default_provider: bedrock
providers:
bedrock:
model: anthropic.claude-sonnet-4-6-20250514-v1:0
base_url: us-east-1
Related Commands
📄️ atmos aws compliance report
Compliance posture reports against frameworks
📄️ atmos aws eks update-kubeconfig
Update kubeconfig for EKS clusters