runbooks 0.6.1__py3-none-any.whl → 0.7.0__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.
- jupyter-agent/.env +2 -0
- jupyter-agent/.gradio/certificate.pem +31 -0
- jupyter-agent/__main__.log +8 -0
- jupyter-agent/tmp/4ojbs8a02ir/jupyter-agent.ipynb +68 -0
- jupyter-agent/tmp/cm5iasgpm3p/jupyter-agent.ipynb +91 -0
- jupyter-agent/tmp/crqbsseag5/jupyter-agent.ipynb +91 -0
- jupyter-agent/tmp/hohanq1u097/jupyter-agent.ipynb +57 -0
- jupyter-agent/tmp/jns1sam29wm/jupyter-agent.ipynb +53 -0
- jupyter-agent/tmp/jupyter-agent.ipynb +27 -0
- runbooks/__init__.py +1 -1
- runbooks/finops/README.md +337 -0
- runbooks/finops/__init__.py +1 -3
- runbooks/inventory/FAILED_SCRIPTS_TROUBLESHOOTING.md +619 -0
- runbooks/inventory/PASSED_SCRIPTS_GUIDE.md +738 -0
- runbooks/inventory/aws_organization.png +0 -0
- runbooks/main.py +230 -11
- runbooks/{security_baseline → security}/README.md +191 -68
- runbooks/security/__init__.py +71 -0
- runbooks/{security_baseline → security}/security_baseline_tester.py +2 -2
- {runbooks-0.6.1.dist-info → runbooks-0.7.0.dist-info}/METADATA +5 -3
- {runbooks-0.6.1.dist-info → runbooks-0.7.0.dist-info}/RECORD +56 -44
- runbooks/security_baseline/__init__.py +0 -0
- runbooks/security_baseline/requirements.txt +0 -7
- /runbooks/{security_baseline → security}/checklist/__init__.py +0 -0
- /runbooks/{security_baseline → security}/checklist/account_level_bucket_public_access.py +0 -0
- /runbooks/{security_baseline → security}/checklist/alternate_contacts.py +0 -0
- /runbooks/{security_baseline → security}/checklist/bucket_public_access.py +0 -0
- /runbooks/{security_baseline → security}/checklist/cloudwatch_alarm_configuration.py +0 -0
- /runbooks/{security_baseline → security}/checklist/direct_attached_policy.py +0 -0
- /runbooks/{security_baseline → security}/checklist/guardduty_enabled.py +0 -0
- /runbooks/{security_baseline → security}/checklist/iam_password_policy.py +0 -0
- /runbooks/{security_baseline → security}/checklist/iam_user_mfa.py +0 -0
- /runbooks/{security_baseline → security}/checklist/multi_region_instance_usage.py +0 -0
- /runbooks/{security_baseline → security}/checklist/multi_region_trail.py +0 -0
- /runbooks/{security_baseline → security}/checklist/root_access_key.py +0 -0
- /runbooks/{security_baseline → security}/checklist/root_mfa.py +0 -0
- /runbooks/{security_baseline → security}/checklist/root_usage.py +0 -0
- /runbooks/{security_baseline → security}/checklist/trail_enabled.py +0 -0
- /runbooks/{security_baseline → security}/checklist/trusted_advisor.py +0 -0
- /runbooks/{security_baseline → security}/config-origin.json +0 -0
- /runbooks/{security_baseline → security}/config.json +0 -0
- /runbooks/{security_baseline → security}/permission.json +0 -0
- /runbooks/{security_baseline → security}/report_generator.py +0 -0
- /runbooks/{security_baseline → security}/report_template_en.html +0 -0
- /runbooks/{security_baseline → security}/report_template_jp.html +0 -0
- /runbooks/{security_baseline → security}/report_template_kr.html +0 -0
- /runbooks/{security_baseline → security}/report_template_vn.html +0 -0
- /runbooks/{security_baseline → security}/run_script.py +0 -0
- /runbooks/{security_baseline → security}/utils/__init__.py +0 -0
- /runbooks/{security_baseline → security}/utils/common.py +0 -0
- /runbooks/{security_baseline → security}/utils/enums.py +0 -0
- /runbooks/{security_baseline → security}/utils/language.py +0 -0
- /runbooks/{security_baseline → security}/utils/level_const.py +0 -0
- /runbooks/{security_baseline → security}/utils/permission_list.py +0 -0
- {runbooks-0.6.1.dist-info → runbooks-0.7.0.dist-info}/WHEEL +0 -0
- {runbooks-0.6.1.dist-info → runbooks-0.7.0.dist-info}/entry_points.txt +0 -0
- {runbooks-0.6.1.dist-info → runbooks-0.7.0.dist-info}/licenses/LICENSE +0 -0
- {runbooks-0.6.1.dist-info → runbooks-0.7.0.dist-info}/top_level.txt +0 -0
Binary file
|
runbooks/main.py
CHANGED
@@ -702,15 +702,15 @@ def display_creation_results(results):
|
|
702
702
|
@click.option(
|
703
703
|
"--profiles",
|
704
704
|
"-p",
|
705
|
-
|
706
|
-
help="Specific AWS profiles to use (
|
705
|
+
multiple=True,
|
706
|
+
help="Specific AWS profiles to use (repeat option to pass multiple)",
|
707
707
|
type=str,
|
708
708
|
)
|
709
709
|
@click.option(
|
710
710
|
"--regions",
|
711
711
|
"-r",
|
712
|
-
|
713
|
-
help="AWS regions to check for EC2 instances (
|
712
|
+
multiple=True,
|
713
|
+
help="AWS regions to check for EC2 instances (repeat option to pass multiple)",
|
714
714
|
type=str,
|
715
715
|
)
|
716
716
|
@click.option("--all", "-a", is_flag=True, help="Use all available AWS profiles")
|
@@ -730,11 +730,10 @@ def display_creation_results(results):
|
|
730
730
|
@click.option(
|
731
731
|
"--report-type",
|
732
732
|
"-y",
|
733
|
-
|
734
|
-
|
735
|
-
help="Specify one or more report types: csv
|
736
|
-
|
737
|
-
default=["csv"],
|
733
|
+
multiple=True,
|
734
|
+
type=click.Choice(["csv", "json", "pdf"]),
|
735
|
+
help="Specify one or more report types (repeat option): csv, json, pdf",
|
736
|
+
default=("csv",),
|
738
737
|
)
|
739
738
|
@click.option(
|
740
739
|
"--dir",
|
@@ -751,8 +750,8 @@ def display_creation_results(results):
|
|
751
750
|
@click.option(
|
752
751
|
"--tag",
|
753
752
|
"-g",
|
754
|
-
|
755
|
-
help="Cost allocation tag
|
753
|
+
multiple=True,
|
754
|
+
help="Cost allocation tag filter(s), e.g., --tag Team=DevOps (repeat for multiple)",
|
756
755
|
type=str,
|
757
756
|
)
|
758
757
|
@click.option(
|
@@ -777,6 +776,226 @@ def finops(ctx, **kwargs):
|
|
777
776
|
run_dashboard(args)
|
778
777
|
|
779
778
|
|
779
|
+
# ============================================================================
|
780
|
+
# Security Commands
|
781
|
+
# ============================================================================
|
782
|
+
|
783
|
+
|
784
|
+
@main.group(invoke_without_command=True)
|
785
|
+
@click.option(
|
786
|
+
"--profile",
|
787
|
+
default="default",
|
788
|
+
help="AWS IAM profile to use for authentication (default: 'default')"
|
789
|
+
)
|
790
|
+
@click.option(
|
791
|
+
"--language",
|
792
|
+
type=click.Choice(["EN", "JP", "KR", "VN"]),
|
793
|
+
default="EN",
|
794
|
+
help="Language for security reports (default: 'EN')"
|
795
|
+
)
|
796
|
+
@click.option(
|
797
|
+
"--output",
|
798
|
+
help="Custom output directory for reports (default: ./results)"
|
799
|
+
)
|
800
|
+
@click.pass_context
|
801
|
+
def security(ctx, profile, language, output):
|
802
|
+
"""AWS Security Baseline Assessment Tool.
|
803
|
+
|
804
|
+
Comprehensive security baseline testing with multilingual reporting
|
805
|
+
and enterprise-grade assessment features.
|
806
|
+
|
807
|
+
Examples:
|
808
|
+
runbooks security assess --profile prod --language EN
|
809
|
+
runbooks security assess --language KR --output /reports
|
810
|
+
runbooks security check root-mfa --profile production
|
811
|
+
"""
|
812
|
+
if ctx.invoked_subcommand is None:
|
813
|
+
from runbooks.security import run_security_script
|
814
|
+
|
815
|
+
# Create mock args namespace for backward compatibility
|
816
|
+
import argparse
|
817
|
+
args = argparse.Namespace(
|
818
|
+
profile=profile,
|
819
|
+
language=language,
|
820
|
+
output=output
|
821
|
+
)
|
822
|
+
|
823
|
+
# Import and run the main security function
|
824
|
+
from runbooks.security.security_baseline_tester import SecurityBaselineTester
|
825
|
+
|
826
|
+
try:
|
827
|
+
console.print(f"[blue]🔒 AWS Security Baseline Assessment[/blue]")
|
828
|
+
console.print(f"[dim]Profile: {profile} | Language: {language} | Output: {output or './results'}[/dim]")
|
829
|
+
|
830
|
+
tester = SecurityBaselineTester(profile, language, output)
|
831
|
+
tester.run()
|
832
|
+
|
833
|
+
console.print(f"[green]✅ Security assessment completed successfully![/green]")
|
834
|
+
|
835
|
+
except Exception as e:
|
836
|
+
console.print(f"[red]❌ Error running security assessment: {e}[/red]")
|
837
|
+
raise click.ClickException(str(e))
|
838
|
+
|
839
|
+
|
840
|
+
@security.command()
|
841
|
+
@click.option(
|
842
|
+
"--profile",
|
843
|
+
default="default",
|
844
|
+
help="AWS IAM profile to use for authentication"
|
845
|
+
)
|
846
|
+
@click.option(
|
847
|
+
"--language",
|
848
|
+
type=click.Choice(["EN", "JP", "KR", "VN"]),
|
849
|
+
default="EN",
|
850
|
+
help="Language for security reports"
|
851
|
+
)
|
852
|
+
@click.option(
|
853
|
+
"--output",
|
854
|
+
help="Custom output directory for reports"
|
855
|
+
)
|
856
|
+
@click.option(
|
857
|
+
"--checks",
|
858
|
+
multiple=True,
|
859
|
+
help="Specific security checks to run (repeat for multiple)"
|
860
|
+
)
|
861
|
+
@click.option(
|
862
|
+
"--format",
|
863
|
+
type=click.Choice(["html", "json", "console"]),
|
864
|
+
default="html",
|
865
|
+
help="Output format for results"
|
866
|
+
)
|
867
|
+
@click.pass_context
|
868
|
+
def assess(ctx, profile, language, output, checks, format):
|
869
|
+
"""Run comprehensive security baseline assessment.
|
870
|
+
|
871
|
+
Evaluates AWS account against security best practices and generates
|
872
|
+
detailed reports with findings and remediation guidance.
|
873
|
+
|
874
|
+
Examples:
|
875
|
+
runbooks security assess --profile prod
|
876
|
+
runbooks security assess --language KR --format json
|
877
|
+
runbooks security assess --checks root_mfa --checks iam_password_policy
|
878
|
+
"""
|
879
|
+
try:
|
880
|
+
from runbooks.security.security_baseline_tester import SecurityBaselineTester
|
881
|
+
|
882
|
+
console.print(f"[blue]🔒 Running Security Baseline Assessment[/blue]")
|
883
|
+
console.print(f"[dim]Profile: {profile} | Language: {language} | Format: {format}[/dim]")
|
884
|
+
|
885
|
+
if checks:
|
886
|
+
console.print(f"[dim]Specific checks: {', '.join(checks)}[/dim]")
|
887
|
+
|
888
|
+
# Initialize and run security assessment
|
889
|
+
tester = SecurityBaselineTester(profile, language, output)
|
890
|
+
|
891
|
+
# TODO: Add support for specific checks filtering
|
892
|
+
# For now, run all checks
|
893
|
+
tester.run()
|
894
|
+
|
895
|
+
console.print(f"[green]✅ Security assessment completed![/green]")
|
896
|
+
|
897
|
+
# Display results summary
|
898
|
+
console.print(f"\n[bold]📊 Assessment Summary:[/bold]")
|
899
|
+
console.print(f"[green]• Report generated in {format.upper()} format[/green]")
|
900
|
+
console.print(f"[yellow]• Output directory: {output or './results'}[/yellow]")
|
901
|
+
console.print(f"[blue]• Language: {language}[/blue]")
|
902
|
+
|
903
|
+
except Exception as e:
|
904
|
+
console.print(f"[red]❌ Error running security assessment: {e}[/red]")
|
905
|
+
raise click.ClickException(str(e))
|
906
|
+
|
907
|
+
|
908
|
+
@security.command()
|
909
|
+
@click.argument("check_name")
|
910
|
+
@click.option(
|
911
|
+
"--profile",
|
912
|
+
default="default",
|
913
|
+
help="AWS IAM profile to use"
|
914
|
+
)
|
915
|
+
@click.option(
|
916
|
+
"--language",
|
917
|
+
type=click.Choice(["EN", "JP", "KR", "VN"]),
|
918
|
+
default="EN",
|
919
|
+
help="Language for output"
|
920
|
+
)
|
921
|
+
@click.pass_context
|
922
|
+
def check(ctx, check_name, profile, language):
|
923
|
+
"""Run a specific security check.
|
924
|
+
|
925
|
+
Available checks:
|
926
|
+
root_mfa, root_usage, root_access_key, iam_user_mfa,
|
927
|
+
iam_password_policy, direct_attached_policy, alternate_contacts,
|
928
|
+
trail_enabled, multi_region_trail, account_level_bucket_public_access,
|
929
|
+
bucket_public_access, cloudwatch_alarm_configuration,
|
930
|
+
multi_region_instance_usage, guardduty_enabled, trusted_advisor
|
931
|
+
|
932
|
+
Examples:
|
933
|
+
runbooks security check root_mfa --profile prod
|
934
|
+
runbooks security check iam_password_policy --language KR
|
935
|
+
"""
|
936
|
+
try:
|
937
|
+
console.print(f"[blue]🔍 Running security check: {check_name}[/blue]")
|
938
|
+
console.print(f"[dim]Profile: {profile} | Language: {language}[/dim]")
|
939
|
+
|
940
|
+
# TODO: Implement individual check execution
|
941
|
+
# For now, show available checks
|
942
|
+
available_checks = [
|
943
|
+
"root_mfa", "root_usage", "root_access_key", "iam_user_mfa",
|
944
|
+
"iam_password_policy", "direct_attached_policy", "alternate_contacts",
|
945
|
+
"trail_enabled", "multi_region_trail", "account_level_bucket_public_access",
|
946
|
+
"bucket_public_access", "cloudwatch_alarm_configuration",
|
947
|
+
"multi_region_instance_usage", "guardduty_enabled", "trusted_advisor"
|
948
|
+
]
|
949
|
+
|
950
|
+
if check_name not in available_checks:
|
951
|
+
console.print(f"[red]❌ Unknown check: {check_name}[/red]")
|
952
|
+
console.print(f"[yellow]Available checks:[/yellow]")
|
953
|
+
for check in available_checks:
|
954
|
+
console.print(f" • {check}")
|
955
|
+
raise click.ClickException(f"Invalid check name: {check_name}")
|
956
|
+
|
957
|
+
console.print(f"[yellow]⚠️ Individual check execution not yet implemented[/yellow]")
|
958
|
+
console.print(f"[blue]💡 Use 'runbooks security assess' to run all checks[/blue]")
|
959
|
+
|
960
|
+
except Exception as e:
|
961
|
+
console.print(f"[red]❌ Error running security check: {e}[/red]")
|
962
|
+
raise click.ClickException(str(e))
|
963
|
+
|
964
|
+
|
965
|
+
@security.command()
|
966
|
+
@click.pass_context
|
967
|
+
def list_checks(ctx):
|
968
|
+
"""List all available security checks."""
|
969
|
+
console.print(f"[blue]📋 Available Security Checks[/blue]")
|
970
|
+
console.print(f"[dim]These checks evaluate AWS account security against best practices[/dim]\n")
|
971
|
+
|
972
|
+
checks = {
|
973
|
+
"root_mfa": "Check if MFA is enabled for root account",
|
974
|
+
"root_usage": "Check root account usage patterns",
|
975
|
+
"root_access_key": "Check for root account access keys",
|
976
|
+
"iam_user_mfa": "Check MFA settings for IAM users",
|
977
|
+
"iam_password_policy": "Evaluate IAM password policy",
|
978
|
+
"direct_attached_policy": "Check for directly attached IAM policies",
|
979
|
+
"alternate_contacts": "Verify alternate contact information",
|
980
|
+
"trail_enabled": "Check if CloudTrail is enabled",
|
981
|
+
"multi_region_trail": "Check for multi-region CloudTrail",
|
982
|
+
"account_level_bucket_public_access": "Check S3 account-level public access",
|
983
|
+
"bucket_public_access": "Check individual S3 bucket public access",
|
984
|
+
"cloudwatch_alarm_configuration": "Verify CloudWatch alarm configuration",
|
985
|
+
"multi_region_instance_usage": "Check multi-region EC2 usage",
|
986
|
+
"guardduty_enabled": "Check if GuardDuty is enabled",
|
987
|
+
"trusted_advisor": "Check Trusted Advisor configuration"
|
988
|
+
}
|
989
|
+
|
990
|
+
for check_name, description in checks.items():
|
991
|
+
console.print(f"[cyan]{check_name:35}[/cyan] {description}")
|
992
|
+
|
993
|
+
console.print(f"\n[yellow]💡 Run individual checks:[/yellow]")
|
994
|
+
console.print(f" runbooks security check <check_name>")
|
995
|
+
console.print(f"\n[yellow]💡 Run all checks:[/yellow]")
|
996
|
+
console.print(f" runbooks security assess")
|
997
|
+
|
998
|
+
|
780
999
|
# ============================================================================
|
781
1000
|
# Main entry point - KISS principle: everything in one file
|
782
1001
|
# ============================================================================
|
@@ -2,25 +2,58 @@
|
|
2
2
|
|
3
3
|
## 📖 Overview
|
4
4
|
|
5
|
-
The **CloudOps Runbooks: Security Baseline Assessment** is a comprehensive tool designed to evaluate the security of AWS environments in accordance with basic security advisories. It provides a structured way to assess your account and workload configurations against **AWS security best practices** and the **AWS Startup Security Baseline (SSB)**.
|
5
|
+
The **CloudOps Runbooks: Security Baseline Assessment** is a comprehensive tool designed to evaluate the security of AWS environments in accordance with basic security advisories. It provides a structured way to assess your account and workload configurations against **AWS security best practices** and the **AWS Startup Security Baseline (SSB)**.
|
6
|
+
|
7
|
+
**Fully integrated with the CloudOps Runbooks CLI**, this tool offers enterprise-grade security assessment capabilities with multilingual reporting, parallel execution, and comprehensive remediation guidance. The tool is designed for DevOps teams, SRE engineers, and security professionals who need automated, actionable security insights.
|
6
8
|
|
7
9
|
By automating **15+ critical AWS account security and workload security checks**, this solution empowers startups, enterprises, and DevOps teams to validate their cloud security posture, generate actionable reports, and align with AWS Well-Architected principles.
|
8
10
|
|
11
|
+
Key capabilities include:
|
12
|
+
- **Enterprise CLI Integration**: Seamlessly integrated with `runbooks security` commands
|
13
|
+
- **Multilingual Reports**: Generate reports in English, Japanese, Korean, and Vietnamese
|
14
|
+
- **Parallel Execution**: Fast assessment with configurable worker pools
|
15
|
+
- **Rich Console Output**: Beautiful terminal output with progress indicators
|
16
|
+
- **Multiple Output Formats**: HTML reports with actionable remediation steps
|
17
|
+
|
9
18
|
In the **Test Report**, we provide numerous techniques for successfully responding to security threats on AWS with minimal resources. This script is appropriate for usage by early-stage businesses that cannot afford to invest much in security.
|
10
19
|
|
11
20
|
|
12
21
|
## ✨ Features: Core Capabilities
|
13
22
|
|
14
|
-
1.
|
15
|
-
-
|
16
|
-
|
17
|
-
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
|
23
|
-
|
23
|
+
1. **🚀 Enterprise CLI Integration**:
|
24
|
+
- Seamlessly integrated with `runbooks security` commands for professional workflows
|
25
|
+
- Rich console output with progress indicators and beautiful terminal formatting
|
26
|
+
- Unified CLI interface with other CloudOps tools (CFAT, inventory, organizations)
|
27
|
+
|
28
|
+
2. **🌍 Multilingual Reporting**:
|
29
|
+
- Generate reports in **4 languages**: English, Korean, Japanese, Vietnamese
|
30
|
+
- Localized error messages and remediation guidance
|
31
|
+
- Cultural context for international DevOps teams
|
32
|
+
|
33
|
+
3. **⚡ Performance & Scalability**:
|
34
|
+
- Parallel execution with configurable worker pools for faster assessments
|
35
|
+
- Modern dependency management with UV (Rust-based package manager)
|
36
|
+
- Optimized AWS API calls to minimize execution time
|
37
|
+
|
38
|
+
4. **📊 Comprehensive Security Coverage**:
|
39
|
+
- **15+ critical security checks** covering account, IAM, infrastructure, and operational security
|
40
|
+
- Validates IAM configurations, S3 bucket policies, VPC security groups, and CloudTrail settings
|
41
|
+
- Aligned with AWS Security Best Practices and Well-Architected Framework
|
42
|
+
|
43
|
+
5. **🔧 Multiple Output Formats**:
|
44
|
+
- **HTML reports** with interactive elements and remediation links
|
45
|
+
- **JSON output** for programmatic processing and CI/CD integration
|
46
|
+
- **Console output** for immediate feedback and debugging
|
47
|
+
|
48
|
+
6. **🛡️ Enterprise Security Features**:
|
49
|
+
- Support for multiple AWS authentication methods (IAM roles, SSO, CloudShell)
|
50
|
+
- Read-only permissions ensuring compliance with **least privilege principle**
|
51
|
+
- Audit trail and logging for compliance requirements
|
52
|
+
|
53
|
+
7. **🔄 CI/CD Integration Ready**:
|
54
|
+
- Designed for automated security scanning in pipelines
|
55
|
+
- JSON output format for integration with security dashboards
|
56
|
+
- Exit codes and structured logging for automation scripts
|
24
57
|
|
25
58
|
---
|
26
59
|
|
@@ -30,12 +63,14 @@ This modular structure ensures maintainability and supports seamless integration
|
|
30
63
|
|
31
64
|
```plaintext
|
32
65
|
src/runbooks/
|
33
|
-
├── security
|
66
|
+
├── security/ # Integrated security module
|
34
67
|
│ ├── checklist/ # Security check modules
|
35
68
|
│ │ ├── iam_password_policy.py # Checks IAM password policy
|
36
69
|
│ │ ├── bucket_public_access.py # Validates S3 bucket policies
|
70
|
+
│ │ ├── root_mfa.py # Root account MFA validation
|
71
|
+
│ │ ├── cloudtrail_enabled.py # CloudTrail configuration checks
|
37
72
|
│ │ └── ... # More checks for IAM, S3, CloudTrail, etc.
|
38
|
-
│ ├──
|
73
|
+
│ ├── utils/ # Core utilities and constants
|
39
74
|
│ │ ├── common.py # Shared helper functions
|
40
75
|
│ │ ├── enums.py # Enumerations for reporting
|
41
76
|
│ │ ├── language.py # Multi-language support
|
@@ -43,10 +78,14 @@ src/runbooks/
|
|
43
78
|
│ ├── config.json # Configurable parameters for checks
|
44
79
|
│ ├── permission.json # IAM policy for execution
|
45
80
|
│ ├── report_generator.py # HTML report generator
|
46
|
-
│ ├──
|
47
|
-
│
|
48
|
-
├──
|
49
|
-
│ └──
|
81
|
+
│ ├── security_baseline_tester.py # Core assessment engine
|
82
|
+
│ ├── run_script.py # Legacy script support
|
83
|
+
│ ├── __init__.py # Module exports and API
|
84
|
+
│ └── report_template_*.html # Multilingual report templates
|
85
|
+
├── cfat/ # Cloud Foundations Assessment Tool
|
86
|
+
├── inventory/ # Multi-account resource discovery
|
87
|
+
├── organizations/ # AWS Organizations management
|
88
|
+
└── main.py # Central CLI entry point
|
50
89
|
```
|
51
90
|
|
52
91
|
---
|
@@ -54,59 +93,96 @@ src/runbooks/
|
|
54
93
|
|
55
94
|
## 🚀 Deployment and Usage
|
56
95
|
|
57
|
-
The
|
96
|
+
The security baseline assessment is fully integrated into the CloudOps Runbooks CLI, providing enterprise-grade security assessment capabilities with a simple, intuitive interface.
|
58
97
|
|
59
|
-
>
|
98
|
+
> **⚡ Quick Start**: `pip install runbooks && runbooks security assess`
|
60
99
|
|
61
|
-
### **Option 1:
|
100
|
+
### **Option 1: Install via PyPI (Recommended)**
|
62
101
|
|
63
|
-
1. **
|
102
|
+
1. **Install the Package**:
|
103
|
+
```bash
|
104
|
+
pip install runbooks
|
105
|
+
```
|
106
|
+
|
107
|
+
2. **Run Security Assessment**:
|
64
108
|
```bash
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
2. **Run the Script**:
|
109
|
+
# Basic security assessment
|
110
|
+
runbooks security assess
|
111
|
+
|
112
|
+
# Assessment with specific AWS profile and language
|
113
|
+
runbooks security assess --profile production --language EN
|
114
|
+
|
115
|
+
# Generate Korean language report
|
116
|
+
runbooks security assess --language KR --output ./security-reports
|
117
|
+
```
|
118
|
+
|
119
|
+
3. **List Available Security Checks**:
|
78
120
|
```bash
|
79
|
-
|
121
|
+
runbooks security list-checks
|
80
122
|
```
|
81
123
|
|
82
124
|
---
|
83
125
|
|
84
|
-
### **Option 2:
|
126
|
+
### **Option 2: Development Installation**
|
127
|
+
|
128
|
+
1. **Clone the Repository**:
|
129
|
+
```bash
|
130
|
+
git clone https://github.com/1xOps/CloudOps-Runbooks.git
|
131
|
+
cd CloudOps-Runbooks
|
132
|
+
```
|
85
133
|
|
86
|
-
|
134
|
+
2. **Install Dependencies using UV** (Rust-based package manager):
|
87
135
|
```bash
|
88
|
-
|
136
|
+
# Install UV if not already installed
|
137
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
138
|
+
|
139
|
+
# Install dependencies and activate environment
|
140
|
+
uv sync --all-extras
|
89
141
|
```
|
90
142
|
|
91
|
-
|
143
|
+
3. **Run Security Assessment**:
|
92
144
|
```bash
|
93
|
-
|
145
|
+
uv run python -m runbooks security assess --profile PROFILE_NAME --language EN
|
94
146
|
```
|
95
147
|
|
96
148
|
---
|
97
149
|
|
98
|
-
### **Option 3:
|
150
|
+
### **Option 3: Using Task Automation**
|
151
|
+
|
152
|
+
1. **Prerequisites Check**:
|
153
|
+
```bash
|
154
|
+
task -d ~ check-tools
|
155
|
+
task -d ~ check-aws
|
156
|
+
```
|
99
157
|
|
100
|
-
|
101
|
-
|
102
|
-
|
158
|
+
2. **Install and Run**:
|
159
|
+
```bash
|
160
|
+
task install
|
161
|
+
task security.assess
|
162
|
+
```
|
103
163
|
|
104
|
-
|
105
|
-
- Create a Lambda function in the AWS Management Console or using AWS CLI.
|
106
|
-
- Attach the `permission.json` IAM policy to the function's execution role.
|
164
|
+
---
|
107
165
|
|
108
|
-
|
109
|
-
|
166
|
+
### **CLI Command Reference**
|
167
|
+
|
168
|
+
```bash
|
169
|
+
# Main security commands
|
170
|
+
runbooks security --help # Show security help
|
171
|
+
runbooks security assess # Run comprehensive assessment
|
172
|
+
runbooks security assess --profile prod # Use specific AWS profile
|
173
|
+
runbooks security assess --language KR # Generate Korean report
|
174
|
+
runbooks security assess --output /reports # Custom output directory
|
175
|
+
|
176
|
+
# Individual security checks
|
177
|
+
runbooks security check root_mfa # Check root MFA
|
178
|
+
runbooks security check iam_password_policy # Check IAM password policy
|
179
|
+
runbooks security list-checks # List all available checks
|
180
|
+
|
181
|
+
# Advanced usage
|
182
|
+
runbooks security assess --format html # HTML report (default)
|
183
|
+
runbooks security assess --format json # JSON output
|
184
|
+
runbooks security assess --format console # Console output only
|
185
|
+
```
|
110
186
|
|
111
187
|
---
|
112
188
|
|
@@ -255,23 +331,49 @@ Let’s work together to make cloud security accessible, effective, and scalable
|
|
255
331
|
|
256
332
|
---
|
257
333
|
|
258
|
-
### **
|
334
|
+
### **Quick Start Examples**
|
259
335
|
|
260
|
-
1. **
|
336
|
+
1. **Basic Security Assessment**:
|
261
337
|
```bash
|
262
|
-
|
338
|
+
runbooks security assess
|
263
339
|
```
|
264
340
|
|
265
|
-
2. **
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
```
|
341
|
+
2. **Assessment with Custom Profile and Language**:
|
342
|
+
```bash
|
343
|
+
runbooks security assess --profile production --language EN
|
344
|
+
```
|
270
345
|
- Supported languages: **English (EN)**, **Korean (KR)**, **Japanese (JP)**, **Vietnamese (VN)**.
|
271
346
|
|
272
|
-
3. **
|
273
|
-
|
274
|
-
|
347
|
+
3. **Generate Reports in Different Languages**:
|
348
|
+
```bash
|
349
|
+
# English report
|
350
|
+
runbooks security assess --language EN --output ./reports/english
|
351
|
+
|
352
|
+
# Korean report
|
353
|
+
runbooks security assess --language KR --output ./reports/korean
|
354
|
+
|
355
|
+
# Japanese report
|
356
|
+
runbooks security assess --language JP --output ./reports/japanese
|
357
|
+
|
358
|
+
# Vietnamese report
|
359
|
+
runbooks security assess --language VN --output ./reports/vietnamese
|
360
|
+
```
|
361
|
+
|
362
|
+
4. **View Results**:
|
363
|
+
- Upon completion, an HTML report will be generated in the specified output directory (default: `./results/`)
|
364
|
+
- The CLI provides rich console output with immediate feedback on security findings
|
365
|
+
- Reports include actionable remediation steps with links to AWS documentation
|
366
|
+
|
367
|
+
5. **List Available Security Checks**:
|
368
|
+
```bash
|
369
|
+
runbooks security list-checks
|
370
|
+
```
|
371
|
+
|
372
|
+
6. **Run Individual Security Checks** *(Coming Soon)*:
|
373
|
+
```bash
|
374
|
+
runbooks security check root_mfa
|
375
|
+
runbooks security check iam_password_policy
|
376
|
+
```
|
275
377
|
|
276
378
|
> 
|
277
379
|
|
@@ -306,19 +408,40 @@ To scan additional AWS accounts in the same organization, you must:
|
|
306
408
|
|
307
409
|
---
|
308
410
|
|
309
|
-
### **4. Can I use this
|
411
|
+
### **4. Can I use this tool without an IAM Access Key?**
|
412
|
+
|
413
|
+
Yes, you can run the security assessment without an IAM Access Key by leveraging IAM roles.
|
414
|
+
The integrated `runbooks security` CLI fully supports IAM roles and various AWS authentication methods.
|
310
415
|
|
311
|
-
|
312
|
-
|
416
|
+
**Supported Authentication Methods**:
|
417
|
+
1. **IAM Roles** (Recommended): Configure and use IAM roles instead of access keys
|
418
|
+
2. **AWS SSO**: Use AWS Single Sign-On for centralized authentication
|
419
|
+
3. **Environment Variables**: Set AWS credentials via environment variables
|
420
|
+
4. **Instance Profiles**: Automatically use instance profiles when running on EC2
|
421
|
+
5. **AWS CloudShell**: Run directly in AWS CloudShell without any setup
|
313
422
|
|
314
|
-
|
315
|
-
|
316
|
-
|
423
|
+
**Setup Examples**:
|
424
|
+
|
425
|
+
**Using IAM Roles**:
|
426
|
+
1. Configure a role profile in AWS CLI: [IAM roles guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html#cli-role-overview)
|
427
|
+
2. Run the assessment:
|
428
|
+
```bash
|
429
|
+
runbooks security assess --profile ROLE_PROFILE_NAME --language EN
|
430
|
+
```
|
431
|
+
|
432
|
+
**Using AWS SSO**:
|
433
|
+
1. Configure SSO profile: `aws configure sso`
|
434
|
+
2. Run the assessment:
|
435
|
+
```bash
|
436
|
+
runbooks security assess --profile sso-profile --language EN
|
437
|
+
```
|
317
438
|
|
439
|
+
**Using AWS CloudShell**:
|
318
440
|
```bash
|
319
|
-
|
441
|
+
pip install runbooks
|
442
|
+
runbooks security assess --language EN
|
320
443
|
```
|
321
444
|
|
322
|
-
This approach enhances security by reducing the dependency on long-term access keys.
|
445
|
+
This approach enhances security by reducing the dependency on long-term access keys and provides enterprise-grade authentication options.
|
323
446
|
|
324
447
|
---
|