Skip to content

maxwellokumu/okaudit-claude-skills / identity-access/sod-analyzer

sod-analyzer

Verified

Detect segregation of duties conflicts in user role assignments. Use this skill for role conflict analysis, four-eyes control review, and SOD violation detection.

FileKindSize
README.mdmarkdown2.0 KB
SKILL.mdskill md1.7 KB
main.pyscript15.2 KB
sample_input/conflicts.jsonconfig677 B
sample_input/users.jsonconfig707 B
skill.yamlconfig954 B
# 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'... |
```
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: 472kUpdated Claude CodeCodexUnverifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall