360 Secure SkillHub
360 安全技能中心

consensus-permission-escalation-guard

该 Skill 在权限提升被应用前做最后安全门控:按严格输入 schema 校验升级请求,评估硬阻止与重写策略(通配权限、缺工单、紧急越权、职责分离冲突等),通过本地确定性 persona 投票或聚合外部投票,返回 ALLOW/BLOCK/REQUIRE_REWRITE 并写入可回放的审计工件。

kaicianflone
kaicianflone
热度 63.40
最近更新 2026-05-17 13:01:17
分类:安全依赖:代码执行 / 读写文件应用场景:工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add consensus-permission-escalation-guard
Metadata
name
consensus-permission-escalation-guard
description
Pre-execution governance for IAM and permission escalation changes. Use when an agent or workflow proposes granting, expanding, or assuming higher privileges and you need deterministic ALLOW/BLOCK/REQUIRE_REWRITE decisions with strict schema validation, idempotency, and board-native audit artifacts.
version
0.1.12
homepage
https://github.com/kaicianflone/consensus-permission-escalation-guard
source
https://github.com/kaicianflone/consensus-permission-escalation-guard
upstream
{"consensus-guard-core":"https://github.com/kaicianflone/consensus-guard-core"}
metadata
{"openclaw":{"requires":{"bins":["node","tsx"],"env":["CONSENSUS_STATE_FILE","CONSENSUS_STATE_ROOT"]},"install":[{"kind":"node","package":"consensus-permission-escalation-guard","bins":["node","tsx"]}]}}

consensus-permission-escalation-guard

consensus-permission-escalation-guard is the final safety gate before privilege elevation is applied.

What this skill does

  • validates escalation requests against a strict input schema (reject unknown fields)
  • evaluates hard-block and rewrite policy flags for IAM risk patterns
  • runs persona-weighted voting (or aggregates external votes)
  • returns one of: ALLOW | BLOCK | REQUIRE_REWRITE
  • writes decision artifacts for replay/audit

Decision policy shape

Hard-block examples:

  • wildcard permissions (*, : *, broad owner/admin jumps)
  • missing ticket reference when required
  • break-glass escalation without incident reference
  • separation-of-duties conflicts (e.g., create + approve authority)

Rewrite examples:

  • weak or non-actionable justification
  • temporary duration exceeds policy limit
  • production escalation requires explicit human confirmation gate

Runtime and safety model

  • runtime binaries: node, tsx
  • network behavior: none in deterministic guard logic
  • environment config read by this package: CONSENSUS_STATE_FILE, CONSENSUS_STATE_ROOT
  • filesystem writes: consensus board/state artifacts under configured state path

Invoke contract

  • invoke(input, opts?) -> Promise<OutputJson | ErrorJson>

Modes:

  • mode="persona" (default): uses local deterministic persona defaults for internal voting
  • mode="external_agent": consume external_votes[], then aggregate and enforce policy deterministically

Install

npm i consensus-permission-escalation-guard

Quick start

node --import tsx run.js --input ./examples/input.json

Tests

npm test

Test coverage includes schema rejection, hard-block paths, rewrite paths, allow paths, idempotent retries, and external-agent aggregation behavior.

Note: this skill depends on consensus-guard-core for aggregation/state helpers; review that package alongside this one for full runtime auditability.

See also: SECURITY-ASSURANCE.md for threat model, runtime boundaries, and deployment hardening guidance.