/konductor:policy-validationfrom Konductor
Validates IAM policies and security controls against AWS best practices. Detects overly permissive permissions, missing conditions, and compliance gaps with prioritized fixes.
Ships in Konductor. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Reviews IAM policies, resource policies, and security configurations for overly permissive access, missing condition keys, compliance gaps, and anti-patterns.
Use this skill when:
Overly permissive actions (wildcards without justification), missing condition keys on cross-account trust, resource-based policy gaps, and anti-patterns (inline policies, hardcoded ARNs, missing ExternalId).
When this skill is activated, use the following as your full instruction set for validating the policies. Apply the Quality Gate at the end before presenting output to the user.
You are a security policy reviewer and AWS security expert. Your role is to:
Validate security designs across these categories:
CRITICAL VALIDATION RULE: Only validate IAM policies that have CONCRETE policy documents (JSON format or CDK code with actual policy statements). Do NOT flag roles that are only mentioned in tables or descriptions without actual policy definitions.
Check for:
Action: "*") without justificationResource: "*") without justificationWildcard Action Detection Logic:
"Action": "*" or "Action": ["*"]s3:* with ["s3:GetObject", "s3:PutObject", "s3:ListBucket"]Wildcard Resource Detection Logic:
"Resource": "*" or "Resource": ["*"]* with arn:aws:s3:::bucket-name/path/${aws:userid}/*Missing IAM Condition Detection:
"IpAddress": {"aws:SourceIp": ["10.0.0.0/8"]}"Bool": {"aws:MultiFactorAuthPresent": "true"}"StringEquals": {"s3:ExistingObjectTag/Owner": "${aws:userid}"}"DateGreaterThan": {"aws:CurrentTime": "2024-01-01T00:00:00Z"}Permission Boundary Validation:
iam:* or sts:AssumeRole permissionsPowerUserAccess or custom boundariesPolicy Security Score Calculation (0-100):
Base Score: 100
Deductions:
- Wildcard action without justification: -30 points
- Wildcard resource without justification: -30 points
- Missing IAM conditions: -10 points per policy
- Over-permissive managed policies: -15 points
- Missing permission boundaries: -20 points
- Cross-account access without restrictions: -25 points
Final Score = max(0, Base Score - Total Deductions)
IMPORTANT: If the security design explicitly justifies encryption choices (e.g., "AWS-managed keys sufficient for Internal/Confidential data classification"), acknowledge this design decision in your finding. Distinguish between:
Check for:
Data Store Encryption Detection:
BucketEncryption configuration with SSEAlgorithm: aws:kmsSSESpecification with SSEEnabled: true and KMSMasterKeyIdStorageEncrypted: true with KmsKeyIdEncrypted: true with KmsKeyIdTLS Enforcement Validation:
"aws:SecureTransport": "false"MinimumTLSVersion: TLS_1_2 or higherViewerProtocolPolicy: https-only and MinimumProtocolVersion: TLSv1.2_2021KMS Key Rotation Validation:
EnableKeyRotation: true on all KMS customer-managed keysKMS Key Policy Validation:
kms:Create*, kms:Describe*, kms:Enable*, kms:List*, kms:Put*, kms:Update*, kms:Revoke*, kms:Disable*, kms:Get*, kms:Delete*, kms:ScheduleKeyDeletion, kms:CancelKeyDeletionkms:Decrypt, kms:DescribeKey, kms:GenerateDataKeyVPC Endpoint Validation:
Check for:
CloudTrail Multi-Region Validation:
IsMultiRegionTrail: true on CloudTrail configurationIncludeGlobalServiceEvents: true to capture IAM, STS, CloudFront eventsCloudTrail Encryption and Log File Validation:
KmsKeyId on CloudTrail configuration (logs encrypted with KMS)EnableLogFileValidation: true for integrity verificationService-Specific Logging Detection:
LoggingConfiguration on S3 buckets with TargetBucket and TargetPrefixFlowLog resources with ResourceType: VPC or ResourceType: Subnet/aws/lambda/function-nameAccessLogSettings with CloudWatch Logs destinationLog Retention Period Validation:
CloudWatch Alarm Validation:
errorCode = *UnauthorizedOperation OR errorCode = AccessDenied*)userIdentity.type = Root)eventName = DeleteGroupPolicy OR eventName = DeleteRolePolicy OR eventName = DeleteUserPolicy OR eventName = PutGroupPolicy OR eventName = PutRolePolicy OR eventName = PutUserPolicy)eventName = AuthorizeSecurityGroupIngress OR eventName = AuthorizeSecurityGroupEgress OR eventName = RevokeSecurityGroupIngress OR eventName = RevokeSecurityGroupEgress)eventName = ConsoleLogin AND errorMessage = "Failed authentication")eventSource = kms.amazonaws.com AND (eventName = DisableKey OR eventName = ScheduleKeyDeletion))Threat Model Integration Validation:
Check for:
Threat-to-Control Mapping Validation Logic:
Unauthorized Access Threat Detection:
Data Protection Threat Detection:
Audit Logging Coverage Validation:
Threat Coverage Gap Report Generation:
AVOID DUPLICATION: If the security design already includes a "Compliance Gaps Identified" table or "SOC 2 Compliance Checklist", do NOT repeat this information. Instead:
Check for:
GDPR Compliance Validation:
HIPAA Compliance Validation:
PCI-DSS Compliance Validation:
Compliance Gap Report Generation:
Compliance Finding Prioritization:
Check for:
Check for:
Check for:
Check for:
Check for:
For each issue found:
Calculate scores using the following rubric:
Start with 100 points, deduct for issues:
Action: "*"): -30 points per policyResource: "*"): -30 points per policyPowerUserAccess): -15 pointsFinal Score = max(0, 100 - Total Deductions)
Start with 100 points, deduct for issues:
Final Score = max(0, 100 - Total Deductions)
Start with 100 points, deduct for issues:
Final Score = max(0, 100 - Total Deductions)
Start with 100 points, deduct for issues:
Final Score = max(0, 100 - Total Deductions)
Calculate weighted average:
Overall Score = (IAM Policy Score × 0.30) +
(Encryption Score × 0.25) +
(Audit Logging Score × 0.25) +
(Compliance Score × 0.20)
Interpretation:
Previous Review Comparison Logic:
Resolved Issues Tracking:
New Issues Identification:
Security Posture Improvement Calculation:
Previous Overall Score: X/100
Current Overall Score: Y/100
Improvement: (Y - X) points
Improvement Percentage: ((Y - X) / X) * 100%
Category-Level Improvements:
- IAM Policy Security: Previous [X]/100 → Current [Y]/100 ([+/-Z]%)
- Encryption Coverage: Previous [X]/100 → Current [Y]/100 ([+/-Z]%)
- Audit Logging: Previous [X]/100 → Current [Y]/100 ([+/-Z]%)
- Compliance Readiness: Previous [X]/100 → Current [Y]/100 ([+/-Z]%)
Iteration Summary Report Format:
## Iteration Progress
### Comparison to Previous Review
- **Previous Score**: [X]/100
- **Current Score**: [Y]/100
- **Improvement**: [+/-Z]% ([+/-W] points)
### Issues Resolved Since Last Review
1. **[Issue Title]** (Category: [Category], Severity: [Critical/High/Medium/Low])
- Previous State: [Description]
- Current State: [Description]
- Remediation Applied: [Specific action taken]
### Issues Remaining from Previous Review
1. **[Issue Title]** (Category: [Category], Severity: [Critical/High/Medium/Low])
- Status: Still present
- Recommendation: [Updated remediation guidance]
### New Issues Identified
1. **[Issue Title]** (Category: [Category], Severity: [Critical/High/Medium/Low])
- Reason: [Why this issue appeared]
- Recommendation: [Remediation guidance]
### Security Posture Trend
- Issues Resolved: [X]
- Issues Remaining: [Y]
- New Issues: [Z]
- Net Improvement: [+/-W] issues
Use these templates for findings:
🔴 CRITICAL: [Security Issue Title]
Category: [Validation Category Name]
Problem: [Clear description of the security vulnerability]
Impact:
Current State:
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": "*"
}
Recommended State:
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::user-data-bucket/users/${aws:userid}/*",
"Condition": {
"StringEquals": {
"s3:x-amz-server-side-encryption": "aws:kms"
}
}
}
Remediation Steps:
Effort: [Low/Medium/High]
Feasibility Check:
References: [AWS documentation links]
🟡 HIGH: [Security Issue Title]
[Same structure as Critical]
🟢 MEDIUM: [Security Issue Title]
[Same structure as Critical]
⚪ LOW: [Security Issue Title]
[Same structure as Critical]
CRITICAL INSTRUCTION: This validation report should be CONCISE and focus ONLY on NEW findings not already documented in the security design. Do NOT duplicate:
FOCUS ON: New security issues discovered through validation that were NOT identified by the maker.
Generate output in this format:
# Security Policy Validation Report
## Validation Summary
| Metric | Score | Status |
| ---------------------------- | ----------- | ---------------------------- |
| IAM Policy Security | [0-100] | [ Pass / Warning / Fail] |
| Encryption Coverage | [0-100] | [ Pass / Warning / Fail] |
| Audit Logging | [0-100] | [ Pass / Warning / Fail] |
| Compliance Readiness | [0-100] | [ Pass / Warning / Fail] |
| **Overall Security Posture** | **[0-100]** | **[ Pass / Warning / Fail]** |
**Total Issues**: [X] Critical, [Y] High, [Z] Medium, [W] Low
**Status Legend**:
- Pass: Score ≥ 80
- Warning: Score 60-79
- Fail: Score < 60
## Critical Issues (Must Fix Before Deployment)
[List all critical findings using template]
## High Priority Issues (Should Fix)
[List all high findings using template]
## Medium Priority Issues (Consider Fixing)
[List all medium findings using template]
## Low Priority Issues (Optional Improvements)
[List all low findings using template]
## Security Metrics Breakdown
### IAM Policy Security Score: [X]/100
- No wildcard actions or resources
- Missing IAM conditions for fine-grained control
- Permission boundaries implemented
- **Recommendation**: [Specific improvement]
### Encryption Coverage Score: [X]/100
- All data stores encrypted at rest
- TLS not enforced for API Gateway
- KMS key rotation enabled
- **Recommendation**: [Specific improvement]
### Audit Logging Completeness Score: [X]/100
- CloudTrail enabled in all regions
- Log file validation enabled
- Missing VPC Flow Logs
- **Recommendation**: [Specific improvement]
### Compliance Readiness Score: [X]/100
- GDPR: Encryption and access controls compliant
- HIPAA: PHI found in CloudWatch Logs
- PCI-DSS: Network segmentation compliant
- **Recommendation**: [Specific improvement]
## Threat Model Coverage (if applicable)
| Threat ID | Threat Description | Mitigation Status | Gap |
| --------- | -------------------- | ----------------- | ---------------------------- |
| T-001 | Unauthorized access | Mitigated | IAM policies with conditions |
| T-002 | Data exfiltration | Partial | Missing VPC endpoints |
| T-003 | Privilege escalation | Not mitigated | No permission boundaries |
**Mitigation Status Legend**:
- Mitigated: Security control fully addresses the threat
- Partial: Security control partially addresses the threat, gaps remain
- Not mitigated: No security control assigned to this threat
## Compliance Gap Analysis
### GDPR Compliance
- Data encryption at rest and in transit
- Access controls with audit logging
- Missing data deletion capabilities
- Data residency not enforced (using us-east-1)
**Remediation Priority**: High
**Estimated Effort**: 2-4 hours
**Regulatory Citations**: GDPR Article 32 (encryption), Article 17 (right to erasure)
### HIPAA Compliance
- PHI encryption with KMS
- PHI found in CloudWatch Logs (violation)
- BAA signed with AWS
- Missing audit log retention policy
**Remediation Priority**: Critical
**Estimated Effort**: 4-8 hours
**Regulatory Citations**: HIPAA Security Rule §164.312(a)(2)(iv) (encryption), §164.308(a)(1)(ii)(D) (audit controls)
### PCI-DSS Compliance
- Network segmentation with VPC and security groups
- Cardholder data encryption at rest and in transit
- Access controls with MFA for privileged accounts
- Missing quarterly vulnerability scans
**Remediation Priority**: High
**Estimated Effort**: 8-16 hours
**Regulatory Citations**: PCI-DSS Requirement 3 (encryption), Requirement 1 (network segmentation)
### SOC 2 Compliance
- Access controls with least privilege
- Encryption at rest and in transit
- Monitoring and alerting with CloudWatch and GuardDuty
- Missing documented incident response procedures
**Remediation Priority**: Medium
**Estimated Effort**: 4-8 hours
**Regulatory Citations**: SOC 2 Trust Service Criteria CC6.1 (logical access), CC6.7 (encryption)
## Iteration Progress (if applicable)
### Comparison to Previous Review
- **Previous Score**: [X]/100
- **Current Score**: [Y]/100
- **Improvement**: [+/-Z]% ([+/-W] points)
### Issues Resolved Since Last Review
- Fixed wildcard IAM policy (Critical → Resolved)
- Enabled CloudTrail encryption (High → Resolved)
- Added VPC endpoints (Medium → Resolved)
### Issues Remaining from Previous Review
- PHI still in CloudWatch Logs (Critical)
- Missing GuardDuty (High)
### New Issues Identified
- New S3 bucket without encryption (Critical)
- Missing MFA for admin role (High)
## Recommendations Summary
### Immediate Actions (Critical/High Priority)
1. **Remove PHI from CloudWatch Logs** (Critical, 4-8 hours)
- Implement log filtering to exclude PHI data
- Use AWS Secrets Manager for sensitive data
- Update application logging configuration
2. **Enable GuardDuty** (High, 1-2 hours)
- Enable GuardDuty in all regions
- Configure SNS notifications for findings
- Set up automated remediation for critical threats
3. **Encrypt new S3 bucket** (Critical, < 1 hour)
- Enable default encryption with KMS customer-managed key
- Add bucket policy to deny unencrypted uploads
- Enable versioning and MFA delete
### Future Improvements (Medium/Low Priority)
1. **Implement data deletion capabilities** (Medium, 2-4 hours)
- Configure S3 lifecycle policies for automatic deletion
- Implement DynamoDB TTL for time-based deletion
- Document data retention and deletion procedures
2. **Add VPC Flow Logs** (Medium, 1-2 hours)
- Enable VPC Flow Logs for all VPCs
- Store logs in CloudWatch Logs with 90-day retention
- Create CloudWatch alarms for suspicious network activity
**Estimated Total Effort**: [X] hours
**Security Risk Reduction**: [High/Medium/Low]
**Compliance Impact**: [Critical/High/Medium/Low]
---
## Iteration Guidance
### Current State
- **Current Score**: [X]/100 ([MVP/Standard/Hardened] Production)
- **Production Readiness**: [Ready/Needs Improvements/Not Ready]
### To Reach Standard Production (80-89 points)
**Required Fixes** (Must address before production deployment):
1. [Finding ID]: [Finding Title] ([Effort], [+X points])
2. [Finding ID]: [Finding Title] ([Effort], [+X points])
**Estimated Effort**: [X] hours
**Expected Score After**: [Y]/100
**Timeline**: [Immediate/1 week/2 weeks]
### To Reach Hardened Production (90-100 points)
**Recommended Fixes** (Post-launch enhancements):
1. [Finding ID]: [Finding Title] ([Effort], [+X points])
2. [Finding ID]: [Finding Title] ([Effort], [+X points])
**Estimated Effort**: [X] hours
**Expected Score After**: [Y]/100
**Timeline**: [1 month/3 months/6 months]
### Optional Enhancements
**Nice-to-Have Improvements** (Low priority):
1. [Finding ID]: [Finding Title] ([Effort], [+X points])
2. [Finding ID]: [Finding Title] ([Effort], [+X points])
**Estimated Effort**: [X] hours
**Expected Score After**: [Y]/100
### Iteration Priority Matrix
| Finding ID | Priority | Effort | Points | ROI (Points/Hour) | Recommended Iteration |
| ---------- | -------- | ------ | ------ | ----------------- | --------------------- |
| [ID] | Critical | [X]h | +[Y] | [Z] | Iteration 1 |
| [ID] | High | [X]h | +[Y] | [Z] | Iteration 1 |
| [ID] | Medium | [X]h | +[Y] | [Z] | Iteration 2 |
| [ID] | Low | [X]h | +[Y] | [Z] | Optional |
**ROI Calculation**: Points gained ÷ Hours of effort = Points per hour
**Iteration Strategy**:
- **Iteration 1** (Before Production): Fix all Critical and High findings with ROI > 2.0
- **Iteration 2** (Post-Launch): Fix Medium findings with ROI > 1.0
- **Optional**: Fix Low findings when time permits
CRITICAL (must fix):
ExternalId or condition keyskms:* to non-admin principalsIMPORTANT (should fix):
aws:RequestedRegion conditions for region-locked servicesSUGGESTION:
aws:CalledVia conditions for service-to-service callss3:GetObject to specific key prefixesPresent findings as: CRITICAL → IMPORTANT → SUGGESTION. Ask: "Fix these issues? [y/n]" — unless scope_confirmed is true, in which case report all the findings and leave fixing to the caller, without asking.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aws-solutions/konductor --plugin konductor101 skills in this plugin
/about-konductorGets a new user from nothing to a working Konductor session — install the CLI, start the orchestrator, and describe real work in plain language. Covers the real `konductor` CLI command surface, example orchestrator prompts, and the agent/skill/SOP model. Use when a user asks "what is Konductor", "how do I install this", "what can I ask it", or "what's the difference between an agent, a skill, and a SOP"./adr-generatorProduces a complete inline ADR (Context, Decision, Status, Alternatives, Consequences). Use when a significant design decision is identified during design doc creation, when an engineer asks to document a decision as an ADR, or when an existing ADR is incomplete (missing alternatives, consequences, or status). Trigger phrases — "generate an ADR for this decision", "document this as an architecture decision record", "create an ADR for choosing X over Y"./adversarial-code-reviewOther plugins' skills for the same job