skills/dag-permission-validator/SKILL.md
Validates permission inheritance between parent and child agents. Ensures child permissions are equal to or more restrictive than parent. Activate on 'validate permissions', 'permission check', 'inheritance validation', 'permission matrix', 'security validation'. NOT for runtime enforcement (use dag-scope-enforcer) or isolation management (use dag-isolation-manager).
npx skillsauth add curiositech/windags-skills dag-permission-validatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a DAG Permission Validator, ensuring child agents never exceed parent permissions through systematic validation of permission matrices.
| Child Permission State | Parent Has Permission | Action | |---|---|---| | Requests core tool (read/write/etc) | ✓ Parent has it | APPROVE - child can inherit | | Requests core tool | ✗ Parent lacks it | DENY - log violation, suggest removal | | Requests file pattern | ✓ Pattern subset of parent | APPROVE - within boundaries | | Requests file pattern | ✗ Pattern exceeds parent scope | DENY - narrow to parent scope | | Has fewer deny patterns than parent | Parent denies pattern X | DENY - child must inherit all denials | | Network/bash permissions | Parent disabled | DENY - cannot enable what parent lacks | | Ambiguous glob pattern overlap | ? Unclear if subset | WARN - request clarification, suggest explicit patterns |
1. Merge requested permissions with defaults
├─ If conflict in request → Use most restrictive
└─ If missing field → Use secure default (false/empty)
2. Compare each permission category:
├─ Core tools: child.tool ≤ parent.tool for each tool
├─ File patterns: each child pattern ⊆ parent patterns
├─ Network: child domains ⊆ parent domains
└─ Bash: child patterns ⊆ parent patterns AND child denials ⊇ parent denials
3. Generate result:
├─ All valid → return PASS + child matrix
├─ Violations found → return FAIL + violations + suggested fixes
└─ Warnings only → return WARN + proceed with corrected matrix
Symptom: Child agent spawned with permissions parent doesn't have
Diagnosis: Validation skipped or enforcement not integrated with spawning
Fix: Ensure dag-parallel-executor calls validation before Task tool execution
Symptom: Child requests /home/** when parent only has /tmp/**
Diagnosis: Pattern subset logic fails on glob expansion
Fix: Use isPatternSubsetOf() with proper glob matching, not string comparison
Symptom: Child bypasses restrictions parent must enforce
Diagnosis: Child permission matrix missing parent's denial patterns
Fix: Copy all parent denial patterns to child before validation
Symptom: Valid subset permissions rejected as violations
Diagnosis: Overly strict pattern matching or missing parent wildcard handling
Fix: Implement proper glob hierarchy checking with ** and * expansion
Symptom: Child gets dangerous defaults when request is partial
Diagnosis: Merging logic uses permissive defaults instead of restrictive ones
Fix: Use createRestrictiveDefaults() as base, only add what parent allows
// Parent: research-coordinator
parentMatrix = {
coreTools: { read: true, write: false, webSearch: true },
fileSystem: { readPatterns: ["/workspace/**"], writePatterns: [] },
network: { enabled: true, allowedDomains: ["*.edu", "arxiv.org"] }
}
// Child request: literature-scanner
childRequest = {
coreTools: { read: true, webSearch: true },
fileSystem: { readPatterns: ["/workspace/papers/**"] },
network: { enabled: true, allowedDomains: ["arxiv.org"] }
}
// Validation process:
1. Core tools: ✓ read≤read, webSearch≤webSearch, write not requested
2. File patterns: ✓ "/workspace/papers/**" ⊆ "/workspace/**"
3. Network: ✓ "arxiv.org" ⊆ ["*.edu", "arxiv.org"]
// Result: PASS - child is proper subset
// Parent: data-processor
parentMatrix = {
coreTools: { read: true, write: false, edit: false },
fileSystem: { readPatterns: ["/data/**"], denyPatterns: ["/data/secrets/**"] }
}
// Child request: file-modifier
childRequest = {
coreTools: { read: true, write: true }, // ❌ VIOLATION
fileSystem: { readPatterns: ["/data/**"] } // ❌ Missing denial
}
// Validation process:
1. Core tools: ✗ child.write=true > parent.write=false → VIOLATION
2. File patterns: ✗ child missing "/data/secrets/**" denial → VIOLATION
// Result: FAIL
violations = [
{ category: "coreTools", field: "write", message: "Child requests write but parent forbids" },
{ category: "fileSystem", field: "denyPatterns", message: "Child must inherit secrets denial" }
]
// Auto-fix suggestion:
suggestedChild = {
coreTools: { read: true, write: false },
fileSystem: { readPatterns: ["/data/**"], denyPatterns: ["/data/secrets/**"] }
}
// Parent: web-crawler
parentMatrix = {
network: { enabled: true, allowedDomains: ["*.research.org", "api.*.com"] }
}
// Child request: domain-scanner
childRequest = {
network: { allowedDomains: ["sub.research.org", "api.data.com", "api.unknown.net"] }
}
// Validation process:
1. "sub.research.org" vs "*.research.org" → ✓ clear subset
2. "api.data.com" vs "api.*.com" → ✓ matches pattern
3. "api.unknown.net" vs patterns → ✗ "net" ≠ "com" → VIOLATION
// Trade-off analysis:
Option A: Strict reject → blocks legitimate "api.unknown.net" if parent meant "api.*.*"
Option B: Permissive allow → risks domain escalation
// Decision: Fail safe - reject ambiguous, suggest clarification
Result: FAIL + suggestion to make parent pattern explicit ["api.*.com", "api.*.net"]
This skill validates permissions but does NOT:
dag-scope-enforcer for blocking unauthorized actionsdag-authorization-manager for escalating agent permissionsdag-isolation-manager for container/sandbox boundariesdag-policy-manager for defining organizational permission rulesdag-execution-tracer for recording permission violationsWhen to delegate:
dag-scope-enforcer.enforce()dag-authorization-manager.elevate()dag-isolation-manager.isolate()dag-policy-manager.define()tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.