aws-security-mcp 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # aws-security-mcp
2
2
 
3
- MCP server for automated AWS security scanning — 14 modules, risk scoring, zero write operations.
3
+ MCP server for automated AWS security scanning — 19 modules, risk scoring, zero write operations.
4
4
 
5
5
  <!-- badges -->
6
6
  ![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
@@ -9,15 +9,17 @@ MCP server for automated AWS security scanning — 14 modules, risk scoring, zer
9
9
 
10
10
  ## Features
11
11
 
12
- - **14 Security Scan Modules** — 10 unique scanners + 4 aggregation scanners (Security Hub, GuardDuty, Inspector, Trusted Advisor)
12
+ - **19 Security Scan Modules** — 15 unique scanners + 4 aggregation scanners (Security Hub, GuardDuty, Inspector, Trusted Advisor, Config Rules, Access Analyzer, Patch Compliance)
13
13
  - **Risk Scoring** — every finding scored 0-10 with severity (CRITICAL/HIGH/MEDIUM/LOW) and priority (P0-P3)
14
14
  - **100% Read-Only** — uses only Describe/Get/List API calls; never modifies your AWS resources
15
+ - **Multi-Account Support** — scan all accounts in an AWS Organization via `org_mode` with cross-account role assumption
15
16
  - **Parallel Execution** — all modules run concurrently via `Promise.allSettled`
16
17
  - **Report Generation** — Markdown, professional HTML, and MLPS Level 3 compliance reports
17
18
  - **React Dashboard** — local or S3-hosted dashboard with 30-day trend charts
18
19
  - **MCP Resources** — embedded security rules and risk scoring model documentation
19
20
  - **MCP Prompts** — pre-built workflows for full scans and finding analysis
20
21
  - **China Region Support** — full support for aws-cn partition
22
+ - **CloudFormation StackSet Template** — one-click deployment of cross-account audit roles
21
23
 
22
24
  ## Quick Start
23
25
 
@@ -103,11 +105,15 @@ Ask your AI tool to run a security scan:
103
105
 
104
106
  Or use the built-in `security-scan` prompt for a guided workflow.
105
107
 
108
+ For multi-account scanning across an AWS Organization:
109
+
110
+ > "Run a full scan across all org accounts using org_mode"
111
+
106
112
  ## Available Tools
107
113
 
108
114
  | Tool | Description |
109
115
  |------|-------------|
110
- | `scan_all` | Run all 14 security scanners in parallel |
116
+ | `scan_all` | Run all 19 security scanners in parallel (supports org_mode) |
111
117
  | `detect_services` | Detect enabled AWS security services and assess maturity |
112
118
  | `scan_secret_exposure` | Check Lambda env vars and EC2 userData for exposed secrets |
113
119
  | `scan_ssl_certificate` | Check ACM certificates for expiry and failed status |
@@ -122,15 +128,22 @@ Or use the built-in `security-scan` prompt for a guided workflow.
122
128
  | `scan_guardduty_findings` | Aggregate findings from Amazon GuardDuty |
123
129
  | `scan_inspector_findings` | Aggregate findings from Amazon Inspector |
124
130
  | `scan_trusted_advisor_findings` | Aggregate findings from AWS Trusted Advisor |
131
+ | `scan_config_rules_findings` | Aggregate findings from AWS Config Rules |
132
+ | `scan_access_analyzer_findings` | Aggregate findings from IAM Access Analyzer |
133
+ | `scan_patch_compliance_findings` | Aggregate findings from SSM Patch Compliance |
134
+ | `scan_imdsv2_enforcement` | Check EC2 instances for IMDSv2 enforcement |
135
+ | `scan_waf_coverage` | Check internet-facing ALBs for WAF Web ACL protection |
125
136
  | `scan_group` | Run a predefined group of scanners for a specific scenario |
126
137
  | `list_groups` | List available scan groups |
127
138
  | `list_modules` | List available scan modules with descriptions |
139
+ | `list_org_accounts` | List all accounts in AWS Organization |
128
140
  | `generate_report` | Generate a Markdown report from scan results |
129
141
  | `generate_html_report` | Generate a professional HTML report |
130
142
  | `generate_mlps3_report` | Generate a MLPS Level 3 compliance report |
131
143
  | `generate_mlps3_html_report` | Generate a MLPS Level 3 HTML compliance report |
132
144
  | `generate_maturity_report` | Generate a security maturity assessment |
133
145
  | `save_results` | Save scan results for the dashboard |
146
+ | `get_setup_template` | Get CloudFormation StackSet template for cross-account audit role |
134
147
 
135
148
  All tools accept an optional `region` parameter (defaults to the server's configured region).
136
149
 
@@ -146,14 +159,23 @@ Attach this policy to the IAM user or role running the scanner. All actions are
146
159
  "Sid": "SecurityScannerReadOnly",
147
160
  "Effect": "Allow",
148
161
  "Action": [
162
+ "access-analyzer:ListAnalyzers",
163
+ "access-analyzer:ListFindingsV2",
164
+
149
165
  "acm:DescribeCertificate",
150
166
  "acm:ListCertificates",
151
167
 
168
+ "config:DescribeComplianceByConfigRule",
152
169
  "config:DescribeConfigurationRecorders",
170
+ "config:GetComplianceDetailsByConfigRule",
171
+
172
+ "elasticloadbalancing:DescribeLoadBalancers",
153
173
 
154
174
  "ec2:DescribeAddresses",
175
+ "ec2:DescribeInstanceAttribute",
155
176
  "ec2:DescribeInstances",
156
177
  "ec2:DescribeNetworkAcls",
178
+ "ec2:DescribeNetworkInterfaces",
157
179
  "ec2:DescribeSecurityGroups",
158
180
  "ec2:DescribeSnapshots",
159
181
  "ec2:DescribeSnapshotAttribute",
@@ -186,11 +208,16 @@ Attach this policy to the IAM user or role running the scanner. All actions are
186
208
 
187
209
  "macie2:GetMacieSession",
188
210
 
211
+ "organizations:ListAccounts",
212
+
189
213
  "rds:DescribeDBInstances",
190
214
 
191
215
  "route53:ListHostedZones",
192
216
  "route53:ListResourceRecordSets",
193
217
 
218
+ "s3:GetBucketAcl",
219
+ "s3:GetBucketLocation",
220
+ "s3:GetBucketPolicyStatus",
194
221
  "s3:GetBucketPublicAccessBlock",
195
222
  "s3:GetBucketVersioning",
196
223
  "s3:GetBucketReplication",
@@ -200,10 +227,16 @@ Attach this policy to the IAM user or role running the scanner. All actions are
200
227
  "securityhub:DescribeHub",
201
228
  "securityhub:GetFindings",
202
229
 
230
+ "ssm:DescribeInstanceInformation",
231
+ "ssm:DescribeInstancePatchStates",
232
+
203
233
  "sts:GetCallerIdentity",
204
234
 
205
235
  "support:DescribeTrustedAdvisorChecks",
206
- "support:DescribeTrustedAdvisorCheckResult"
236
+ "support:DescribeTrustedAdvisorCheckResult",
237
+
238
+ "wafv2:GetWebACL",
239
+ "wafv2:GetWebACLForResource"
207
240
  ],
208
241
  "Resource": "*"
209
242
  }
@@ -213,11 +246,11 @@ Attach this policy to the IAM user or role running the scanner. All actions are
213
246
 
214
247
  ## Scan Modules
215
248
 
216
- ### Unique Scanners (10)
249
+ ### Unique Scanners (15)
217
250
 
218
251
  | Module | What It Checks | Risk Score Range |
219
252
  |--------|---------------|-----------------|
220
- | **Service Detection** | Enabled security services (Security Hub, GuardDuty, Inspector, Config, Macie) and maturity level | 5.0 - 7.5 |
253
+ | **Service Detection** | Enabled security services (Security Hub, GuardDuty, Inspector, Config, Macie, CloudTrail) and maturity level | 5.0 - 7.5 |
221
254
  | **Secret Exposure** | Lambda env vars and EC2 userData for exposed secrets (AWS keys, private keys, passwords) | 7.0 - 9.5 |
222
255
  | **SSL Certificate** | ACM certificate expiry, failed status, upcoming renewals | 5.5 - 9.0 |
223
256
  | **Dangling DNS** | Route53 CNAME records pointing to non-existent resources (subdomain takeover) | 7.0 - 8.5 |
@@ -227,6 +260,11 @@ Attach this policy to the IAM user or role running the scanner. All actions are
227
260
  | **Tag Compliance** | Required tags (Environment, Project, Owner) on EC2, RDS, S3 resources | 3.0 - 5.0 |
228
261
  | **Idle Resources** | Unused resources (unattached EBS, unused EIPs, stopped instances, unused SGs) | 3.0 - 5.0 |
229
262
  | **Disaster Recovery** | RDS Multi-AZ & backups, EBS snapshot coverage, S3 versioning & replication | 4.0 - 7.5 |
263
+ | **Config Rules** | AWS Config Rules compliance status | 3.0 - 9.5 |
264
+ | **Access Analyzer** | IAM Access Analyzer external access findings | 3.0 - 9.5 |
265
+ | **Patch Compliance** | SSM Patch Manager compliance status for managed instances | 3.0 - 9.5 |
266
+ | **IMDSv2 Enforcement** | EC2 instances not enforcing IMDSv2 (HttpTokens != required) | 7.5 |
267
+ | **WAF Coverage** | Internet-facing ALBs without WAF Web ACL protection | 7.5 |
230
268
 
231
269
  ### Aggregation Scanners (4)
232
270
 
@@ -252,20 +290,32 @@ Pre-defined scanner groupings for common scenarios:
252
290
 
253
291
  | Group | Description | Modules |
254
292
  |-------|-------------|---------|
255
- | `mlps3_precheck` | GB/T 22239-2019 等保三级预检 | 12 modules |
256
- | `hw_defense` | 护网蓝队加固 | 7 modules |
257
- | `exposure` | 公网暴露面评估 | 5 modules |
258
- | `pre_launch` | 生产上线前检查 | ALL modules |
259
- | `aggregation` | 安全服务聚合 | 4 modules |
260
- | `new_account_baseline` | 新账户基线检查 | 5 modules |
293
+ | `mlps3_precheck` | GB/T 22239-2019 等保三级预检 | 17 modules |
294
+ | `hw_defense` | 护网蓝队加固 | 14 modules |
295
+ | `exposure` | 公网暴露面评估 | 8 modules |
296
+ | `data_encryption` | 数据加密审计 | 2 modules |
297
+ | `least_privilege` | 最小权限审计 | 3 modules |
298
+ | `log_integrity` | 日志完整性审计 | 2 modules |
261
299
  | `disaster_recovery` | 灾备评估 | 2 modules |
262
- | `least_privilege` | 最小权限审计 | 2 modules |
263
300
  | `idle_resources` | 闲置资源清理 | 2 modules |
264
301
  | `tag_compliance` | 资源标签合规 | 1 module |
265
- | `public_access_verify` | 公网可达性验证 | 1 module |
302
+ | `new_account_baseline` | 新账户基线检查 | 7 modules |
303
+ | `aggregation` | 安全服务聚合 | 7 modules |
266
304
 
267
305
  Use `list_groups` to see all available groups with their module lists.
268
306
 
307
+ ## Multi-Account Support
308
+
309
+ For scanning across an AWS Organization:
310
+
311
+ 1. **Deploy the audit role** — Use `get_setup_template` to retrieve the CloudFormation StackSet template, then deploy it from your Management Account to create the `AWSSecurityMCPAudit` role in all member accounts.
312
+
313
+ 2. **Run with org_mode** — Pass `org_mode: true` to `scan_all` or `scan_group`. The scanner will discover accounts via `organizations:ListAccounts` and assume the audit role in each.
314
+
315
+ 3. **Optional filtering** — Pass `account_ids` to scan specific accounts instead of the full organization.
316
+
317
+ The StackSet templates are available in the `templates/` directory in both YAML and JSON formats.
318
+
269
319
  ## Output Format
270
320
 
271
321
  ### Scan Results (JSON)