OSOP Workflow Reviewer
Review a workflow or execution log for risks and issues.
Target file
$ARGUMENTS
What to do
- 1. Read the file specified in the argument (
.osop or .osoplog.yaml)
- 2. Analyze for risks — check each node for:
-
security.risk_level: high|critical without preceding
approval_gate
-
security.permissions containing broad patterns (
write:*,
admin:*,
delete:*)
-
cli nodes with destructive commands (
rm -rf,
kubectl delete,
terraform destroy,
DROP TABLE)
- Hardcoded secrets (strings starting with
sk-,
ghp_,
xoxb-, API keys)
- Agent nodes without
cost.estimated (unbounded cost exposure)
- Missing
timeout_sec on external call nodes (
api,
cli,
agent,
infra,
mcp)
- Missing error handling (no
fallback/
error edge) on medium+ risk nodes
- 3. Compute risk score (0-100):
- Each node:
type_weight * risk_multiplier * mitigation_factor
- Type weights: cli=2, infra=2, db=1.5, agent=1.5, docker=1.5, cicd=1.5, api=1, others=0.5-1
- Risk multiplier: low=1, medium=2, high=4, critical=8
- Mitigations: approval
gate=-50%, retrypolicy=-10%, fallback_edge=-20%
- Finding penalty: low=+2, medium=+5, high=+10, critical=+20
- 4. Present findings in a clear table:
CODEBLOCK0
- 5. Summarize:
- Total permissions required
- Secrets referenced
- Estimated cost (if any)
- Whether approval gates exist
- Final verdict: is this safe to run?
For .osoplog files
If reviewing an execution log, also check:
- - Which tools were actually used and how many calls
- Whether any nodes failed and why
- AI reasoning decisions — were they sound?
- Sub-agent hierarchy — was the spawning appropriate?
- Total execution time and cost
OSOP 工作流审查器
审查工作流或执行日志中的风险与问题。
目标文件
$ARGUMENTS
操作步骤
- 1. 读取文件 — 读取参数中指定的文件(.osop 或 .osoplog.yaml)
- 2. 分析风险 — 检查每个节点是否存在以下问题:
- security.risk
level: high|critical 但缺少前置的 approvalgate
- security.permissions 包含宽泛模式(write:
、admin:、delete:*)
- cli 节点包含破坏性命令(rm -rf、kubectl delete、terraform destroy、DROP TABLE)
- 硬编码的密钥(以 sk-、ghp_、xoxb-、API 密钥开头的字符串)
- 缺少 cost.estimated 的 Agent 节点(无限制的成本暴露)
- 外部调用节点(api、cli、agent、infra、mcp)缺少 timeout_sec
- 中高风险节点缺少错误处理(没有 fallback/error 边)
- 3. 计算风险评分(0-100):
- 每个节点:类型权重
风险乘数 缓解因子
- 类型权重:cli=2、infra=2、db=1.5、agent=1.5、docker=1.5、cicd=1.5、api=1、其他=0.5-1
- 风险乘数:低=1、中=2、高=4、严重=8
- 缓解措施:approval
gate=-50%、retrypolicy=-10%、fallback_edge=-20%
- 发现项罚分:低=+2、中=+5、高=+10、严重=+20
- 4. 以清晰表格呈现发现项:
风险评分:XX/100 — 判定结果(安全/谨慎/警告/危险)
| 严重程度 | 发现项 | 节点 | 建议 |
|----------|--------|------|------|
| 严重 | ... | ... | ... |
- 5. 总结:
- 所需的总权限
- 引用的密钥
- 预估成本(如有)
- 是否存在审批关卡
- 最终判定:该工作流是否可安全运行?
针对 .osoplog 文件
如果审查的是执行日志,还需检查:
- - 实际使用了哪些工具以及调用次数
- 是否有节点失败及失败原因
- AI 推理决策是否合理
- 子代理层级结构——代理的生成是否恰当
- 总执行时间和成本