返回顶部
e

enterprise-legal-guardrails

Legal/compliance guardrails for outbound OpenClaw actions (anti-spam, defamation, privacy, financial claims).

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.13
安全检测
已通过
595
下载量
0
收藏
概述
安装方式
版本历史

enterprise-legal-guardrails

# Enterprise Legal Guardrails Use this skill to preflight bot output before posting, messaging, or publishing anything that could create legal/compliance risk. ## What it is A generic **outbound** guardrail checker used by workflows before execute actions such as post/comment/message/chat/send in any app. ## When to use - Before `create_post`, `create_comment`, `send_message`, or equivalent publish actions. - Before market-related commentary, strategy claims, or price/certainty statements. - Before HR-sensitive or workplace-adjacent messaging. - Before anti-spam or coordination-heavy communications. - Before handling or exposing personal identifiers. ## Workflow 1. Draft text. 2. Run the checker with the matching action/profile. 3. If result is **PASS/WATCH**, proceed. 4. If **REVIEW**, rewrite or route for human/legal review. 5. If **BLOCK**, do not execute. Use it as a shared OpenClaw outbound safety layer for any skill that publishes content. Babylon is only one current integration example, not the primary purpose of the skill. ## Quick usage ```bash python3 scripts/check_enterprise_guardrails.py \ --action post \ --app <app_name> \ --policies social antispam hr \ --text "Draft text here" ``` ```bash python3 scripts/check_enterprise_guardrails.py \ --action comment \ --scope include \ --apps whatsapp,telegram \ --text "Draft text here" ``` ```bash python3 scripts/check_enterprise_guardrails.py \ --action market-analysis \ --text "Market commentary..." \ --json ``` ## App scope (global filtering) Scope applies to any app-context passed with `--app` and these env vars (legacy names preserved for compatibility): - `ENTERPRISE_LEGAL_GUARDRAILS_OUTBOUND_SCOPE` (`all|include|exclude`) - `ENTERPRISE_LEGAL_GUARDRAILS_OUTBOUND_APPS` (comma-separated list) - `BABYLON_GUARDRAILS_SCOPE` - `BABYLON_GUARDRAILS_OUTBOUND_SCOPE` - `BABYLON_GUARDRAILS_APPS` Examples: - `all`: check all outbound content. - `include` + `whatsapp,email`: only check those apps. - `exclude` + `whatsapp,email,moltbook,babylon`: everything except these apps. If scope is omitted, default is `all`. ## Profiles - `social`: public social text, comments, announcements. - `antispam`: unsolicited/pumping/coordinating messaging. - `hr`: workplace, hiring, performance, or employee conduct language. - `privacy`: personally identifying data and private information disclosures. - `market`: market/financial claims and outcome assertions. - `legal`: legal conclusions/implication language. If no profile is provided, defaults are derived from `--action`: - `post|comment|message` → `social,legal` - `trade|market-analysis` → `market,financial` - `generic` → `legal,social` ## Output - `PASS`: safe to execute - `WATCH`: low risk; optional rewrite - `REVIEW`: human/legal review recommended - `BLOCK`: do not execute ## Tuning You can tune decision sensitivity via environment variables (or CLI flags in direct runs): - `ENTERPRISE_LEGAL_GUARDRAILS_REVIEW_THRESHOLD` (`default: 5`) - `ENTERPRISE_LEGAL_GUARDRAILS_BLOCK_THRESHOLD` (`default: 9`) CLI overrides: - `--review-threshold` - `--block-threshold` Legacy aliases are supported in legacy env names: `ELG_*` and `BABYLON_GUARDRAILS_*`. ## Universal outbound adapter (no-native integration path) For skills/tools without native guardrail hooks (for example: Gmail, custom website publishing, custom message bots), run outbound operations through the wrapper: ```bash python3 /path/to/enterprise-legal-guardrails/scripts/guard_and_run.py --app <app_name> --action <post|comment|message|trade|market-analysis|generic> --text "$DRAFT" -- <outbound command...> ``` Examples: ```bash # Gmail via gog python3 /path/to/enterprise-legal-guardrails/scripts/guard_and_run.py --app gmail --action message --text "Hello, ..." -- gog gmail send --to user@domain.com --subject "Update" --body "Hello, ..." # Website/publication publish flow python3 /path/to/enterprise-legal-guardrails/scripts/guard_and_run.py --app website --action post --text "$POST_COPY" -- npm run publish-post "$POST_COPY" ``` Use this wrapper to apply the same policy checks in non-Babylon outbound flows. ## Compatibility Legacy name `legal-risk-checker` is preserved in OpenClaw workspaces that still reference it. ## References See `references/guardrail-policy-map.md` for the full policy rule set and suggested rewrites. ## Packaging A distributable bundle is available at: - `dist/enterprise-legal-guardrails.skill` ### Hardening controls for `guard_and_run.py` For non-native outbound integrations, treat `guard_and_run` as an execution boundary. Recommended flags/env: Execution safety is allowlist-first by default. Wrapper requires explicit `--allowed-command` (or env alias) unless `--allow-any-command` is explicitly enabled. - `--allow-any-command` / `ENTERPRISE_LEGAL_GUARDRAILS_ALLOW_ANY_COMMAND` - Explicitly bypass allowlist enforcement (unsafe; audit-first use only). - `--suppress-allow-any-warning` / `ENTERPRISE_LEGAL_GUARDRAILS_SUPPRESS_ALLOW_ANY_WARNING` - Suppresses the runtime safety warning when `--allow-any-command` is intentionally enabled. - `--allow-any-command-reason` / `ENTERPRISE_LEGAL_GUARDRAILS_ALLOW_ANY_COMMAND_REASON` - Mandatory rationale for any `allow-any` bypass invocation. Suggested format: `SEC-1234: emergency fix`. - `--allow-any-command-approval-token` / `ENTERPRISE_LEGAL_GUARDRAILS_ALLOW_ANY_COMMAND_APPROVAL_TOKEN` - Mandatory approval token for any `allow-any` bypass invocation; stored as a short token fingerprint in audit logs. - `--allowed-command <exe...>` / `ENTERPRISE_LEGAL_GUARDRAILS_ALLOWED_COMMANDS` - Allow-list executables (supports comma/space lists and wildcards). - `--strict` / `ENTERPRISE_LEGAL_GUARDRAILS_STRICT` - Escalate `REVIEW` to hard block. - `--sanitize-env` - `--keep-env <VAR...>` / `--keep-env-prefix <PREFIX...>` - `--command-timeout`, `--checker-timeout`, `--max-text-bytes` - `--audit-log <file>` / `ENTERPRISE_LEGAL_GUARDRAILS_AUDIT_LOG` These flags provide execution safety, command scoping, and immutable trail for post-incident review without changing checker logic.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 enterprise-legal-guardrails-public-1776420007 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 enterprise-legal-guardrails-public-1776420007 技能

通过命令行安装

skillhub install enterprise-legal-guardrails-public-1776420007

下载 Zip 包

⬇ 下载 enterprise-legal-guardrails v1.0.13

文件大小: 21.82 KB | 发布时间: 2026-4-17 19:07

v1.0.13 最新 2026-4-17 19:07
enterprise-legal-guardrails-public 1.0.13

- Added comprehensive SKILL.md documentation explaining usage, workflow, configuration, and security guidelines.
- Clarified app scope options, profiles, sensitivity tuning, and output meanings.
- Documented universal outbound adapter for non-native integration use cases.
- Listed recommended hardening controls for outbound wrapper execution.
- Provided guidance for legacy compatibility and references.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部