Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implementing Cloud Security Posture Management (CSPM) to continuously monitor multi-cloud environments for misconfigurations, compliance violations, and security risks using Prowler, ScoutSuite, AWS Security Hub, Azure Defender, and GCP Security Command Center.
.claude/skills/implementing-cloud-security-posture-management/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 66% | 0% |
| case-07 | ✓→✓ | = Same ✓ | 108% | 0% |
Do not use for runtime workload protection (use CWPP tools like Falco or Aqua), for application security testing (use DAST/SAST tools), or for network intrusion detection (use cloud-native IDS like GuardDuty or Network Watcher).
pip install prowler)pip install scoutsuite)Enable the built-in CSPM capabilities in each cloud provider for baseline posture assessment.
bash# AWS: Enable Security Hub with FSBP and CIS standards aws securityhub enable-security-hub --enable-default-standards aws securityhub batch-enable-standards --standards-subscription-requests \ '[{"StandardsArn":"arn:aws:securityhub:::standards/cis-aws-foundations-benchmark/v/1.4.0"}]' # Azure: Enable Microsoft Defender for Cloud (CSPM tier) az security pricing create --name CloudPosture --tier standard az security auto-provisioning-setting update --name default --auto-provision on # GCP: Enable Security Command Center Premium gcloud services enable securitycenter.googleapis.com gcloud scc settings update --organization=ORG_ID \ --enable-asset-discovery
Execute Prowler to perform comprehensive security checks across all three cloud providers.
bash# AWS assessment with all CIS checks prowler aws \ --profile production \ -M json-ocsf csv html \ -o ./prowler-results/aws/ \ --compliance cis_1.4_aws cis_1.5_aws # Azure assessment prowler azure \ --subscription-ids SUB_ID_1 SUB_ID_2 \ -M json-ocsf csv html \ -o ./prowler-results/azure/ \ --compliance cis_2.0_azure # GCP assessment prowler gcp \ --project-ids project-1 project-2 \ -M json-ocsf csv html \ -o ./prowler-results/gcp/ \ --compliance cis_2.0_gcp # View summary across all providers prowler aws --list-compliance
Use ScoutSuite for a unified multi-cloud security assessment with visual reporting.
bash# Scan AWS python3 -m ScoutSuite aws --profile production \ --report-dir ./scoutsuite/aws/ # Scan Azure python3 -m ScoutSuite azure --cli \ --all-subscriptions \ --report-dir ./scoutsuite/azure/ # Scan GCP python3 -m ScoutSuite gcp --user-account \ --all-projects \ --report-dir ./scoutsuite/gcp/ # Each produces an HTML report with risk-scored findings
Create a scheduled pipeline that runs CSPM checks daily and routes findings to appropriate channels.
bash# Create a daily Prowler scan with EventBridge + CodeBuild (AWS) cat > buildspec.yml << 'EOF' version: 0.2 phases: install: commands: - pip install prowler build: commands: - prowler aws -M json-ocsf -o s3://security-findings-bucket/prowler/$(date +%Y%m%d)/ - prowler aws --compliance cis_1.5_aws -M csv -o s3://security-findings-bucket/prowler/compliance/ post_build: commands: - | CRITICAL=$(cat output/*.json | grep -c '"CRITICAL"') if [ "$CRITICAL" -gt 0 ]; then aws sns publish --topic-arn arn:aws:sns:us-east-1:ACCOUNT:security-alerts \ --subject "Prowler: $CRITICAL critical findings" \ --message "Review at s3://security-findings-bucket/prowler/$(date +%Y%m%d)/" fi EOF # Schedule with EventBridge aws events put-rule \ --name daily-prowler-scan \ --schedule-expression "cron(0 6 * * ? *)" \ --state ENABLED
Aggregate findings from multiple CSPM tools and cloud providers into a unified view.
python# findings_aggregator.py - Normalize and deduplicate CSPM findings import json import hashlib from datetime import datetime def normalize_finding(finding, source): """Normalize findings from different CSPM tools to a common format.""" normalized = { 'id': hashlib.sha256(f"{finding.get('ResourceId','')}{finding.get('CheckId','')}".encode()).hexdigest()[:16], 'source': source, 'cloud': finding.get('Provider', 'unknown'), 'account': finding.get('AccountId', finding.get('SubscriptionId', '')), 'region': finding.get('Region', ''), 'resource_type': finding.get('ResourceType', ''), 'resource_id': finding.get('ResourceId', ''), 'severity': finding.get('Severity', 'INFO').upper(), 'status': finding.get('Status', 'FAIL'), 'title': finding.get('CheckTitle', finding.get('Title', '')), 'description': finding.get('StatusExtended', ''), 'compliance': finding.get('Compliance', {}), 'remediation': finding.get('Remediation', {}).get('Recommendation', {}).get('Text', ''), 'timestamp': datetime.utcnow().isoformat() } return normalized def aggregate_findings(prowler_file, scoutsuite_file): findings = {} for file_path, source in [(prowler_file, 'prowler'), (scoutsuite_file, 'scoutsuite')]: with open(file_path) as f: for line in f: raw = json.loads(line) normalized = normalize_finding(raw, source) if normalized['status'] == 'FAIL': findings[normalized['id']] = normalized return sorted(findings.values(), key=lambda x: {'CRITICAL':0,'HIGH':1,'MEDIUM':2,'LOW':3}.get(x['severity'],4))
Set up automated responses to configuration drift that violates security baselines.
bash# AWS Config auto-remediation for non-compliant S3 buckets aws configservice put-remediation-configurations --remediation-configurations '[{ "ConfigRuleName": "s3-bucket-public-read-prohibited", "TargetType": "SSM_DOCUMENT", "TargetId": "AWS-DisableS3BucketPublicReadWrite", "Parameters": { "S3BucketName": {"ResourceValue": {"Value": "RESOURCE_ID"}} }, "Automatic": true, "MaximumAutomaticAttempts": 3, "RetryAttemptSeconds": 60 }]' # Azure Policy for auto-remediation az policy assignment create \ --name "enforce-storage-encryption" \ --policy "/providers/Microsoft.Authorization/policyDefinitions/404c3081-a854-4457-ae30-26a93ef643f9" \ --scope "/subscriptions/SUB_ID" \ --enforcement-mode Default # GCP Organization Policy constraint gcloud resource-manager org-policies set-policy policy.yaml --organization=ORG_ID # policy.yaml: constraint: constraints/storage.publicAccessPrevention, enforcement: true
| Term | Definition | |------|------------| | CSPM | Cloud Security Posture Management, the practice of continuously monitoring cloud infrastructure for misconfigurations and compliance violations | | Configuration Drift | Unintended changes to cloud resource configurations that deviate from the approved security baseline over time | | Security Baseline | A documented set of minimum security configuration requirements that all cloud resources must meet | | Compliance Framework | A structured set of security controls and requirements (CIS, SOC 2, PCI DSS, NIST) against which cloud configurations are evaluated | | Finding Severity | Risk classification of a misconfiguration based on exploitability and potential impact (Critical, High, Medium, Low, Informational) | | Auto-Remediation | Automated corrective action that restores a non-compliant resource to its required configuration without manual intervention |
Context: An enterprise runs production workloads across AWS (primary), Azure (identity and Microsoft services), and GCP (data analytics). The security team needs unified posture visibility.
Approach:
Pitfalls: Running CSPM tools with overly broad permissions creates a high-value target. Use dedicated service accounts with read-only permissions and rotate credentials regularly. Different CSPM tools may report the same misconfiguration differently, so deduplication logic must account for varying resource ID formats and finding titles across tools.
Cloud Security Posture Management Dashboard
==============================================
Organization: Acme Corp
Assessment Date: 2026-02-23
Environments: AWS (12 accounts), Azure (8 subscriptions), GCP (5 projects)
POSTURE SCORES:
AWS: 82/100 (+3 from last week)
Azure: 76/100 (-1 from last week)
GCP: 79/100 (+5 from last week)
Overall: 79/100
FINDINGS BY SEVERITY:
Critical: 18 (AWS: 7, Azure: 8, GCP: 3)
High: 67 (AWS: 28, Azure: 24, GCP: 15)
Medium: 234 (AWS: 98, Azure: 87, GCP: 49)
Low: 412 (AWS: 178, Azure: 134, GCP: 100)
TOP FAILING CATEGORIES:
1. IAM overly permissive policies (43 findings)
2. Encryption not enabled at rest (38 findings)
3. Public network exposure (29 findings)
4. Logging and monitoring gaps (24 findings)
5. Unused credentials and keys (19 findings)
AUTO-REMEDIATION (Last 7 Days):
Findings auto-remediated: 34
Manual remediation pending: 51
Exceptions approved: 8| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 27,392 | 24,882 | -9% | 1 | 1 | 0% | 6,228 | 8,159 | +31% | 0 | 0 | — |
case-02 | fail→pass | 28,313 | 28,243 | -0% | 1 | 1 | 0% | 6,233 | 9,143 | +47% | 0 | 0 | — |
case-03 | fail→pass | 28,855 | 24,166 | -16% | 1 | 1 | 0% | 6,228 | 8,182 | +31% | 0 | 0 | — |
case-04 | fail→fail | 14,101 | 10,751 | -24% | 1 | 1 | 0% | 2,791 | 5,055 | +81% | 0 | 0 | — |
case-05 | fail→fail | 18,808 | 11,375 | -40% | 1 | 1 | 0% | 2,346 | 4,009 | +71% | 0 | 0 | — |
case-06 | fail→fail | 15,389 | 15,586 | +1% | 1 | 1 | 0% | 3,032 | 5,966 | +97% | 0 | 0 | — |
case-07 | pass→pass | 14,135 | 9,391 | -34% | 1 | 1 | 0% | 2,285 | 4,750 | +108% | 0 | 0 | — |
case-08 | fail→fail | 9,447 | 8,439 | -11% | 1 | 1 | 0% | 1,688 | 4,437 | +163% | 0 | 0 | — |
case-09 | pass→pass | 12,029 | 4,724 | -61% | 1 | 1 | 0% | 2,311 | 3,807 | +65% | 0 | 0 | — |
case-10 | fail→fail | 6,491 | 3,878 | -40% | 1 | 1 | 0% | 1,313 | 3,672 | +180% | 0 | 0 | — |
case-11 | pass→pass | 9,438 | 5,849 | -38% | 1 | 1 | 0% | 1,886 | 4,121 | +119% | 0 | 0 | — |
case-12 | fail→fail | 7,017 | 3,916 | -44% | 1 | 1 | 0% | 1,337 | 3,655 | +173% | 0 | 0 | — |
case-13 | fail→fail | 15,363 | 11,923 | -22% | 1 | 1 | 0% | 3,194 | 5,362 | +68% | 0 | 0 | — |
case-14 | fail→fail | 17,819 | 11,810 | -34% | 1 | 1 | 0% | 3,499 | 5,238 | +50% | 0 | 0 | — |
case-15 | fail→pass | 12,990 | 6,082 | -53% | 1 | 1 | 0% | 2,440 | 4,051 | +66% | 0 | 0 | — |
case-16 | fail→fail | 8,000 | 5,067 | -37% | 1 | 1 | 0% | 1,768 | 4,023 | +128% | 0 | 0 | — |
case-17 | fail→fail | 12,026 | 8,204 | -32% | 1 | 1 | 0% | 2,317 | 4,440 | +92% | 0 | 0 | — |
case-18 | fail→fail | 9,198 | 6,317 | -31% | 1 | 1 | 0% | 1,724 | 4,118 | +139% | 0 | 0 | — |
case-19 | fail→fail | 15,532 | 13,349 | -14% | 1 | 1 | 0% | 2,571 | 5,308 | +106% | 0 | 0 | — |
case-20 | fail→fail | 4,874 | 4,180 | -14% | 1 | 1 | 0% | 988 | 3,775 | +282% | 0 | 0 | — |
case-21 | pass→pass | 6,102 | 3,375 | -45% | 1 | 1 | 0% | 1,221 | 3,498 | +186% | 0 | 0 | — |
case-22 | fail→fail | 5,141 | 2,618 | -49% | 1 | 1 | 0% | 978 | 3,384 | +246% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.