ClawSec Suite
Operational Notes
- - Required runtime:
node, npx, openclaw, curl, jq, shasum, openssl, INLINECODE7 - Side effects: setup scripts install an advisory hook under
~/.openclaw/hooks, optionally create an unattended openclaw cron job, and use npx clawhub@latest install for guarded installs - Network behavior: fetches signed advisory feed artifacts and remote catalog metadata unless you pin local paths
- Trust model: the suite can recommend removal or block risky installs, but removal/install overrides stay approval-gated
This means clawsec-suite can:
- - monitor the ClawSec advisory feed,
- track which advisories are new since last check,
- cross-reference advisories against locally installed skills,
- recommend removal for malicious-skill advisories and require explicit user approval first,
- and still act as the setup/management entrypoint for other ClawSec protections.
Included vs Optional Protections
Built into clawsec-suite
- - Embedded feed seed file: INLINECODE12
- Portable heartbeat workflow in INLINECODE13
- Advisory polling + state tracking + affected-skill checks
- OpenClaw advisory guardian hook package: INLINECODE14
- Setup scripts for hook and optional cron scheduling: INLINECODE15
- Guarded installer: INLINECODE16
- Dynamic catalog discovery for installable skills: INLINECODE17
Installed separately (dynamic catalog)
clawsec-suite does not hard-code add-on skill names in this document.
Discover the current catalog from the authoritative index (https://clawsec.prompt.security/skills/index.json) at runtime:
CODEBLOCK0
Fallback behavior:
- - If the remote catalog index is reachable and valid, the suite uses it.
- If the remote index is unavailable or malformed, the script falls back to suite-local catalog metadata in
skill.json.
Installation
Cross-shell path note
- - In
bash/zsh, keep path variables expandable (for example, INSTALL_ROOT="$HOME/.openclaw/skills"). - Do not single-quote home-variable paths (avoid
'$HOME/.openclaw/skills'). - In PowerShell, set an explicit path:
-
$env:INSTALL_ROOT = Join-Path $HOME ".openclaw\\skills"
- - If a path is passed with unresolved tokens (like
\$HOME/...), suite scripts now fail fast with a clear error.
Option A: Via clawhub (recommended)
CODEBLOCK1
Option B: Manual download with signature + checksum verification
CODEBLOCK2
OpenClaw Automation (Hook + Optional Cron)
After installing the suite, enable the advisory guardian hook:
CODEBLOCK3
The setup script prints a preflight review before it installs and enables the persistent hook.
Optional: create/update a periodic cron nudge (default every 6h) that triggers a main-session advisory scan:
CODEBLOCK4
The cron setup script prints a preflight review before it creates or updates the unattended job.
What this adds:
- - scan on
agent:bootstrap and /new (command:new), - compare advisory
affected entries against installed skills, - consider advisories with
application: "openclaw" (and legacy entries without application for backward compatibility), - notify when new matches appear,
- and ask for explicit user approval before any removal flow.
Restart the OpenClaw gateway after enabling the hook. Then run /new once to force an immediate scan in the next session context.
Guarded Skill Install Flow (Double Confirmation)
When the user asks to install a skill, treat that as the first request and run a guarded install check:
CODEBLOCK5
Behavior:
- - If no advisory match is found, install proceeds.
- If
--version is omitted, matching is conservative: any advisory that references the skill name is treated as a match. - If advisory match is found, the script prints advisory context and exits with code
42. - Then require an explicit second confirmation from the user and rerun with
--confirm-advisory:
CODEBLOCK6
This enforces:
- 1. First confirmation: user asked to install.
- Second confirmation: user explicitly approves install after seeing advisory details.
Embedded Advisory Feed Behavior
The embedded feed logic uses these defaults:
- - Remote feed URL: INLINECODE38
- Remote feed signature URL:
${CLAWSEC_FEED_URL}.sig (override with CLAWSEC_FEED_SIG_URL) - Remote checksums manifest URL: sibling
checksums.json (override with CLAWSEC_FEED_CHECKSUMS_URL) - Local seed fallback: INLINECODE43
- Local feed signature:
${CLAWSEC_LOCAL_FEED}.sig (override with CLAWSEC_LOCAL_FEED_SIG) - Local checksums manifest: INLINECODE46
- Pinned feed signing key:
~/.openclaw/skills/clawsec-suite/advisories/feed-signing-public.pem (override with CLAWSEC_FEED_PUBLIC_KEY) - State file: INLINECODE49
- Hook rate-limit env (OpenClaw hook):
CLAWSEC_HOOK_INTERVAL_SECONDS (default 300)
Fail-closed verification: Feed signatures are required by default. Checksum manifests are verified when companion checksum artifacts are available. Set CLAWSEC_ALLOW_UNSIGNED_FEED=1 only as a temporary migration bypass when adopting this version before signed feed artifacts are available upstream.
Quick feed check
CODEBLOCK7
Exploitability Context
Advisories in the feed can include exploitability_score and exploitability_rationale fields to help agents prioritize real-world threats:
- - Exploitability scores:
high, medium, low, or INLINECODE58 - Context-aware assessment: Considers attack vector, authentication requirements, and AI agent deployment patterns
- Exploit availability: Detects public exploits and weaponization status
When processing advisories, prioritize by exploitability in addition to severity. A HIGH severity + HIGH exploitability CVE is more urgent than a CRITICAL severity + LOW exploitability CVE.
For detailed methodology, see the exploitability scoring documentation.
Heartbeat Integration
Use the suite heartbeat script as the single periodic security check entrypoint:
It handles:
- - suite update checks,
- feed polling,
- new-advisory detection,
- affected-skill cross-referencing,
- approval-gated response guidance for malicious/removal advisories,
- and persistent state updates.
Approval-Gated Response Contract
If an advisory indicates a malicious or removal-recommended skill and that skill is installed:
- 1. Notify the user immediately with advisory details and severity.
- Recommend removing or disabling the affected skill.
- Treat the original install request as first intent only.
- Ask for explicit second confirmation before deletion/disable action (or before proceeding with risky install).
- Only proceed after that second confirmation.
The suite hook and heartbeat guidance are intentionally non-destructive by default.
Advisory Suppression / Allowlist
The advisory guardian pipeline supports opt-in suppression for advisories that have been reviewed and accepted by your security team. This is useful for first-party tooling or advisories that do not apply to your deployment.
Activation
Advisory suppression requires a single gate: the configuration file must contain "enabledFor" with "advisory" in the array. No CLI flag is needed -- the sentinel in the config file IS the opt-in gate.
If the enabledFor array is missing, empty, or does not include "advisory", all advisories are reported normally.
Config File Resolution (4-tier)
The advisory guardian resolves the suppression config using the same priority order as the audit pipeline:
- 1. Explicit
--config <path> argument - INLINECODE65 environment variable
- INLINECODE66
- INLINECODE67
Config Format
CODEBLOCK8
Sentinel Semantics
- -
"enabledFor": ["advisory"] -- only advisory suppression active - INLINECODE69 -- only audit suppression active (no effect on advisory pipeline)
- INLINECODE70 -- both pipelines honor suppressions
- Missing or empty
enabledFor -- no suppression active (safe default)
Matching Rules
- - checkId: exact match against the advisory ID (e.g.,
CVE-2026-25593 or CLAW-2026-0001) - skill: case-insensitive match against the affected skill name from the advisory
- Both fields must match for an advisory to be suppressed
Required Fields per Suppression Entry
| Field | Description | Example |
|---|
| INLINECODE74 | Advisory ID to suppress | INLINECODE75 |
| INLINECODE76 |
Affected skill name |
clawsec-suite |
|
reason | Justification for audit trail (required) |
First-party tooling, reviewed by security team |
|
suppressedAt | ISO 8601 date (YYYY-MM-DD) |
2026-02-15 |
Shared Config with Audit Pipeline
The advisory and audit pipelines share the same config file. Use the enabledFor array to control which pipelines honor the suppression list:
CODEBLOCK9
Audit entries (with check identifiers like skills.code_safety) are only matched by the audit pipeline. Advisory entries (with advisory IDs like CVE-2026-25593 or CLAW-2026-0001) are only matched by the advisory pipeline. Each pipeline filters for its own relevant entries.
Optional Skill Installation
Discover currently available installable skills dynamically, then install the ones you want:
CODEBLOCK10
Machine-readable output is also available for automation:
CODEBLOCK11
Security Notes
- - Always verify
checksums.json signature before trusting its file URLs/hashes, then verify each file checksum. - Verify advisory feed detached signatures; do not enable
CLAWSEC_ALLOW_UNSIGNED_FEED outside temporary migration windows. - Keep advisory polling rate-limited (at least 5 minutes between checks).
- Treat
critical and high advisories affecting installed skills as immediate action items. - If you migrate off standalone
clawsec-feed, keep one canonical state file to avoid duplicate notifications. - Pin and verify public key fingerprints out-of-band before first use.
ClawSec 套件
操作说明
- - 所需运行时:node、npx、openclaw、curl、jq、shasum、openssl、unzip
- 副作用:安装脚本会在 ~/.openclaw/hooks 下安装一个咨询钩子,可选择创建无人值守的 openclaw cron 任务,并使用 npx clawhub@latest install 进行受保护的安装
- 网络行为:除非指定本地路径,否则会获取已签名的咨询源数据制品和远程目录元数据
- 信任模型:该套件可以建议删除或阻止风险安装,但删除/安装覆盖操作仍需审批授权
这意味着 clawsec-suite 可以:
- - 监控 ClawSec 咨询源,
- 追踪自上次检查以来新增的咨询,
- 将咨询与本地已安装的技能进行交叉引用,
- 针对恶意技能咨询建议删除,并首先要求用户明确批准,
- 同时仍作为其他 ClawSec 防护措施的设置/管理入口点。
内置保护与可选保护
clawsec-suite 内置功能
- - 嵌入式源种子文件:advisories/feed.json
- HEARTBEAT.md 中的便携式心跳工作流
- 咨询轮询 + 状态追踪 + 受影响技能检查
- OpenClaw 咨询守护钩子包:hooks/clawsec-advisory-guardian/
- 钩子和可选 cron 调度的安装脚本:scripts/
- 受保护的安装器:scripts/guardedskillinstall.mjs
- 可安装技能的动态目录发现:scripts/discoverskillcatalog.mjs
单独安装(动态目录)
clawsec-suite 不会在此文档中硬编码附加技能名称。
在运行时从权威索引(https://clawsec.prompt.security/skills/index.json)发现当前目录:
bash
SUITEDIR=${INSTALLROOT:-$HOME/.openclaw/skills}/clawsec-suite
node $SUITEDIR/scripts/discoverskill_catalog.mjs
回退行为:
- - 如果远程目录索引可达且有效,套件将使用它。
- 如果远程索引不可用或格式错误,脚本将回退到 skill.json 中的套件本地目录元数据。
安装
跨 Shell 路径说明
- - 在 bash/zsh 中,保持路径变量可扩展(例如,INSTALL_ROOT=$HOME/.openclaw/skills)。
- 不要对包含 home 变量的路径使用单引号(避免 $HOME/.openclaw/skills)。
- 在 PowerShell 中,设置显式路径:
- $env:INSTALL_ROOT = Join-Path $HOME .openclaw\\skills
- - 如果传递的路径包含未解析的令牌(如 \$HOME/...),套件脚本现在会快速失败并显示清晰的错误信息。
选项 A:通过 clawhub(推荐)
bash
npx clawhub@latest install clawsec-suite
选项 B:手动下载并验证签名和校验和
bash
set -euo pipefail
VERSION=${SKILLVERSION:?设置 SKILLVERSION(例如 0.0.8)}
INSTALLROOT=${INSTALLROOT:-$HOME/.openclaw/skills}
DEST=$INSTALL_ROOT/clawsec-suite
BASE=https://github.com/prompt-security/clawsec/releases/download/clawsec-suite-v${VERSION}
TEMP_DIR=$(mktemp -d)
trap rm -rf $TEMP_DIR EXIT
固定的发布签名公钥(首次使用时带外验证指纹)
指纹(SPKI DER 的 SHA-256):711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8
RELEASE
PUBKEYSHA256=711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8
cat > $TEMP_DIR/release-signing-public.pem <
ACTUALKEYSHA256=$(openssl pkey -pubin -in $TEMP_DIR/release-signing-public.pem -outform DER | shasum -a 256 | awk {print $1})
if [ $ACTUALKEYSHA256 != $RELEASEPUBKEYSHA256 ]; then
echo 错误:发布公钥指纹不匹配 >&2
exit 1
fi
ZIP_NAME=clawsec-suite-v${VERSION}.zip
1) 下载发布归档 + 已签名的校验和清单 + 签名公钥
curl -fsSL $BASE/$ZIPNAME -o $TEMPDIR/$ZIP_NAME
curl -fsSL $BASE/checksums.json -o $TEMP_DIR/checksums.json
curl -fsSL $BASE/checksums.sig -o $TEMP_DIR/checksums.sig
2) 在信任任何哈希值之前验证校验和清单签名
openssl base64 -d -A -in $TEMPDIR/checksums.sig -out $TEMPDIR/checksums.sig.bin
if ! openssl pkeyutl -verify \
-pubin \
-inkey $TEMP_DIR/release-signing-public.pem \
-sigfile $TEMP_DIR/checksums.sig.bin \
-rawin \
-in $TEMP_DIR/checksums.json >/dev/null 2>&1; then
echo 错误:checksums.json 签名验证失败 >&2
exit 1
fi
EXPECTEDZIPSHA=$(jq -r .archive.sha256 // empty $TEMP_DIR/checksums.json)
if [ -z $EXPECTEDZIPSHA ]; then
echo 错误:checksums.json 缺少 archive.sha256 >&2
exit 1
fi
if command -v shasum >/dev/null 2>&1; then
ACTUALZIPSHA=$(shasum -a 256 $TEMPDIR/$ZIPNAME | awk {print $1})
else
ACTUALZIPSHA=$(sha256sum $TEMPDIR/$ZIPNAME | awk {print $1})
fi
if [ $EXPECTEDZIPSHA != $ACTUALZIPSHA ]; then
echo 错误:$ZIP_NAME 的归档校验和不匹配 >&2
exit 1
fi
echo 校验和清单签名和归档哈希已验证。
3) 安装已验证的归档
mkdir -p $INSTALL_ROOT
rm -rf $DEST
unzip -q $TEMPDIR/$ZIPNAME -d $INSTALL_ROOT
chmod 600 $DEST/skill.json
find $DEST -type f ! -name skill.json -exec chmod 644 {} \;
echo 已安装 clawsec-suite v${VERSION} 到:$DEST
echo 下一步(OpenClaw):node \\$DEST/scripts/setupadvisoryhook.mjs\
OpenClaw 自动化(钩子 + 可选 Cron)
安装套件后,启用咨询守护钩子:
bash
SUITEDIR=${INSTALLROOT:-$HOME/.openclaw/skills}/clawsec-suite
node $SUITEDIR/scripts/setupadvisory_hook.mjs
安装脚本在安装和启用持久钩子之前会打印预检审查。
可选:创建/更新一个定期 cron 提醒(默认每 6h),触发主会话咨询扫描:
bash
SUITEDIR=${INSTALLROOT:-$HOME/.openclaw/skills}/clawsec-suite
node $SUITEDIR/scripts/setupadvisory_cron.mjs
Cron 设置脚本在创建或更新无人值守任务之前会打印预检审查。
这会增加的功能:
- - 在 agent:bootstrap 和 /new(command:new)时扫描,
- 将咨询的 affected 条目与已安装的技能进行比较,
- 考虑 application: openclaw 的咨询(以及为了向后兼容没有 application 的旧条目),
- 当发现新的匹配时通知,
- 并在任何删除流程之前要求用户明确批准。
启用钩子后重启 OpenClaw