Skip to content

SSZcreate/Pentab_server / .agents/skills/cybersecurity/skills/implementing-cloud-vulnerability-posture-management

implementing-cloud-vulnerability-posture-management

Verified

Implement multi-cloud CSPM to detect cloud-native misconfigurations and vulnerabilities (IAM over-permissions, exposed storage, unencrypted data, missing network controls) using AWS Security Hub, Azure Defender for Cloud, and open-source Prowler and ScoutSuite scans, then aggregate results across clouds. Use when auditing multi-cloud environments for misconfiguration-driven vulnerabilities or building a consolidated cross-cloud posture report.

FileKindSize
LICENSEother11.0 KB
SKILL.mdskill md7.6 KB
assets/template.mdmarkdown1.4 KB
references/api-reference.mdmarkdown1.7 KB
references/standards.mdmarkdown1.6 KB
references/workflows.mdmarkdown1.3 KB
scripts/agent.pyscript5.3 KB
scripts/process.pyscript7.5 KB

references/api-reference.md

View on GitHub
# API Reference: Cloud Security Posture Management Agent

## Dependencies

| Library | Version | Purpose |
|---------|---------|---------|
| boto3 | >=1.28 | AWS SDK for Security Hub findings and compliance |
| prowler | >=4.0 | Open-source cloud security scanner (optional, via subprocess) |

## CLI Usage

```bash
python scripts/agent.py \
  --profile security-audit \
  --region us-east-1 \
  --output-dir /reports/ \
  --output cspm_report.json
```

## Functions

### `get_securityhub_client(profile, region)`
Creates boto3 Security Hub client.

### `get_findings_summary(client, max_results) -> dict`
Calls `client.get_findings()` filtered to NEW/ACTIVE findings, groups by severity.

### `get_compliance_summary(client) -> list`
Calls `client.get_enabled_standards()` then `describe_standards_controls()` per standard. Returns compliance percentages.

### `run_prowler_scan(profile, region) -> dict`
Executes `prowler aws --output-formats json` via subprocess with 10-minute timeout.

### `generate_report(client, profile, region) -> dict`
Combines Security Hub and Prowler results into unified CSPM report.

## boto3 Security Hub Methods

| Method | Purpose |
|--------|---------|
| `get_findings(Filters, MaxResults)` | Retrieve active findings |
| `get_enabled_standards()` | List enabled compliance standards |
| `describe_standards_controls(StandardsSubscriptionArn)` | Control-level compliance |

## Output Schema

```json
{
  "summary": {"finding_counts": {"CRITICAL": 3, "HIGH": 12}, "total_findings": 45},
  "compliance_standards": [{"standard": "cis-aws-foundations-benchmark", "compliance_pct": 78.5}],
  "recommendations": ["Remediate 3 CRITICAL findings immediately"]
}
```
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 465kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 465kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 465kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 192kUpdated Claude CodeCodexVerifiedInstall