opensite-ai/opensite-skills / aws-security
aws-security
VerifiedCovers 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/detective-configuration.md
View on GitHub# Reviewing Detective Configuration
## Overview
Audits Amazon Detective configuration across single accounts and organizations. Checks behavior graph existence, data source enablement, member account coverage, and invitation status. Results are presented as a configuration state summary.
Detective ingests CloudTrail management events, VPC Flow Logs, EKS Audit Logs, and Security Hub findings to build behavior graphs for investigation. Detective does NOT support S3 data events.
Works from both standalone accounts and delegated administrator accounts.
## Classify the Request
| Signal | Workflow |
|--------|----------|
| Single account, no org context | A: Review Single Account |
| Org admin, multi-account coverage | B: Review Organization Coverage |
| "Is Detective set up correctly?" | A then B if org |
## Workflow A: Review Single Account
1. List behavior graphs:
```bash
aws detective list-graphs
```
Configured: at least one graph. Not Configured: no graphs.
2. For each graph, check data source packages:
```bash
aws detective list-datasource-packages --graph-arn <graph-arn>
```
Expected packages:
- DETECTIVE_CORE (CloudTrail management events)
- EKS_AUDIT (EKS Audit Logs)
- ASFF_SECURITYHUB_FINDING (Security Hub findings)
For each: STARTED = Configured, STOPPED/DISABLED = Not Configured.
3. List members:
```bash
aws detective list-members --graph-arn <graph-arn>
```
Check each member status: ENABLED, VERIFICATION_FAILED, VERIFICATION_IN_PROGRESS.
4. Check pending invitations (from member perspective):
```bash
aws detective list-invitations
```
**Security check:** Verify CloudTrail is enabled and logging Detective API calls (`detective:*` events) for audit purposes.
5. Present results:
| Check | Status |
|---|---|
| Behavior Graph Exists | Configured / Not Configured |
| CloudTrail Logs | Enabled / Disabled / Not Configured |
| EKS Audit Logs | Enabled / Disabled / Not Configured |
| Security Hub Findings | Enabled / Disabled / Not Configured |
| Member Count | X members |
| Members Enabled | X/Y enabled |
## Workflow B: Review Organization Coverage
1. Identify admin:
```bash
aws detective list-organization-admin-accounts
```
2. Check organization configuration:
```bash
aws detective describe-organization-configuration --graph-arn <graph-arn>
```
Configured: autoEnable is true.
3. For quick membership signal, `describe-organization-configuration` confirms auto-enable for new accounts. Full member enumeration requires `list-members` pagination — expensive for large organizations.
4. (ONLY if user explicitly requests per-account detail):
```bash
aws detective list-members --graph-arn <graph-arn>
```
Evaluate: ENABLED, VERIFICATION_FAILED, INVITED (not accepted), DISABLED.
5. Check data source packages on admin graph (step 3 from Workflow A).
6. Present results:
| Check | Status |
|---|---|
| Delegated Admin Configured | Configured / Not Configured |
| Auto-Enable New Accounts | Enabled / Not Enabled |
| Member Accounts | Enrolled (details on request) |
| Data Sources Enabled | X/Y packages |
## Constraints
- MUST NOT modify any Detective configuration
- MUST NOT perform entity investigation or finding analysis
- MUST NOT paginate through all member accounts by default
- MUST only enumerate individual member status if user explicitly requests it
- SHOULD check all available data source packages
- MAY report graph creation date for context
## Troubleshooting
| Error | Resolution |
|-------|------------|
| AccessDeniedException on list-graphs | Detective not enabled — report as NOT_CONFIGURED |
| ValidationException on list-members | Invalid graph ARN — re-fetch from list-graphs |
| Empty list-graphs response | Detective not enabled in region |
| AccessDeniedException on describe-organization-configuration | Not an org admin — switch to Workflow A |
## Output Sensitivity
Configuration output reveals behavior graph ARNs, member account IDs and invitation status, enabled data source packages, and organization auto-enable settings. Present configuration summary first; offer raw API responses on request.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |