aws-security-mcp 0.4.1 → 0.4.3
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 +54 -13
- package/dist/bin/aws-security-mcp.js +105 -13879
- package/dist/bin/aws-security-mcp.js.map +1 -1
- package/dist/src/commands/dashboard.js.map +1 -1
- package/dist/src/commands/deploy-dashboard.js +2 -1
- package/dist/src/commands/deploy-dashboard.js.map +1 -1
- package/dist/src/index.js +101 -13881
- package/dist/src/index.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# aws-security-mcp
|
|
2
2
|
|
|
3
|
-
MCP server for automated AWS security scanning —
|
|
3
|
+
MCP server for automated AWS security scanning — 17 modules, risk scoring, zero write operations.
|
|
4
4
|
|
|
5
5
|
<!-- badges -->
|
|
6
6
|

|
|
@@ -9,15 +9,17 @@ MCP server for automated AWS security scanning — 14 modules, risk scoring, zer
|
|
|
9
9
|
|
|
10
10
|
## Features
|
|
11
11
|
|
|
12
|
-
- **
|
|
12
|
+
- **17 Security Scan Modules** — 13 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
|
|
116
|
+
| `scan_all` | Run all 17 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,20 @@ 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 |
|
|
125
134
|
| `scan_group` | Run a predefined group of scanners for a specific scenario |
|
|
126
135
|
| `list_groups` | List available scan groups |
|
|
127
136
|
| `list_modules` | List available scan modules with descriptions |
|
|
137
|
+
| `list_org_accounts` | List all accounts in AWS Organization |
|
|
128
138
|
| `generate_report` | Generate a Markdown report from scan results |
|
|
129
139
|
| `generate_html_report` | Generate a professional HTML report |
|
|
130
140
|
| `generate_mlps3_report` | Generate a MLPS Level 3 compliance report |
|
|
131
141
|
| `generate_mlps3_html_report` | Generate a MLPS Level 3 HTML compliance report |
|
|
132
142
|
| `generate_maturity_report` | Generate a security maturity assessment |
|
|
133
143
|
| `save_results` | Save scan results for the dashboard |
|
|
144
|
+
| `get_setup_template` | Get CloudFormation StackSet template for cross-account audit role |
|
|
134
145
|
|
|
135
146
|
All tools accept an optional `region` parameter (defaults to the server's configured region).
|
|
136
147
|
|
|
@@ -146,14 +157,21 @@ Attach this policy to the IAM user or role running the scanner. All actions are
|
|
|
146
157
|
"Sid": "SecurityScannerReadOnly",
|
|
147
158
|
"Effect": "Allow",
|
|
148
159
|
"Action": [
|
|
160
|
+
"access-analyzer:ListAnalyzers",
|
|
161
|
+
"access-analyzer:ListFindingsV2",
|
|
162
|
+
|
|
149
163
|
"acm:DescribeCertificate",
|
|
150
164
|
"acm:ListCertificates",
|
|
151
165
|
|
|
166
|
+
"config:DescribeComplianceByConfigRule",
|
|
152
167
|
"config:DescribeConfigurationRecorders",
|
|
168
|
+
"config:GetComplianceDetailsByConfigRule",
|
|
153
169
|
|
|
154
170
|
"ec2:DescribeAddresses",
|
|
171
|
+
"ec2:DescribeInstanceAttribute",
|
|
155
172
|
"ec2:DescribeInstances",
|
|
156
173
|
"ec2:DescribeNetworkAcls",
|
|
174
|
+
"ec2:DescribeNetworkInterfaces",
|
|
157
175
|
"ec2:DescribeSecurityGroups",
|
|
158
176
|
"ec2:DescribeSnapshots",
|
|
159
177
|
"ec2:DescribeSnapshotAttribute",
|
|
@@ -186,11 +204,16 @@ Attach this policy to the IAM user or role running the scanner. All actions are
|
|
|
186
204
|
|
|
187
205
|
"macie2:GetMacieSession",
|
|
188
206
|
|
|
207
|
+
"organizations:ListAccounts",
|
|
208
|
+
|
|
189
209
|
"rds:DescribeDBInstances",
|
|
190
210
|
|
|
191
211
|
"route53:ListHostedZones",
|
|
192
212
|
"route53:ListResourceRecordSets",
|
|
193
213
|
|
|
214
|
+
"s3:GetBucketAcl",
|
|
215
|
+
"s3:GetBucketLocation",
|
|
216
|
+
"s3:GetBucketPolicyStatus",
|
|
194
217
|
"s3:GetBucketPublicAccessBlock",
|
|
195
218
|
"s3:GetBucketVersioning",
|
|
196
219
|
"s3:GetBucketReplication",
|
|
@@ -200,6 +223,9 @@ Attach this policy to the IAM user or role running the scanner. All actions are
|
|
|
200
223
|
"securityhub:DescribeHub",
|
|
201
224
|
"securityhub:GetFindings",
|
|
202
225
|
|
|
226
|
+
"ssm:DescribeInstanceInformation",
|
|
227
|
+
"ssm:DescribeInstancePatchStates",
|
|
228
|
+
|
|
203
229
|
"sts:GetCallerIdentity",
|
|
204
230
|
|
|
205
231
|
"support:DescribeTrustedAdvisorChecks",
|
|
@@ -213,11 +239,11 @@ Attach this policy to the IAM user or role running the scanner. All actions are
|
|
|
213
239
|
|
|
214
240
|
## Scan Modules
|
|
215
241
|
|
|
216
|
-
### Unique Scanners (
|
|
242
|
+
### Unique Scanners (13)
|
|
217
243
|
|
|
218
244
|
| Module | What It Checks | Risk Score Range |
|
|
219
245
|
|--------|---------------|-----------------|
|
|
220
|
-
| **Service Detection** | Enabled security services (Security Hub, GuardDuty, Inspector, Config, Macie) and maturity level | 5.0 - 7.5 |
|
|
246
|
+
| **Service Detection** | Enabled security services (Security Hub, GuardDuty, Inspector, Config, Macie, CloudTrail) and maturity level | 5.0 - 7.5 |
|
|
221
247
|
| **Secret Exposure** | Lambda env vars and EC2 userData for exposed secrets (AWS keys, private keys, passwords) | 7.0 - 9.5 |
|
|
222
248
|
| **SSL Certificate** | ACM certificate expiry, failed status, upcoming renewals | 5.5 - 9.0 |
|
|
223
249
|
| **Dangling DNS** | Route53 CNAME records pointing to non-existent resources (subdomain takeover) | 7.0 - 8.5 |
|
|
@@ -227,6 +253,9 @@ Attach this policy to the IAM user or role running the scanner. All actions are
|
|
|
227
253
|
| **Tag Compliance** | Required tags (Environment, Project, Owner) on EC2, RDS, S3 resources | 3.0 - 5.0 |
|
|
228
254
|
| **Idle Resources** | Unused resources (unattached EBS, unused EIPs, stopped instances, unused SGs) | 3.0 - 5.0 |
|
|
229
255
|
| **Disaster Recovery** | RDS Multi-AZ & backups, EBS snapshot coverage, S3 versioning & replication | 4.0 - 7.5 |
|
|
256
|
+
| **Config Rules** | AWS Config Rules compliance status | 3.0 - 9.5 |
|
|
257
|
+
| **Access Analyzer** | IAM Access Analyzer external access findings | 3.0 - 9.5 |
|
|
258
|
+
| **Patch Compliance** | SSM Patch Manager compliance status for managed instances | 3.0 - 9.5 |
|
|
230
259
|
|
|
231
260
|
### Aggregation Scanners (4)
|
|
232
261
|
|
|
@@ -252,20 +281,32 @@ Pre-defined scanner groupings for common scenarios:
|
|
|
252
281
|
|
|
253
282
|
| Group | Description | Modules |
|
|
254
283
|
|-------|-------------|---------|
|
|
255
|
-
| `mlps3_precheck` | GB/T 22239-2019 等保三级预检 |
|
|
256
|
-
| `hw_defense` | 护网蓝队加固 |
|
|
257
|
-
| `exposure` | 公网暴露面评估 |
|
|
258
|
-
| `
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
284
|
+
| `mlps3_precheck` | GB/T 22239-2019 等保三级预检 | 15 modules |
|
|
285
|
+
| `hw_defense` | 护网蓝队加固 | 12 modules |
|
|
286
|
+
| `exposure` | 公网暴露面评估 | 6 modules |
|
|
287
|
+
| `data_encryption` | 数据加密审计 | 2 modules |
|
|
288
|
+
| `least_privilege` | 最小权限审计 | 3 modules |
|
|
289
|
+
| `log_integrity` | 日志完整性审计 | 2 modules |
|
|
261
290
|
| `disaster_recovery` | 灾备评估 | 2 modules |
|
|
262
|
-
| `least_privilege` | 最小权限审计 | 2 modules |
|
|
263
291
|
| `idle_resources` | 闲置资源清理 | 2 modules |
|
|
264
292
|
| `tag_compliance` | 资源标签合规 | 1 module |
|
|
265
|
-
| `
|
|
293
|
+
| `new_account_baseline` | 新账户基线检查 | 6 modules |
|
|
294
|
+
| `aggregation` | 安全服务聚合 | 7 modules |
|
|
266
295
|
|
|
267
296
|
Use `list_groups` to see all available groups with their module lists.
|
|
268
297
|
|
|
298
|
+
## Multi-Account Support
|
|
299
|
+
|
|
300
|
+
For scanning across an AWS Organization:
|
|
301
|
+
|
|
302
|
+
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.
|
|
303
|
+
|
|
304
|
+
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.
|
|
305
|
+
|
|
306
|
+
3. **Optional filtering** — Pass `account_ids` to scan specific accounts instead of the full organization.
|
|
307
|
+
|
|
308
|
+
The StackSet templates are available in the `templates/` directory in both YAML and JSON formats.
|
|
309
|
+
|
|
269
310
|
## Output Format
|
|
270
311
|
|
|
271
312
|
### Scan Results (JSON)
|