awslabs.well-architected-security-mcp-server 0.1.1__py3-none-any.whl
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.
- awslabs/well_architected_security_mcp_server/__init__.py +17 -0
- awslabs/well_architected_security_mcp_server/consts.py +113 -0
- awslabs/well_architected_security_mcp_server/server.py +1174 -0
- awslabs/well_architected_security_mcp_server/util/__init__.py +42 -0
- awslabs/well_architected_security_mcp_server/util/network_security.py +1251 -0
- awslabs/well_architected_security_mcp_server/util/prompt_utils.py +173 -0
- awslabs/well_architected_security_mcp_server/util/resource_utils.py +109 -0
- awslabs/well_architected_security_mcp_server/util/security_services.py +1618 -0
- awslabs/well_architected_security_mcp_server/util/storage_security.py +1126 -0
- awslabs_well_architected_security_mcp_server-0.1.1.dist-info/METADATA +258 -0
- awslabs_well_architected_security_mcp_server-0.1.1.dist-info/RECORD +13 -0
- awslabs_well_architected_security_mcp_server-0.1.1.dist-info/WHEEL +4 -0
- awslabs_well_architected_security_mcp_server-0.1.1.dist-info/entry_points.txt +5 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""awslabs AWS Well-Architected Security Assessment Tool MCP Server."""
|
|
16
|
+
|
|
17
|
+
__version__ = "0.1.1"
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Constants for the AWS Security Pillar MCP Server."""
|
|
16
|
+
|
|
17
|
+
# Default AWS regions to use if none are specified
|
|
18
|
+
DEFAULT_REGIONS = ["us-east-1", "us-west-2", "eu-west-1"]
|
|
19
|
+
|
|
20
|
+
# Instructions for the MCP server
|
|
21
|
+
INSTRUCTIONS = """AWS Security Pillar MCP Server for analyzing AWS environments against Well-Architected Framework security principles.
|
|
22
|
+
|
|
23
|
+
This server dynamically adapts to your AWS environment, without requiring pre-defined services or rules.
|
|
24
|
+
|
|
25
|
+
## Key Capabilities
|
|
26
|
+
- Security services integration (Security Hub, GuardDuty, etc.)
|
|
27
|
+
- Dynamic resource discovery and security scanning
|
|
28
|
+
- Well-Architected Framework security analysis
|
|
29
|
+
- Detailed remediation planning with dry run analysis
|
|
30
|
+
|
|
31
|
+
## Available Tools
|
|
32
|
+
|
|
33
|
+
### CheckSecurityServices
|
|
34
|
+
Verifies if selected AWS security services are enabled in the specified region and account.
|
|
35
|
+
This consolidated tool checks the status of multiple AWS security services in a single call,
|
|
36
|
+
providing a comprehensive overview of your security posture.
|
|
37
|
+
|
|
38
|
+
### GetSecurityFindings
|
|
39
|
+
Retrieves security findings from various AWS security services including GuardDuty, Security Hub,
|
|
40
|
+
Inspector, IAM Access Analyzer, Trusted Advisor, and Macie with filtering options by severity.
|
|
41
|
+
|
|
42
|
+
### CheckStorageEncryption
|
|
43
|
+
Identifies storage resources using Resource Explorer and checks if they are properly configured
|
|
44
|
+
for data protection at rest according to AWS Well-Architected Framework Security Pillar best practices.
|
|
45
|
+
|
|
46
|
+
### CheckNetworkSecurity
|
|
47
|
+
Identifies network resources using Resource Explorer and checks if they are properly configured
|
|
48
|
+
for data protection in transit according to AWS Well-Architected Framework Security Pillar best practices.
|
|
49
|
+
This tool helps ensure your network configurations follow security best practices for protecting data in transit.
|
|
50
|
+
|
|
51
|
+
### GetStoredSecurityContext
|
|
52
|
+
Retrieves security services data that was stored in context from a previous CheckSecurityServices call
|
|
53
|
+
without making additional AWS API calls.
|
|
54
|
+
|
|
55
|
+
### GetResourceComplianceStatus
|
|
56
|
+
Checks the compliance status of specific AWS resources against AWS Config rules, providing
|
|
57
|
+
detailed compliance information and configuration history.
|
|
58
|
+
|
|
59
|
+
### ExploreAwsResources
|
|
60
|
+
Provides a comprehensive inventory of AWS resources within a specified region across multiple services.
|
|
61
|
+
This tool is useful for understanding what resources are deployed in your environment before conducting
|
|
62
|
+
a security assessment.
|
|
63
|
+
|
|
64
|
+
## Usage Guidelines
|
|
65
|
+
1. Start by exploring your AWS resources to understand your environment:
|
|
66
|
+
- Use ExploreAwsResources to get a comprehensive inventory of resources
|
|
67
|
+
- Review what services and resources are deployed in your target region
|
|
68
|
+
|
|
69
|
+
2. Check if key security services are enabled:
|
|
70
|
+
- Use CheckSecurityServices to verify which security services are enabled
|
|
71
|
+
- Review the summary to identify which services need to be enabled
|
|
72
|
+
|
|
73
|
+
3. Assess your data protection posture:
|
|
74
|
+
- Use CheckStorageEncryption to verify encryption at rest
|
|
75
|
+
- Use CheckNetworkSecurity to verify encryption in transit
|
|
76
|
+
- Review the recommendations for improving your data protection
|
|
77
|
+
|
|
78
|
+
4. Analyze security findings:
|
|
79
|
+
- Use GetSecurityFindings to retrieve findings from enabled security services
|
|
80
|
+
- Focus on high-severity findings first
|
|
81
|
+
|
|
82
|
+
5. Apply recommended remediation steps to improve your security posture
|
|
83
|
+
|
|
84
|
+
## AWS Security Pillar
|
|
85
|
+
This server aligns with the Security Pillar of the AWS Well-Architected Framework, which focuses on:
|
|
86
|
+
- Identity and Access Management
|
|
87
|
+
- Detection Controls
|
|
88
|
+
- Infrastructure Protection
|
|
89
|
+
- Data Protection
|
|
90
|
+
- Incident Response
|
|
91
|
+
|
|
92
|
+
For more information, see: https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/welcome.html
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# Security domains from Well-Architected Framework
|
|
97
|
+
SECURITY_DOMAINS = [
|
|
98
|
+
"identity_and_access_management",
|
|
99
|
+
"detection",
|
|
100
|
+
"infrastructure_protection",
|
|
101
|
+
"data_protection",
|
|
102
|
+
"incident_response",
|
|
103
|
+
"application_security",
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
# Severity levels for security findings
|
|
107
|
+
SEVERITY_LEVELS = {
|
|
108
|
+
"CRITICAL": 4,
|
|
109
|
+
"HIGH": 3,
|
|
110
|
+
"MEDIUM": 2,
|
|
111
|
+
"LOW": 1,
|
|
112
|
+
"INFORMATIONAL": 0,
|
|
113
|
+
}
|