Skip to content

opensite-ai/opensite-skills / aws-security

aws-security

Verified

Covers AWS security services and workflows — Security Hub V2 (OCSF) findings, connectors, aggregators, automation rules, and security posture summaries; Security Hub CSPM (V1/ASFF) controls and compliance standards; GuardDuty threat findings; Inspector vulnerability findings; Macie sensitive data findings; Detective investigation; and Security Lake configuration and data aggregation. Applicable when questions involve security posture, Exposure findings, CSPM failed controls, threat findings, vulnerability findings, sensitive data findings, automation rules, or cross-service security configuration across AWS environments. Procedures use standard AWS CLI syntax and work with or without the AWS MCP server.

references/macie-findings.md

View on GitHub
# Summarizing Macie Findings

## Overview

Produces structured summaries of Amazon Macie findings across severity, type, bucket, and sensitive data categories. Provides statistics and overview tables without performing investigation or remediation.

Works from both standalone accounts and delegated administrator accounts.

## Classify the Request

| User intent | Workflow |
|---|---|
| "How many findings do I have?" | A: Account Findings Summary |
| "What types of sensitive data were found?" | A then B |
| "Show findings by bucket/severity" | A: Account Findings Summary |
| "Summarize data classification results" | A then B |

## Workflow A: Account Findings Summary

1. Get statistics by severity:

   ```bash
   aws macie2 get-finding-statistics --group-by severity.description
   ```

2. Get statistics by type:

   ```bash
   aws macie2 get-finding-statistics --group-by type
   ```

3. Get statistics by bucket:

   ```bash
   aws macie2 get-finding-statistics --group-by "resourcesAffected.s3Bucket.name"
   ```

4. List findings sorted by severity:

   ```bash
   aws macie2 list-findings --sort-criteria '{"attributeName":"severity.score","orderBy":"DESC"}' --max-results 50
   ```

5. Get finding details (batch, max 50):

   ```bash
   aws macie2 get-findings --finding-ids <id1> <id2> ...
   ```

6. Check usage:

   ```bash
   aws macie2 get-usage-totals
   ```

7. Present summary:

   | Severity | Count |
   |---|---|
   | High | X |
   | Medium | Y |
   | Low | Z |

   | Finding Type | Count |
   |---|---|
   | SensitiveData:S3Object/... | X |

   | Top Affected Buckets | Finding Count |
   |---|---|
   | bucket-name | X |

## Workflow B: Sensitive Data Overview

If Workflow A returns zero findings, skip and report no sensitive data detections.

1. To investigate a specific resource from Workflow A results, use the `resourcesAffected.s3Bucket.arn` or `resourcesAffected.s3Object.key` from the finding detail.

2. List resource profile detections:

   ```bash
   aws macie2 list-resource-profile-detections --resource-arn <arn>
   ```

3. Check sensitive data availability:

   ```bash
   aws macie2 get-sensitive-data-occurrences-availability --finding-id <finding-id>
   ```

4. Summarize categories:

   - Financial (credit cards, bank accounts)
   - PII (names, addresses, SSNs)
   - Credentials (API keys, passwords)
   - Custom identifiers

5. Present overview:

   | Category | Buckets Affected | Detection Count |
   |---|---|---|
   | Financial | X | Y |
   | PII | X | Y |
   | Credentials | X | Y |

## Constraints

- MUST NOT perform investigation or root cause analysis
- MUST NOT perform remediation or suggest bucket policy changes
- MUST NOT retrieve actual sensitive data samples (only metadata/statistics)
- MUST present results as structured tables
- SHOULD use get-finding-statistics for aggregations (not iterating all findings)
- SHOULD batch get-findings calls (max 50 per request)

## Troubleshooting

| Symptom | Resolution |
|---|---|
| AccessDeniedException | Macie not enabled or insufficient permissions |
| ValidationException on list-findings | Use attributeName "severity.score" with orderBy "DESC" |
| Empty get-finding-statistics | No findings — report zero findings as clean posture |

## Output Sensitivity

Finding details contain S3 bucket names, object keys where sensitive data was detected, sensitive data category counts (PII types, financial data, credentials), and bucket access permissions. Present the severity/type summary and affected bucket counts first. Display full finding details only when the caller explicitly requests raw output. Never include actual sensitive data samples.
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: 472kUpdated 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: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated 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: 194kUpdated Claude CodeCodexVerifiedInstall