Files
mukul975 27c6414ca5 Add folder anatomy (scripts/agent.py + references/api-reference.md) for 648 cybersecurity skills
Complete skill folder anatomy across all cybersecurity skills:
- scripts/agent.py: 80-150 line Python agents using real libraries (impacket,
  boto3, azure-mgmt-*, kubernetes, pefile, yara, scapy, shodan, stix2, etc.)
- references/api-reference.md: real API documentation with method signatures
- LICENSE: MIT license for all skill folders
2026-03-10 21:02:12 +01:00

1.9 KiB

API Reference: Auditing Cloud with CIS Benchmarks

boto3 - AWS CIS Checks

IAM Account Summary (Root Keys, MFA)

import boto3
iam = boto3.client("iam")
summary = iam.get_account_summary()["SummaryMap"]
print("Root access keys:", summary["AccountAccessKeysPresent"])
print("Root MFA:", summary["AccountMFAEnabled"])

Password Policy

policy = iam.get_account_password_policy()["PasswordPolicy"]
print("Min length:", policy["MinimumPasswordLength"])
print("Require symbols:", policy["RequireSymbols"])

CloudTrail Multi-Region

ct = boto3.client("cloudtrail")
trails = ct.describe_trails()["trailList"]
for t in trails:
    print(t["Name"], "Multi-region:", t["IsMultiRegionTrail"])

VPC Flow Logs

ec2 = boto3.client("ec2")
vpcs = ec2.describe_vpcs()["Vpcs"]
flow_logs = ec2.describe_flow_logs()["FlowLogs"]
logged = {fl["ResourceId"] for fl in flow_logs}
for vpc in vpcs:
    print(vpc["VpcId"], "Logged:" if vpc["VpcId"] in logged else "MISSING")

CIS Controls Quick Reference

CIS Control boto3 Method Check
1.4 Root keys iam.get_account_summary() AccountAccessKeysPresent == 0
1.5 Root MFA iam.get_account_summary() AccountMFAEnabled == 1
2.1.1 S3 encryption s3.get_bucket_encryption() No ClientError
3.1 CloudTrail ct.describe_trails() IsMultiRegionTrail
5.1 VPC flow logs ec2.describe_flow_logs() All VPCs covered
5.4 Default SG ec2.describe_security_groups() No 0.0.0.0/0 rules

Prowler CLI

prowler aws --compliance cis_5.0_aws --output-formats json,csv
prowler azure --compliance cis_4.0_azure
prowler gcp --compliance cis_4.0_gcp

References