maxwellokumu/okaudit-claude-skills / identity-access/sod-analyzer
sod-analyzer
VerifiedDetect segregation of duties conflicts in user role assignments. Use this skill for role conflict analysis, four-eyes control review, and SOD violation detection.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 2.0 KB |
| SKILL.md | skill md | 1.7 KB |
| main.py | script | 15.2 KB |
| sample_input/conflicts.json | config | 677 B |
| sample_input/users.json | config | 707 B |
| skill.yaml | config | 954 B |
README.md
View on GitHub# sod-analyzer
Detect segregation of duties (SOD) conflicts in user role assignments. Checks every
user's roles against a library of known conflicting pairs and reports violations with
risk ratings and remediation guidance.
---
## Purpose
SOD violations occur when one person can perform two conflicting functions — such as
initiating and approving a payment, or creating and deleting users. This skill:
- Checks user roles against 20 built-in common SOD conflict pairs
- Supports custom conflict rules via JSON
- Rates each conflict as Critical, High, or Medium
- Provides remediation guidance per conflict
- Lists clean users for management sign-off
---
## Requirements
```bash
pip install python-dotenv
```
---
## Usage
```bash
# Use built-in conflict library only
python main.py \
--users sample_input/users.json \
--builtin-conflicts
# Use custom conflict rules only
python main.py \
--users sample_input/users.json \
--conflicts sample_input/conflicts.json
# Use both built-in and custom rules
python main.py \
--users sample_input/users.json \
--conflicts sample_input/conflicts.json \
--builtin-conflicts
```
---
## Input Format
**users.json**
```json
{
"alice": ["approve_payment", "create_invoice"],
"bob": ["developer", "read_audit_logs"],
"carol": ["deploy_code", "approve_deployment"]
}
```
**conflicts.json** (custom pairs)
```json
[
["role_a", "role_b", "High", "Custom rationale here"],
{"role_a": "write_report", "role_b": "approve_report", "risk": "Medium", "category": "Governance"}
]
```
---
## Sample Output (truncated)
```markdown
# Segregation of Duties Analysis Report
**Date:** 2025-07-01
**Built-in Conflicts Used:** Yes
**Custom Conflict Rules:** 0
## Summary
| Metric | Value |
|--------|-------|
| Users Reviewed | 10 |
| Users with Conflicts | 3 |
| Total Conflicts Found | 4 |
## Conflicts Detected
| User | Role A | Role B | Risk | Remediation |
|------|--------|--------|------|-------------|
| `carol` | `deploy_code` | `approve_deployment` | 🚨 Critical | Remove 'approve_deployment'... |
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |