runbooks 0.9.0__py3-none-any.whl → 0.9.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.
Files changed (46) hide show
  1. runbooks/__init__.py +1 -1
  2. runbooks/cfat/assessment/compliance.py +4 -1
  3. runbooks/cloudops/__init__.py +123 -0
  4. runbooks/cloudops/base.py +385 -0
  5. runbooks/cloudops/cost_optimizer.py +811 -0
  6. runbooks/cloudops/infrastructure_optimizer.py +29 -0
  7. runbooks/cloudops/interfaces.py +828 -0
  8. runbooks/cloudops/lifecycle_manager.py +29 -0
  9. runbooks/cloudops/mcp_cost_validation.py +678 -0
  10. runbooks/cloudops/models.py +251 -0
  11. runbooks/cloudops/monitoring_automation.py +29 -0
  12. runbooks/cloudops/notebook_framework.py +676 -0
  13. runbooks/cloudops/security_enforcer.py +449 -0
  14. runbooks/common/mcp_cost_explorer_integration.py +900 -0
  15. runbooks/common/mcp_integration.py +19 -10
  16. runbooks/common/rich_utils.py +1 -1
  17. runbooks/finops/README.md +31 -0
  18. runbooks/finops/cost_optimizer.py +1340 -0
  19. runbooks/finops/finops_dashboard.py +211 -5
  20. runbooks/finops/schemas.py +589 -0
  21. runbooks/inventory/runbooks.inventory.organizations_discovery.log +0 -0
  22. runbooks/inventory/runbooks.security.security_export.log +0 -0
  23. runbooks/main.py +525 -0
  24. runbooks/operate/ec2_operations.py +428 -0
  25. runbooks/operate/iam_operations.py +598 -3
  26. runbooks/operate/rds_operations.py +508 -0
  27. runbooks/operate/s3_operations.py +508 -0
  28. runbooks/remediation/base.py +5 -3
  29. runbooks/security/__init__.py +101 -0
  30. runbooks/security/cloudops_automation_security_validator.py +1164 -0
  31. runbooks/security/compliance_automation_engine.py +4 -4
  32. runbooks/security/enterprise_security_framework.py +4 -5
  33. runbooks/security/executive_security_dashboard.py +1247 -0
  34. runbooks/security/multi_account_security_controls.py +2254 -0
  35. runbooks/security/real_time_security_monitor.py +1196 -0
  36. runbooks/security/security_baseline_tester.py +3 -3
  37. runbooks/sre/production_monitoring_framework.py +584 -0
  38. runbooks/validation/mcp_validator.py +29 -15
  39. runbooks/vpc/networking_wrapper.py +6 -3
  40. runbooks-0.9.1.dist-info/METADATA +308 -0
  41. {runbooks-0.9.0.dist-info → runbooks-0.9.1.dist-info}/RECORD +45 -23
  42. runbooks-0.9.0.dist-info/METADATA +0 -718
  43. {runbooks-0.9.0.dist-info → runbooks-0.9.1.dist-info}/WHEEL +0 -0
  44. {runbooks-0.9.0.dist-info → runbooks-0.9.1.dist-info}/entry_points.txt +0 -0
  45. {runbooks-0.9.0.dist-info → runbooks-0.9.1.dist-info}/licenses/LICENSE +0 -0
  46. {runbooks-0.9.0.dist-info → runbooks-0.9.1.dist-info}/top_level.txt +0 -0
@@ -28,6 +28,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
28
28
  import boto3
29
29
  from botocore.exceptions import ClientError
30
30
 
31
+ from runbooks.common.profile_utils import create_management_session
31
32
  from runbooks.common.rich_utils import (
32
33
  console,
33
34
  create_panel,
@@ -166,10 +167,9 @@ class ComplianceAutomationEngine:
166
167
  print_success("Compliance Automation Engine initialized successfully")
167
168
 
168
169
  def _create_session(self) -> boto3.Session:
169
- """Create secure AWS session."""
170
- if self.profile == "default":
171
- return boto3.Session()
172
- return boto3.Session(profile_name=self.profile)
170
+ """Create secure AWS session using enterprise profile management."""
171
+ # Use management profile for compliance operations requiring cross-account access
172
+ return create_management_session(profile=self.profile)
173
173
 
174
174
  def _load_framework_controls(self) -> Dict[ComplianceFramework, List[ComplianceControl]]:
175
175
  """Load compliance framework control definitions."""
@@ -25,6 +25,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
25
25
  import boto3
26
26
  from botocore.exceptions import ClientError, NoCredentialsError
27
27
 
28
+ from runbooks.common.profile_utils import create_management_session
28
29
  from runbooks.common.rich_utils import (
29
30
  STATUS_INDICATORS,
30
31
  console,
@@ -151,12 +152,10 @@ class EnterpriseSecurityFramework:
151
152
  print_success("Enterprise Security Framework initialized successfully")
152
153
 
153
154
  def _create_secure_session(self) -> boto3.Session:
154
- """Create secure AWS session with zero-trust validation."""
155
+ """Create secure AWS session with zero-trust validation using enterprise profile management."""
155
156
  try:
156
- if self.profile == "default":
157
- session = boto3.Session()
158
- else:
159
- session = boto3.Session(profile_name=self.profile)
157
+ # Use management profile for security operations requiring cross-account access
158
+ session = create_management_session(profile=self.profile)
160
159
 
161
160
  # Validate session credentials
162
161
  sts_client = session.client("sts")