返回顶部
c

cyber-security-engineer网络安全工程师

Security engineering workflow for OpenClaw privilege governance and hardening. Use for least-privilege execution, approval-first privileged actions, idle timeout controls, port + egress monitoring, and ISO 27001/NIST-aligned compliance reporting with mitigations.

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

cyber-security-engineer

Cyber Security Engineer

Requirements

Required tools:

  • - python3 (>= 3.8)
  • INLINECODE1 CLI (installed via npm during bootstrap, or pre-installed)
  • INLINECODE3 (only needed for bootstrap if openclaw is not already installed)
  • One of lsof, ss, or netstat for port/egress checks
  • INLINECODE8, readlink (standard on macOS/Linux, used by the runtime hook installer)

Env vars (all optional, documented for configuration):

  • - OPENCLAW_REQUIRE_POLICY_FILES — set to 1 to block privileged execution when policy files are missing
  • INLINECODE12 — set to 1 to require a task session id for each privileged action
  • INLINECODE14 — per-task session id (used when OPENCLAW_REQUIRE_SESSION_ID=1)
  • INLINECODE16 — if set, requires this token during the approval step
  • INLINECODE17 — set to 1 to flag the current content source as untrusted
  • INLINECODE19 — absolute path to a notifier binary (must also be allowlisted)
  • INLINECODE20 — JSON array of allowed argv arrays, or comma-separated absolute paths
  • INLINECODE21 — override path to the real sudo binary (used by the runtime hook shim)
  • INLINECODE22 — override path to python3 (used by the runtime hook shim)
  • INLINECODE23 — override path to the skill directory (used by the runtime hook shim)
  • INLINECODE24 — set to 1 to allow non-interactive sudo through the shim (default: blocked)
  • INLINECODE26 — human-readable reason passed to the guarded execution wrapper
  • INLINECODE27 — override path to the notification state file
  • INLINECODE28 — set to 1 to skip the interactive confirmation before modifying the macOS LaunchAgent plist

Policy files (admin reviewed):

  • - INLINECODE30
  • INLINECODE31
  • INLINECODE32
  • INLINECODE33

Implement these controls in every security-sensitive task:

  1. 1. Keep default execution in normal (non-root) mode.
  2. Request explicit user approval before any elevated command.
  3. Scope elevation to the minimum command set required for the active task.
  4. Drop elevated state immediately after the privileged command completes.
  5. Expire elevated state after 30 idle minutes and require re-approval.
  6. Monitor listening network ports and flag insecure or unapproved exposure.
  7. Monitor outbound connections and flag destinations not in the egress allowlist.
  8. If no approved baseline exists, generate one with python3 scripts/generate_approved_ports.py, then review and prune.
  9. Benchmark controls against ISO 27001 and NIST and report violations with mitigations.

Runtime Hook (sudo shim)

The script scripts/install-openclaw-runtime-hook.sh installs an opt-in sudo
shim at ~/.openclaw/bin/sudo. This shim shadows the system sudo binary by
prepending ~/.openclaw/bin to PATH in the OpenClaw gateway process.

What it does:

  • - Intercepts sudo invocations and routes them through INLINECODE41
  • Requires explicit interactive user approval before running any privileged command
  • Enforces command policy allow/deny rules, audit logging, and a 30-minute idle timeout
  • Blocks non-interactive sudo by default (prevents automated abuse)
  • Passes through harmless flags (-h, --version, -k, -l) directly to real sudo

What it does NOT do:

  • - It does not replace or modify the system sudo binary
  • It does not grant itself any elevated permissions
  • It only affects processes whose PATH includes ~/.openclaw/bin before INLINECODE48

Opt-in: The hook is not installed by default. To enable it, run bootstrap with
ENFORCE_PRIVILEGED_EXEC=1. On macOS, the installer will prompt for confirmation
before modifying the gateway LaunchAgent plist. The shim can be removed at any time
by deleting ~/.openclaw/bin/sudo.

File Writes

This skill writes only to ~/.openclaw/ and the assessments/ directory inside the
skill folder. No files are written outside these two trees.

Under ~/.openclaw/ (user config/state):

  • - ~/.openclaw/security/approved_ports.json — generated port baseline (by generate_approved_ports.py)
  • INLINECODE56 — elevated session state (by root_session_guard.py)
  • INLINECODE58 — append-only audit log (by audit_logger.py)
  • INLINECODE60 — notification diff state (by notify_on_violation.py)
  • INLINECODE62 — opt-in sudo shim (by install-openclaw-runtime-hook.sh, see Runtime Hook section)
  • INLINECODE64 — auto-cycle run log (by auto_invoke_cycle.sh)

Under assessments/ (inside skill directory):

  • - assessments/openclaw-assessment.json — compliance check results
  • INLINECODE68 — structured summary for tools/integrations
  • INLINECODE69 — human-readable report page
  • INLINECODE70 — latest open-port scan output
  • INLINECODE71 — latest outbound connection scan output

Temporary files:

  • - A short-lived temp file via tempfile.NamedTemporaryFile (by generate_approved_ports.py) — auto-cleaned

No files are written to /usr/, /etc/, or any system directory.

Non-Goals (Web Browsing)

  • - Do not use web browsing / web search as part of this skill. Keep assessments and recommendations based on local host/OpenClaw state and the bundled references in this skill.

Files To Use

  • - INLINECODE76
  • INLINECODE77
  • INLINECODE78
  • INLINECODE79
  • INLINECODE80
  • INLINECODE81
  • INLINECODE82
  • INLINECODE83
  • INLINECODE84
  • INLINECODE85
  • INLINECODE86
  • INLINECODE87
  • INLINECODE88
  • INLINECODE89
  • INLINECODE90
  • INLINECODE91
  • INLINECODE92
  • INLINECODE93
  • INLINECODE94
  • INLINECODE95

Behavior

  • - Never keep root/elevated access open between unrelated tasks.
  • Never execute root commands without an explicit approval step in the current flow.
  • Enforce command allow/deny policy when configured.
  • Require confirmation when untrusted content sources are detected (OPENCLAW_UNTRUSTED_SOURCE=1 + prompt policy).
  • Enforce task session id scoping when configured (OPENCLAW_REQUIRE_SESSION_ID=1).
  • If timeout is exceeded, force session expiration and approval renewal.
  • Log privileged actions to ~/.openclaw/security/privileged-audit.jsonl (best-effort).
  • Flag listening ports not present in the approved baseline and recommend secure alternatives for insecure ports.
  • Flag outbound destinations not present in the egress allowlist.

Output Contract

When reporting status, include:

  • - The specific check_id(s) affected, status, risk, and concise evidence.
  • Concrete mitigations (what to change, where) and any owners/due dates if present.
  • For network findings: port, bind address, process/service, and why it is flagged (unapproved/insecure/public).

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 cyber-security-engineer-1776419993 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 cyber-security-engineer-1776419993 技能

通过命令行安装

skillhub install cyber-security-engineer-1776419993

下载

⬇ 下载 cyber-security-engineer v0.1.9(免费)

文件大小: 46.98 KB | 发布时间: 2026-4-17 20:05

v0.1.9 最新 2026-4-17 20:05
Sudo shim is now opt-in (not installed by default). LaunchAgent plist modification requires interactive confirmation. Bootstrap logs explain how to enable.

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

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

p2p_official_large
返回顶部