{"id":"6054b44e-2a6c-4959-bf2a-dd50835b67a2","entityType":"agent","slug":"clawhub-davida-ps-clawsec-suite","name":"clawsec-suite","canonicalUrl":"https://www.xpersona.co/agent/clawhub-davida-ps-clawsec-suite","canonicalPath":"/agent/clawhub-davida-ps-clawsec-suite","generatedAt":"2026-10-09T15:14:48.880Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"description":"ClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 3.9K downloads reported by the source. Last updated 4/15/2026.","installCommand":"clawhub skill install kn76m78f01hqrtpgm895s0jsax80jd8v:clawsec-suite","sourceUrl":"https://clawhub.ai/davida-ps/clawsec-suite","homepage":"https://clawhub.ai/davida-ps/clawsec-suite","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/davida-ps/clawsec-suite","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":65,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"clawsec-suite technical dossier on Xpersona with source links, trust signals, and execution metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No protocol or capability metadata is available."},"protocols":[],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":0,"capabilityMatrix":{"rows":[],"flattenedTokens":""}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"stars":null,"forks":null,"downloads":3854,"packageName":null,"latestVersion":"0.1.3","tractionLabel":"3.9K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-02-28T17:39:04.644Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T00:45:39.800Z","lastCrawledAt":"2026-02-28T17:39:04.644Z","lastIndexedAt":null,"nextCrawlAt":"2026-03-01T17:39:04.644Z","lastVerifiedAt":null,"highlights":[{"version":"0.1.3","createdAt":"2026-02-25T11:27:15.775Z","changelog":"Release 0.1.3 via CI","fileCount":29,"zipByteSize":59315},{"version":"0.1.2","createdAt":"2026-02-16T16:56:08.830Z","changelog":"Release 0.1.2 via CI","fileCount":26,"zipByteSize":53210},{"version":"0.1.1","createdAt":"2026-02-16T12:49:13.431Z","changelog":"Release 0.1.1 via CI","fileCount":null,"zipByteSize":null},{"version":"0.1.0","createdAt":"2026-02-16T11:35:46.667Z","changelog":"Release 0.1.0 via CI","fileCount":null,"zipByteSize":null},{"version":"0.0.10","createdAt":"2026-02-12T17:46:53.795Z","changelog":"Release 0.0.10 via CI","fileCount":null,"zipByteSize":null},{"version":"0.0.9","createdAt":"2026-02-09T06:39:56.118Z","changelog":"Release 0.0.9 via CI","fileCount":null,"zipByteSize":null},{"version":"0.0.8","createdAt":"2026-02-08T21:39:30.789Z","changelog":"Release 0.0.8 via CI","fileCount":null,"zipByteSize":null},{"version":"0.0.6","createdAt":"2026-02-05T23:17:52.513Z","changelog":"Release 0.0.6 via CI","fileCount":null,"zipByteSize":null}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install kn76m78f01hqrtpgm895s0jsax80jd8v:clawsec-suite","setupComplexity":"low","setupSteps":["Install using `clawhub skill install kn76m78f01hqrtpgm895s0jsax80jd8v:clawsec-suite` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/davida-ps/clawsec-suite before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":[]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T15:14:48.877Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-davida-ps-clawsec-suite/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"readme":"Skill: clawsec-suite\n\nOwner: davida-ps\n\nSummary: ClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup...\n\nTags: latest:0.1.3\n\nVersion history:\n\nv0.1.3 | 2026-02-25T11:27:15.775Z | user\n\nRelease 0.1.3 via CI\n\nv0.1.2 | 2026-02-16T16:56:08.830Z | user\n\nRelease 0.1.2 via CI\n\nv0.1.1 | 2026-02-16T12:49:13.431Z | user\n\nRelease 0.1.1 via CI\n\nv0.1.0 | 2026-02-16T11:35:46.667Z | user\n\nRelease 0.1.0 via CI\n\nv0.0.10 | 2026-02-12T17:46:53.795Z | user\n\nRelease 0.0.10 via CI\n\nv0.0.9 | 2026-02-09T06:39:56.118Z | user\n\nRelease 0.0.9 via CI\n\nv0.0.8 | 2026-02-08T21:39:30.789Z | user\n\nRelease 0.0.8 via CI\n\nv0.0.6 | 2026-02-05T23:17:52.513Z | user\n\nRelease 0.0.6 via CI\n\nv0.0.5 | 2026-02-05T22:55:03.375Z | user\n\nRelease 0.0.5 via CI\n\nv0.0.4 | 2026-02-05T22:38:34.592Z | user\n\nRelease 0.0.4 via CI\n\nv0.0.3 | 2026-02-05T22:35:12.245Z | user\n\nRelease 0.0.3 via CI\n\nv0.0.2 | 2026-02-05T22:01:08.104Z | user\n\nRelease 0.0.2 via CI\n\nv0.0.1 | 2026-02-05T21:17:12.957Z | user\n\nRelease 0.0.1 via CI\n\nArchive index:\n\nArchive v0.1.3: 29 files, 59315 bytes\n\nFiles: advisories/feed.json (6761b), CHANGELOG.md (8193b), HEARTBEAT.md (6803b), hooks/clawsec-advisory-guardian/handler.ts (8809b), hooks/clawsec-advisory-guardian/HOOK.md (2072b), hooks/clawsec-advisory-guardian/lib/advisory_scope.mjs (1197b), hooks/clawsec-advisory-guardian/lib/feed.mjs (17545b), hooks/clawsec-advisory-guardian/lib/matching.ts (6261b), hooks/clawsec-advisory-guardian/lib/state.ts (2475b), hooks/clawsec-advisory-guardian/lib/suppression.mjs (5483b), hooks/clawsec-advisory-guardian/lib/types.ts (871b), hooks/clawsec-advisory-guardian/lib/utils.mjs (3656b), hooks/clawsec-advisory-guardian/lib/version.mjs (2972b), scripts/discover_skill_catalog.mjs (8231b), scripts/generate_checksums_json.mjs (2176b), scripts/guarded_skill_install.mjs (9855b), scripts/setup_advisory_cron.mjs (2993b), scripts/setup_advisory_hook.mjs (2434b), scripts/sign_detached_ed25519.mjs (1689b), scripts/verify_detached_ed25519.mjs (1847b), skill.json (7572b), SKILL.md (14864b), test/advisory_application_scope.test.mjs (2959b), test/advisory_suppression.test.mjs (13437b), test/feed_verification.test.mjs (20208b), test/guarded_install.test.mjs (14573b), test/path_resolution.test.mjs (5321b), test/skill_catalog_discovery.test.mjs (7391b), _meta.json (132b)\n\nFile v0.1.3:SKILL.md\n\n---\nname: clawsec-suite\nversion: 0.1.3\ndescription: ClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup for additional security skills.\nhomepage: https://clawsec.prompt.security\nclawdis:\n  emoji: \"📦\"\n  requires:\n    bins: [curl, jq, shasum, openssl]\n---\n\n# ClawSec Suite\n\nThis means `clawsec-suite` can:\n- monitor the ClawSec advisory feed,\n- track which advisories are new since last check,\n- cross-reference advisories against locally installed skills,\n- recommend removal for malicious-skill advisories and require explicit user approval first,\n- and still act as the setup/management entrypoint for other ClawSec protections.\n\n## Included vs Optional Protections\n\n### Built into clawsec-suite\n- Embedded feed seed file: `advisories/feed.json`\n- Portable heartbeat workflow in `HEARTBEAT.md`\n- Advisory polling + state tracking + affected-skill checks\n- OpenClaw advisory guardian hook package: `hooks/clawsec-advisory-guardian/`\n- Setup scripts for hook and optional cron scheduling: `scripts/`\n- Guarded installer: `scripts/guarded_skill_install.mjs`\n- Dynamic catalog discovery for installable skills: `scripts/discover_skill_catalog.mjs`\n\n### Installed separately (dynamic catalog)\n`clawsec-suite` does not hard-code add-on skill names in this document.\n\nDiscover the current catalog from the authoritative index (`https://clawsec.prompt.security/skills/index.json`) at runtime:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/discover_skill_catalog.mjs\"\n```\n\nFallback behavior:\n- If the remote catalog index is reachable and valid, the suite uses it.\n- If the remote index is unavailable or malformed, the script falls back to suite-local catalog metadata in `skill.json`.\n\n## Installation\n\n### Cross-shell path note\n\n- In `bash`/`zsh`, keep path variables expandable (for example, `INSTALL_ROOT=\"$HOME/.openclaw/skills\"`).\n- Do not single-quote home-variable paths (avoid `'$HOME/.openclaw/skills'`).\n- In PowerShell, set an explicit path:\n  - `$env:INSTALL_ROOT = Join-Path $HOME \".openclaw\\\\skills\"`\n- If a path is passed with unresolved tokens (like `\\$HOME/...`), suite scripts now fail fast with a clear error.\n\n### Option A: Via clawhub (recommended)\n\n```bash\nnpx clawhub@latest install clawsec-suite\n```\n\n### Option B: Manual download with signature + checksum verification\n\n```bash\nset -euo pipefail\n\nVERSION=\"${SKILL_VERSION:?Set SKILL_VERSION (e.g. 0.0.8)}\"\nINSTALL_ROOT=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}\"\nDEST=\"$INSTALL_ROOT/clawsec-suite\"\nBASE=\"https://github.com/prompt-security/clawsec/releases/download/clawsec-suite-v${VERSION}\"\n\nTEMP_DIR=\"$(mktemp -d)\"\ntrap 'rm -rf \"$TEMP_DIR\"' EXIT\n\n# Pinned release-signing public key (verify fingerprint out-of-band on first use)\n# Fingerprint (SHA-256 of SPKI DER): 711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8\nRELEASE_PUBKEY_SHA256=\"711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8\"\ncat > \"$TEMP_DIR/release-signing-public.pem\" <<'PEM'\n-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAS7nijfMcUoOBCj4yOXJX+GYGv2pFl2Yaha1P4v5Cm6A=\n-----END PUBLIC KEY-----\nPEM\n\nACTUAL_KEY_SHA256=\"$(openssl pkey -pubin -in \"$TEMP_DIR/release-signing-public.pem\" -outform DER | shasum -a 256 | awk '{print $1}')\"\nif [ \"$ACTUAL_KEY_SHA256\" != \"$RELEASE_PUBKEY_SHA256\" ]; then\n  echo \"ERROR: Release public key fingerprint mismatch\" >&2\n  exit 1\nfi\n\nZIP_NAME=\"clawsec-suite-v${VERSION}.zip\"\n\n# 1) Download release archive + signed checksums manifest + signing public key\ncurl -fsSL \"$BASE/$ZIP_NAME\" -o \"$TEMP_DIR/$ZIP_NAME\"\ncurl -fsSL \"$BASE/checksums.json\" -o \"$TEMP_DIR/checksums.json\"\ncurl -fsSL \"$BASE/checksums.sig\" -o \"$TEMP_DIR/checksums.sig\"\n\n# 2) Verify checksums manifest signature before trusting any hashes\nopenssl base64 -d -A -in \"$TEMP_DIR/checksums.sig\" -out \"$TEMP_DIR/checksums.sig.bin\"\nif ! openssl pkeyutl -verify \\\n  -pubin \\\n  -inkey \"$TEMP_DIR/release-signing-public.pem\" \\\n  -sigfile \"$TEMP_DIR/checksums.sig.bin\" \\\n  -rawin \\\n  -in \"$TEMP_DIR/checksums.json\" >/dev/null 2>&1; then\n  echo \"ERROR: checksums.json signature verification failed\" >&2\n  exit 1\nfi\n\nEXPECTED_ZIP_SHA=\"$(jq -r '.archive.sha256 // empty' \"$TEMP_DIR/checksums.json\")\"\nif [ -z \"$EXPECTED_ZIP_SHA\" ]; then\n  echo \"ERROR: checksums.json missing archive.sha256\" >&2\n  exit 1\nfi\n\nif command -v shasum >/dev/null 2>&1; then\n  ACTUAL_ZIP_SHA=\"$(shasum -a 256 \"$TEMP_DIR/$ZIP_NAME\" | awk '{print $1}')\"\nelse\n  ACTUAL_ZIP_SHA=\"$(sha256sum \"$TEMP_DIR/$ZIP_NAME\" | awk '{print $1}')\"\nfi\n\nif [ \"$EXPECTED_ZIP_SHA\" != \"$ACTUAL_ZIP_SHA\" ]; then\n  echo \"ERROR: Archive checksum mismatch for $ZIP_NAME\" >&2\n  exit 1\nfi\n\necho \"Checksums manifest signature and archive hash verified.\"\n\n# 3) Install verified archive\nmkdir -p \"$INSTALL_ROOT\"\nrm -rf \"$DEST\"\nunzip -q \"$TEMP_DIR/$ZIP_NAME\" -d \"$INSTALL_ROOT\"\n\nchmod 600 \"$DEST/skill.json\"\nfind \"$DEST\" -type f ! -name \"skill.json\" -exec chmod 644 {} \\;\n\necho \"Installed clawsec-suite v${VERSION} to: $DEST\"\necho \"Next step (OpenClaw): node \\\"\\$DEST/scripts/setup_advisory_hook.mjs\\\"\"\n```\n\n## OpenClaw Automation (Hook + Optional Cron)\n\nAfter installing the suite, enable the advisory guardian hook:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/setup_advisory_hook.mjs\"\n```\n\nOptional: create/update a periodic cron nudge (default every `6h`) that triggers a main-session advisory scan:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/setup_advisory_cron.mjs\"\n```\n\nWhat this adds:\n- scan on `agent:bootstrap` and `/new` (`command:new`),\n- compare advisory `affected` entries against installed skills,\n- consider advisories with `application: \"openclaw\"` (and legacy entries without `application` for backward compatibility),\n- notify when new matches appear,\n- and ask for explicit user approval before any removal flow.\n\nRestart the OpenClaw gateway after enabling the hook. Then run `/new` once to force an immediate scan in the next session context.\n\n## Guarded Skill Install Flow (Double Confirmation)\n\nWhen the user asks to install a skill, treat that as the first request and run a guarded install check:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/guarded_skill_install.mjs\" --skill helper-plus --version 1.0.1\n```\n\nBehavior:\n- If no advisory match is found, install proceeds.\n- If `--version` is omitted, matching is conservative: any advisory that references the skill name is treated as a match.\n- If advisory match is found, the script prints advisory context and exits with code `42`.\n- Then require an explicit second confirmation from the user and rerun with `--confirm-advisory`:\n\n```bash\nnode \"$SUITE_DIR/scripts/guarded_skill_install.mjs\" --skill helper-plus --version 1.0.1 --confirm-advisory\n```\n\nThis enforces:\n1. First confirmation: user asked to install.\n2. Second confirmation: user explicitly approves install after seeing advisory details.\n\n## Embedded Advisory Feed Behavior\n\nThe embedded feed logic uses these defaults:\n\n- Remote feed URL: `https://clawsec.prompt.security/advisories/feed.json`\n- Remote feed signature URL: `${CLAWSEC_FEED_URL}.sig` (override with `CLAWSEC_FEED_SIG_URL`)\n- Remote checksums manifest URL: sibling `checksums.json` (override with `CLAWSEC_FEED_CHECKSUMS_URL`)\n- Local seed fallback: `~/.openclaw/skills/clawsec-suite/advisories/feed.json`\n- Local feed signature: `${CLAWSEC_LOCAL_FEED}.sig` (override with `CLAWSEC_LOCAL_FEED_SIG`)\n- Local checksums manifest: `~/.openclaw/skills/clawsec-suite/advisories/checksums.json`\n- Pinned feed signing key: `~/.openclaw/skills/clawsec-suite/advisories/feed-signing-public.pem` (override with `CLAWSEC_FEED_PUBLIC_KEY`)\n- State file: `~/.openclaw/clawsec-suite-feed-state.json`\n- Hook rate-limit env (OpenClaw hook): `CLAWSEC_HOOK_INTERVAL_SECONDS` (default `300`)\n\n**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.\n\n### Quick feed check\n\n```bash\nFEED_URL=\"${CLAWSEC_FEED_URL:-https://clawsec.prompt.security/advisories/feed.json}\"\nSTATE_FILE=\"${CLAWSEC_SUITE_STATE_FILE:-$HOME/.openclaw/clawsec-suite-feed-state.json}\"\n\nTMP=\"$(mktemp -d)\"\ntrap 'rm -rf \"$TMP\"' EXIT\n\nif ! curl -fsSLo \"$TMP/feed.json\" \"$FEED_URL\"; then\n  echo \"ERROR: Failed to fetch advisory feed\"\n  exit 1\nfi\n\nif ! jq -e '.version and (.advisories | type == \"array\")' \"$TMP/feed.json\" >/dev/null; then\n  echo \"ERROR: Invalid advisory feed format\"\n  exit 1\nfi\n\nmkdir -p \"$(dirname \"$STATE_FILE\")\"\nif [ ! -f \"$STATE_FILE\" ]; then\n  echo '{\"schema_version\":\"1.0\",\"known_advisories\":[],\"last_feed_check\":null,\"last_feed_updated\":null}' > \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n\nNEW_IDS_FILE=\"$TMP/new_ids.txt\"\njq -r --argfile state \"$STATE_FILE\" '($state.known_advisories // []) as $known | [.advisories[]?.id | select(. != null and ($known | index(.) | not))] | .[]?' \"$TMP/feed.json\" > \"$NEW_IDS_FILE\"\n\nif [ -s \"$NEW_IDS_FILE\" ]; then\n  echo \"New advisories detected:\"\n  while IFS= read -r id; do\n    [ -z \"$id\" ] && continue\n    jq -r --arg id \"$id\" '.advisories[] | select(.id == $id) | \"- [\\(.severity | ascii_upcase)] \\(.id): \\(.title)\"' \"$TMP/feed.json\"\n  done < \"$NEW_IDS_FILE\"\nelse\n  echo \"FEED_OK - no new advisories\"\nfi\n```\n\n## Heartbeat Integration\n\nUse the suite heartbeat script as the single periodic security check entrypoint:\n\n- `skills/clawsec-suite/HEARTBEAT.md`\n\nIt handles:\n- suite update checks,\n- feed polling,\n- new-advisory detection,\n- affected-skill cross-referencing,\n- approval-gated response guidance for malicious/removal advisories,\n- and persistent state updates.\n\n## Approval-Gated Response Contract\n\nIf an advisory indicates a malicious or removal-recommended skill and that skill is installed:\n\n1. Notify the user immediately with advisory details and severity.\n2. Recommend removing or disabling the affected skill.\n3. Treat the original install request as first intent only.\n4. Ask for explicit second confirmation before deletion/disable action (or before proceeding with risky install).\n5. Only proceed after that second confirmation.\n\nThe suite hook and heartbeat guidance are intentionally non-destructive by default.\n\n## Advisory Suppression / Allowlist\n\nThe 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.\n\n### Activation\n\nAdvisory 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.\n\nIf the `enabledFor` array is missing, empty, or does not include `\"advisory\"`, all advisories are reported normally.\n\n### Config File Resolution (4-tier)\n\nThe advisory guardian resolves the suppression config using the same priority order as the audit pipeline:\n\n1. Explicit `--config <path>` argument\n2. `OPENCLAW_AUDIT_CONFIG` environment variable\n3. `~/.openclaw/security-audit.json`\n4. `.clawsec/allowlist.json`\n\n### Config Format\n\n```json\n{\n  \"enabledFor\": [\"advisory\"],\n  \"suppressions\": [\n    {\n      \"checkId\": \"CVE-2026-25593\",\n      \"skill\": \"clawsec-suite\",\n      \"reason\": \"First-party security tooling — reviewed by security team\",\n      \"suppressedAt\": \"2026-02-15\"\n    },\n    {\n      \"checkId\": \"CLAW-2026-0001\",\n      \"skill\": \"example-skill\",\n      \"reason\": \"Advisory does not apply to our deployment configuration\",\n      \"suppressedAt\": \"2026-02-16\"\n    }\n  ]\n}\n```\n\n### Sentinel Semantics\n\n- `\"enabledFor\": [\"advisory\"]` -- only advisory suppression active\n- `\"enabledFor\": [\"audit\"]` -- only audit suppression active (no effect on advisory pipeline)\n- `\"enabledFor\": [\"audit\", \"advisory\"]` -- both pipelines honor suppressions\n- Missing or empty `enabledFor` -- no suppression active (safe default)\n\n### Matching Rules\n\n- **checkId:** exact match against the advisory ID (e.g., `CVE-2026-25593` or `CLAW-2026-0001`)\n- **skill:** case-insensitive match against the affected skill name from the advisory\n- Both fields must match for an advisory to be suppressed\n\n### Required Fields per Suppression Entry\n\n| Field | Description | Example |\n|-------|-------------|---------|\n| `checkId` | Advisory ID to suppress | `CVE-2026-25593` |\n| `skill` | Affected skill name | `clawsec-suite` |\n| `reason` | Justification for audit trail (required) | `First-party tooling, reviewed by security team` |\n| `suppressedAt` | ISO 8601 date (YYYY-MM-DD) | `2026-02-15` |\n\n### Shared Config with Audit Pipeline\n\nThe advisory and audit pipelines share the same config file. Use the `enabledFor` array to control which pipelines honor the suppression list:\n\n```json\n{\n  \"enabledFor\": [\"audit\", \"advisory\"],\n  \"suppressions\": [\n    {\n      \"checkId\": \"skills.code_safety\",\n      \"skill\": \"clawsec-suite\",\n      \"reason\": \"First-party tooling — audit finding accepted\",\n      \"suppressedAt\": \"2026-02-15\"\n    },\n    {\n      \"checkId\": \"CVE-2026-25593\",\n      \"skill\": \"clawsec-suite\",\n      \"reason\": \"First-party tooling — advisory reviewed\",\n      \"suppressedAt\": \"2026-02-15\"\n    }\n  ]\n}\n```\n\nAudit 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.\n\n## Optional Skill Installation\n\nDiscover currently available installable skills dynamically, then install the ones you want:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/discover_skill_catalog.mjs\"\n\n# then install any discovered skill by name\nnpx clawhub@latest install <skill-name>\n```\n\nMachine-readable output is also available for automation:\n\n```bash\nnode \"$SUITE_DIR/scripts/discover_skill_catalog.mjs\" --json\n```\n\n## Security Notes\n\n- Always verify `checksums.json` signature before trusting its file URLs/hashes, then verify each file checksum.\n- Verify advisory feed detached signatures; do not enable `CLAWSEC_ALLOW_UNSIGNED_FEED` outside temporary migration windows.\n- Keep advisory polling rate-limited (at least 5 minutes between checks).\n- Treat `critical` and `high` advisories affecting installed skills as immediate action items.\n- If you migrate off standalone `clawsec-feed`, keep one canonical state file to avoid duplicate notifications.\n- Pin and verify public key fingerprints out-of-band before first use.\n\nFile v0.1.3:_meta.json\n\n{\n  \"ownerId\": \"kn76m78f01hqrtpgm895s0jsax80jd8v\",\n  \"slug\": \"clawsec-suite\",\n  \"version\": \"0.1.3\",\n  \"publishedAt\": 1772018835775\n}\n\nFile v0.1.3:CHANGELOG.md\n\n# Changelog\n\nAll notable changes to the ClawSec Suite will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.1.3]\n\n### Added\n\n- Contributor credit: portability and path-hardening improvements in this release were contributed by [@aldodelgado](https://github.com/aldodelgado) in PR #62.\n- Cross-shell path resolution support for home-directory tokens in suite path configuration (`~`, `$HOME`, `${HOME}`, `%USERPROFILE%`, `$env:HOME`).\n- Dedicated path-resolution regression coverage (`test/path_resolution.test.mjs`) including fallback behavior for invalid explicit path values.\n- Additional advisory/installer tests validating home-token expansion and escaped-token rejection.\n\n### Changed\n\n- Advisory guardian hook now resolves configured path environment variables through a shared portability helper.\n- Guarded install flow now resolves feed/signature/checksum/public-key path overrides through the same shared path helper for consistent behavior across shells/OSes.\n- Advisory matching now explicitly scopes to `application: \"openclaw\"` when present; legacy advisories without `application` remain eligible for backward compatibility.\n\n### Fixed\n\n- Prevented advisory-check bypass when a single explicit path env var is malformed: invalid explicit values now fall back to safe defaults instead of aborting the entire hook run.\n\n### Security\n\n- Escaped/unexpanded home-token inputs in path config are explicitly rejected while preserving secure defaults.\n\n## [0.1.2]\n\n### Added\n\n- Advisory suppression module (`hooks/clawsec-advisory-guardian/lib/suppression.mjs`).\n- `loadAdvisorySuppression()` -- loads suppression config with `enabledFor: [\"advisory\"]` sentinel gate.\n- `isAdvisorySuppressed()` -- matches `advisory.id === rule.checkId` + case-insensitive skill name.\n- Advisory guardian handler integration: partitions matches into active/suppressed after `findMatches()`.\n- Suppressed matches tracked in state file (prevents re-evaluation) but not alerted.\n- Soft notification message for suppressed matches count.\n- Advisory suppression tests (13 tests in `advisory_suppression.test.mjs`).\n- Documentation in SKILL.md for advisory suppression/allowlist mechanism.\n\n### Changed\n\n- Advisory guardian handler (`handler.ts`) now loads suppression config and filters matches before alerting.\n\n### Security\n\n- Advisory suppression gated by config file sentinel (`enabledFor: [\"advisory\"]`) -- no CLI flag needed but config must explicitly opt in.\n- Suppressed matches are still tracked in state to maintain audit trail.\n\n## [0.1.1] - 2026-02-16\n\n### Added\n- Added `scripts/discover_skill_catalog.mjs` to dynamically discover installable skills from `https://clawsec.prompt.security/skills/index.json`.\n- Added `test/skill_catalog_discovery.test.mjs` to validate remote-catalog loading and fallback behavior.\n- Added CI signing-key drift guard script: `scripts/ci/verify_signing_key_consistency.sh`.\n\n### Changed\n- Updated `SKILL.md` to use dynamic catalog discovery commands instead of hard-coded optional-skill names.\n- Updated advisory feed defaults to signed-host URL (`https://clawsec.prompt.security/advisories/feed.json`).\n- Improved checksum manifest key compatibility in feed verification logic (supports basename and `advisories/*` key formats).\n- Kept `openclaw-audit-watchdog` as a standalone skill (not embedded in `clawsec-suite`).\n\n### Security\n- **Signing key drift control**: CI now enforces that all public key references (inline SKILL.md PEM, canonical `.pem` files, workflow-generated keys) resolve to the same fingerprint. Prevents stale, fabricated, or rotated-but-not-propagated key material from reaching releases.\n  - Enforced in: `.github/workflows/skill-release.yml`, `.github/workflows/deploy-pages.yml`\n  - Guard script: `scripts/ci/verify_signing_key_consistency.sh`\n\n### Fixed\n- **Fixed fabricated signing key in SKILL.md**: The manual installation script contained a hallucinated Ed25519 public key and fingerprint (`35866e1b...`) that never corresponded to the actual release signing key. Replaced with the real public key derived from the GitHub-secret-held private key. The bogus key was introduced in v0.0.10 (`Integration/signing work #20`) and went undetected because no consistency check existed at the time.\n- Corrected `checksums.sig` naming in release verification documentation.\n\n## [0.0.10] - 2026-02-11\n\n### Security\n\n#### Transport Security Hardening\n- **TLS Version Enforcement**: Eliminated support for TLS 1.0 and TLS 1.1, enforcing minimum TLS 1.2 for all HTTPS connections\n- **Certificate Validation**: Enabled strict certificate validation (`rejectUnauthorized: true`) to prevent MITM attacks\n- **Domain Allowlist**: Restricted advisory feed connections to approved domains only:\n  - `clawsec.prompt.security` (official ClawSec feed host)\n  - `prompt.security` (parent domain)\n  - `raw.githubusercontent.com` (GitHub raw content)\n  - `github.com` (GitHub releases)\n- **Strong Cipher Suites**: Configured modern cipher suites (AES-GCM, ChaCha20-Poly1305) for secure connections\n\n#### Signature Verification & Checksum Validation\n- **Fixed unverified file publication**: Refactored `deploy-pages.yml` workflow to download release assets to temporary directory before signature verification, ensuring unverified files never reach public directory\n- **Fixed schema mismatch**: Updated `deploy-pages.yml` to generate `checksums.json` with proper `schema_version` and `algorithm` fields that match parser expectations\n- **Fixed missing checksums abort**: Updated `loadRemoteFeed` to gracefully skip checksum verification when `checksums.json` is missing (e.g., GitHub raw content), while still enforcing fail-closed signature verification\n- **Fixed parser strictness**: Enhanced `parseChecksumsManifest` to accept legacy manifest formats through a fallback chain:\n  1. `schema_version` (new standard)\n  2. `version` (skill-release.yml format)\n  3. `generated_at` (old deploy-pages.yml format)\n  4. `\"1\"` (ultimate fallback)\n\n### Changed\n- Advisory feed loader now uses `secureFetch` wrapper with TLS 1.2+ enforcement and domain validation\n- Checksum verification is now graceful: feeds load successfully from sources without checksums (e.g., GitHub raw) while maintaining fail-closed signature verification\n- Workflow release mirroring flow changed from `download → verify → skip` to `download to temp → verify → mirror` (fail = delete temp)\n\n### Fixed\n- Unverified skill releases no longer published to public directory on signature verification failure\n- Schema mismatch between generated and expected checksums manifest fields\n- Feed loading failures when checksums.json missing from upstream sources\n- Parser rejection of valid legacy manifest formats\n\n### Security Impact\n- **Fail-closed security maintained**: All feed signatures still verified; invalid signatures reject feed loading\n- **No backward compatibility break**: Legacy manifests continue working through fallback chain\n- **Enhanced transport security**: Connections protected against downgrade attacks and MITM\n- **Defense in depth**: Multiple layers of verification (domain, TLS, certificate, signature, checksum)\n\n---\n\n## Release Notes Template\n\nWhen creating a new release, copy this template to the GitHub release notes:\n\n```markdown\n## Security Improvements\n\n### Transport Security\n✅ TLS 1.2+ enforcement (eliminated TLS 1.0, 1.1)\n✅ Strict certificate validation\n✅ Domain allowlist (prompt.security, github.com only)\n✅ Modern cipher suites (AES-GCM, ChaCha20-Poly1305)\n\n### Signature & Checksum Verification\n✅ Unverified files never published (temp directory workflow)\n✅ Proper schema fields in generated checksums.json\n✅ Graceful fallback when checksums missing (GitHub raw)\n✅ Legacy manifest format support (backward compatible)\n\n### Testing\nAll verification tests passed:\n- ✅ Unit tests: 14/14 passed\n- ✅ Parser lenience: 3/3 legacy formats accepted\n- ✅ Remote loading: Gracefully handles missing checksums\n- ✅ Workflow security: Temp directory prevents unverified publication\n```\n\nFile v0.1.3:HEARTBEAT.md\n\n# ClawSec Suite — Heartbeat Check\n\nRun this periodically (cron/systemd/CI/agent scheduler). It assumes POSIX shell, `curl`, and `jq`.\n\n## Goals\n\n1. Check whether `clawsec-suite` has an update available.\n2. Poll the advisory feed.\n3. Report new advisories, highlight affected installed skills, and require approval before removal actions.\n\n---\n\n## Configuration\n\n```bash\nINSTALL_ROOT=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}\"\nSUITE_DIR=\"$INSTALL_ROOT/clawsec-suite\"\nCHECKSUMS_URL=\"${CHECKSUMS_URL:-https://clawsec.prompt.security/releases/latest/download/checksums.json}\"\nFEED_URL=\"${CLAWSEC_FEED_URL:-https://clawsec.prompt.security/advisories/feed.json}\"\nSTATE_FILE=\"${CLAWSEC_SUITE_STATE_FILE:-$HOME/.openclaw/clawsec-suite-feed-state.json}\"\nMIN_FEED_INTERVAL_SECONDS=\"${MIN_FEED_INTERVAL_SECONDS:-300}\"\n```\n\n---\n\n## Step 0 — Basic sanity\n\n```bash\nset -euo pipefail\n\ntest -d \"$SUITE_DIR\"\ntest -f \"$SUITE_DIR/skill.json\"\n\necho \"=== ClawSec Suite Heartbeat ===\"\necho \"When:  $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\necho \"Suite: $SUITE_DIR\"\n```\n\n---\n\n## Step 1 — Check suite version updates\n\n```bash\nTMP=\"$(mktemp -d)\"\ntrap 'rm -rf \"$TMP\"' EXIT\n\ncurl -fsSLo \"$TMP/checksums.json\" \"$CHECKSUMS_URL\"\n\nINSTALLED_VER=\"$(jq -r '.version // \"\"' \"$SUITE_DIR/skill.json\" 2>/dev/null || true)\"\nLATEST_VER=\"$(jq -r '.version // \"\"' \"$TMP/checksums.json\" 2>/dev/null || true)\"\n\necho \"Installed suite: ${INSTALLED_VER:-unknown}\"\necho \"Latest suite:    ${LATEST_VER:-unknown}\"\n\nif [ -n \"$LATEST_VER\" ] && [ \"$LATEST_VER\" != \"$INSTALLED_VER\" ]; then\n  echo \"UPDATE AVAILABLE: clawsec-suite ${INSTALLED_VER:-unknown} -> $LATEST_VER\"\nelse\n  echo \"Suite appears up to date.\"\nfi\n```\n\n---\n\n## Step 2 — Initialize advisory state\n\n```bash\nmkdir -p \"$(dirname \"$STATE_FILE\")\"\n\nif [ ! -f \"$STATE_FILE\" ]; then\n  echo '{\"schema_version\":\"1.0\",\"known_advisories\":[],\"last_feed_check\":null,\"last_feed_updated\":null}' > \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n\nif ! jq -e '.schema_version and .known_advisories' \"$STATE_FILE\" >/dev/null 2>&1; then\n  echo \"WARNING: Invalid state file, resetting: $STATE_FILE\"\n  cp \"$STATE_FILE\" \"${STATE_FILE}.bak.$(date -u +%Y%m%d%H%M%S)\" 2>/dev/null || true\n  echo '{\"schema_version\":\"1.0\",\"known_advisories\":[],\"last_feed_check\":null,\"last_feed_updated\":null}' > \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n```\n\n---\n\n## Step 3 — Advisory feed check (embedded clawsec-feed)\n\n```bash\nnow_epoch=\"$(date -u +%s)\"\nlast_check=\"$(jq -r '.last_feed_check // \"1970-01-01T00:00:00Z\"' \"$STATE_FILE\")\"\nlast_epoch=\"$(date -u -d \"$last_check\" +%s 2>/dev/null || date -u -j -f \"%Y-%m-%dT%H:%M:%SZ\" \"$last_check\" +%s 2>/dev/null || echo 0)\"\n\nif [ $((now_epoch - last_epoch)) -lt \"$MIN_FEED_INTERVAL_SECONDS\" ]; then\n  echo \"Feed check skipped (rate limit: ${MIN_FEED_INTERVAL_SECONDS}s).\"\nelse\n  FEED_TMP=\"$TMP/feed.json\"\n  FEED_SOURCE=\"$FEED_URL\"\n\n  if ! curl -fsSLo \"$FEED_TMP\" \"$FEED_URL\"; then\n    if [ -f \"$SUITE_DIR/advisories/feed.json\" ]; then\n      cp \"$SUITE_DIR/advisories/feed.json\" \"$FEED_TMP\"\n      FEED_SOURCE=\"$SUITE_DIR/advisories/feed.json (local fallback)\"\n      echo \"WARNING: Remote feed unavailable, using local fallback.\"\n    else\n      echo \"ERROR: Remote feed unavailable and no local fallback feed found.\"\n      exit 1\n    fi\n  fi\n\n  if ! jq -e '.version and (.advisories | type == \"array\")' \"$FEED_TMP\" >/dev/null 2>&1; then\n    echo \"ERROR: Advisory feed has invalid format.\"\n    exit 1\n  fi\n\n  echo \"Feed source: $FEED_SOURCE\"\n  echo \"Feed updated: $(jq -r '.updated // \"unknown\"' \"$FEED_TMP\")\"\n\n  NEW_IDS_FILE=\"$TMP/new_ids.txt\"\n  jq -r --argfile state \"$STATE_FILE\" '($state.known_advisories // []) as $known | [.advisories[]?.id | select(. != null and ($known | index(.) | not))] | .[]?' \"$FEED_TMP\" > \"$NEW_IDS_FILE\"\n\n  if [ -s \"$NEW_IDS_FILE\" ]; then\n    echo \"New advisories:\"\n    while IFS= read -r id; do\n      [ -z \"$id\" ] && continue\n      jq -r --arg id \"$id\" '.advisories[] | select(.id == $id) | \"- [\\(.severity | ascii_upcase)] \\(.id): \\(.title)\"' \"$FEED_TMP\"\n      jq -r --arg id \"$id\" '.advisories[] | select(.id == $id) | \"  Action: \\(.action // \"Review advisory details\")\"' \"$FEED_TMP\"\n    done < \"$NEW_IDS_FILE\"\n  else\n    echo \"FEED_OK - no new advisories\"\n  fi\n\n  echo \"Affected installed skills (if any):\"\n  found_affected=0\n  removal_recommended=0\n  for skill_path in \"$INSTALL_ROOT\"/*; do\n    [ -d \"$skill_path\" ] || continue\n    skill_name=\"$(basename \"$skill_path\")\"\n\n    skill_hits=\"$(jq -r --arg skill_prefix \"${skill_name}@\" '\n      [.advisories[]\n      | select(any(.affected[]?; startswith($skill_prefix)))\n      | \"- [\\(.severity | ascii_upcase)] \\(.id): \\(.title)\\n  Action: \\(.action // \"Review advisory details\")\"\n      ] | .[]?\n    ' \"$FEED_TMP\")\"\n\n    if [ -n \"$skill_hits\" ]; then\n      found_affected=1\n      echo \"- $skill_name is referenced by advisory feed entries\"\n      printf \"%s\\n\" \"$skill_hits\"\n\n      if jq -e --arg skill_prefix \"${skill_name}@\" '\n        any(\n          .advisories[];\n          any(.affected[]?; startswith($skill_prefix))\n          and (\n            ((.type // \"\" | ascii_downcase) == \"malicious_skill\")\n            or ((.title // \"\" | ascii_downcase | test(\"malicious|exfiltrat|backdoor|trojan|stealer\")))\n            or ((.description // \"\" | ascii_downcase | test(\"malicious|exfiltrat|backdoor|trojan|stealer\")))\n            or ((.action // \"\" | ascii_downcase | test(\"remove|uninstall|disable|do not use|quarantine\")))\n          )\n        )\n      ' \"$FEED_TMP\" >/dev/null 2>&1; then\n        removal_recommended=1\n      fi\n    fi\n  done\n\n  if [ \"$found_affected\" -eq 0 ]; then\n    echo \"- none\"\n  fi\n\n  if [ \"$removal_recommended\" -eq 1 ]; then\n    echo \"Approval required: ask the user for explicit approval before removing any skill.\"\n    echo \"Double-confirmation policy: install request is first intent; require a second explicit confirmation with advisory context.\"\n  fi\n\n  # Persist state\n  current_utc=\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"\n  state_tmp=\"$TMP/state.json\"\n\n  jq --arg t \"$current_utc\" --arg updated \"$(jq -r '.updated // \"\"' \"$FEED_TMP\")\" --argfile feed \"$FEED_TMP\" '\n    .last_feed_check = $t\n    | .last_feed_updated = (if $updated == \"\" then .last_feed_updated else $updated end)\n    | .known_advisories = ((.known_advisories // []) + [$feed.advisories[]?.id] | map(select(. != null)) | unique)\n  ' \"$STATE_FILE\" > \"$state_tmp\"\n\n  mv \"$state_tmp\" \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n```\n\n---\n\n## Output Summary\n\nHeartbeat output should include:\n- suite version status,\n- advisory feed status,\n- new advisory list (if any),\n- installed skills that appear in advisory `affected` lists,\n- and a double-confirmation reminder before risky install/remove actions.\n\nIf your runtime sends alerts, treat `critical` and `high` advisories affecting installed skills as immediate notifications.\n\nFile v0.1.3:hooks/clawsec-advisory-guardian/HOOK.md\n\n---\nname: clawsec-advisory-guardian\ndescription: Detect advisory matches for installed skills and require explicit user approval before any removal action.\nmetadata: { \"openclaw\": { \"events\": [\"agent:bootstrap\", \"command:new\"] } }\n---\n\n# ClawSec Advisory Guardian Hook\n\nThis hook checks the ClawSec advisory feed against locally installed skills on:\n\n- `agent:bootstrap`\n- `command:new`\n\nWhen it detects an advisory affecting an installed skill, it posts an alert message.\nIf the advisory looks malicious or removal-oriented, it explicitly recommends removal\nand asks for user approval first.\n\n## Safety Contract\n\n- The hook does not delete or modify skills.\n- It only reports findings and requests explicit approval before removal.\n- Alerts are deduplicated using `~/.openclaw/clawsec-suite-feed-state.json`.\n\n## Optional Environment Variables\n\n- `CLAWSEC_FEED_URL`: override remote feed URL.\n- `CLAWSEC_FEED_SIG_URL`: override detached remote feed signature URL (default `${CLAWSEC_FEED_URL}.sig`).\n- `CLAWSEC_FEED_CHECKSUMS_URL`: override remote checksum manifest URL (default sibling `checksums.json`).\n- `CLAWSEC_FEED_CHECKSUMS_SIG_URL`: override detached remote checksum manifest signature URL.\n- `CLAWSEC_FEED_PUBLIC_KEY`: path to pinned feed-signing public key PEM.\n- `CLAWSEC_LOCAL_FEED`: override local fallback feed file.\n- `CLAWSEC_LOCAL_FEED_SIG`: override local detached feed signature path.\n- `CLAWSEC_LOCAL_FEED_CHECKSUMS`: override local checksum manifest path.\n- `CLAWSEC_LOCAL_FEED_CHECKSUMS_SIG`: override local checksum manifest signature path.\n- `CLAWSEC_VERIFY_CHECKSUM_MANIFEST`: set to `0` only for emergency troubleshooting (default verifies checksums).\n- `CLAWSEC_ALLOW_UNSIGNED_FEED`: set to `1` only for temporary migration compatibility; bypasses signature/checksum verification.\n- `CLAWSEC_SUITE_STATE_FILE`: override state file path.\n- `CLAWSEC_INSTALL_ROOT`: override installed skills root.\n- `CLAWSEC_SUITE_DIR`: override clawsec-suite install path.\n- `CLAWSEC_HOOK_INTERVAL_SECONDS`: minimum interval between hook scans (default `300`).\n\nFile v0.1.3:advisories/feed.json\n\n{\n  \"version\": \"0.0.2\",\n  \"updated\": \"2026-02-08T06:16:28Z\",\n  \"description\": \"Community-driven security advisory feed for ClawSec. Automatically updated with OpenClaw-related CVEs from NVD and community-reported security incidents.\",\n  \"advisories\": [\n    {\n      \"id\": \"CVE-2026-25593\",\n      \"severity\": \"high\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw is a personal AI assistant. Prior to 2026.1.20, an unauthenticated local client could use t...\",\n      \"description\": \"OpenClaw is a personal AI assistant. Prior to 2026.1.20, an unauthenticated local client could use the Gateway WebSocket API to write config via config.apply and set unsafe cliPath values that were later used for command discovery, enabling command injection as the gateway user. This vulnerability is fixed in 2026.1.20.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-06T21:16:17.790\",\n      \"references\": [\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-g55j-c2v4-pjcg\"\n      ],\n      \"cvss_score\": 8.4,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-25593\"\n    },\n    {\n      \"id\": \"CVE-2026-25475\",\n      \"severity\": \"medium\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw is a personal AI assistant. Prior to version 2026.1.30, the isValidMedia() function in src/...\",\n      \"description\": \"OpenClaw is a personal AI assistant. Prior to version 2026.1.30, the isValidMedia() function in src/media/parse.ts allows arbitrary file paths including absolute paths, home directory paths, and directory traversal sequences. An agent can read any file on the system by outputting MEDIA:/path/to/file, exfiltrating sensitive data to the user/channel. This issue has been patched in version 2026.1.30.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-04T20:16:07.287\",\n      \"references\": [\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-r8g4-86fx-92mq\"\n      ],\n      \"cvss_score\": 6.5,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-25475\"\n    },\n    {\n      \"id\": \"CVE-2026-25157\",\n      \"severity\": \"high\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw is a personal AI assistant. Prior to version 2026.1.29, there is an OS command injection vu...\",\n      \"description\": \"OpenClaw is a personal AI assistant. Prior to version 2026.1.29, there is an OS command injection vulnerability via the Project Root Path in sshNodeCommand. The sshNodeCommand function constructed a shell script without properly escaping the user-supplied project path in an error message. When the cd command failed, the unescaped path was interpolated directly into an echo statement, allowing arbitrary command execution on the remote SSH host. The parseSSHTarget function did not validate that SSH target strings could not begin with a dash. An attacker-supplied target like -oProxyCommand=... would be interpreted as an SSH configuration flag rather than a hostname, allowing arbitrary command execution on the local machine. This issue has been patched in version 2026.1.29.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-04T20:16:06.577\",\n      \"references\": [\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-q284-4pvr-m585\"\n      ],\n      \"cvss_score\": 7.7,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-25157\"\n    },\n    {\n      \"id\": \"CLAW-2026-0001\",\n      \"severity\": \"high\",\n      \"type\": \"prompt_injection\",\n      \"title\": \"Data exfiltration attempt via helper-plus skill\",\n      \"description\": \"The helper-plus skill was observed sending conversation data to an external server (suspicious-domain.com) on every invocation. The skill makes undocumented network calls that transmit full conversation context to a domain not mentioned in the skill description.\",\n      \"affected\": [\n        \"helper-plus@1.0.0\",\n        \"helper-plus@1.0.1\"\n      ],\n      \"action\": \"Remove helper-plus immediately. Do not use versions 1.0.0 or 1.0.1. Wait for a verified patched version.\",\n      \"published\": \"2026-02-04T09:30:00Z\",\n      \"references\": [],\n      \"source\": \"Community Report\",\n      \"github_issue_url\": \"https://github.com/prompt-security/clawsec/issues/1\",\n      \"reporter\": {\n        \"agent_name\": \"SecurityBot\",\n        \"opener_type\": \"agent\"\n      }\n    },\n    {\n      \"id\": \"CVE-2026-24763\",\n      \"severity\": \"high\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw (formerly  Clawdbot) is a personal AI assistant you run on your own devices. Prior to 2026....\",\n      \"description\": \"OpenClaw (formerly  Clawdbot) is a personal AI assistant you run on your own devices. Prior to 2026.1.29, a command injection vulnerability existed in OpenClaw’s Docker sandbox execution mechanism due to unsafe handling of the PATH environment variable when constructing shell commands. An authenticated user able to control environment variables could influence command execution within the container context. This vulnerability is fixed in 2026.1.29.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-02T23:16:08.593\",\n      \"references\": [\n        \"https://github.com/openclaw/openclaw/commit/771f23d36b95ec2204cc9a0054045f5d8439ea75\",\n        \"https://github.com/openclaw/openclaw/releases/tag/v2026.1.29\",\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-mc68-q9jw-2h3v\"\n      ],\n      \"cvss_score\": 8.8,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-24763\"\n    },\n    {\n      \"id\": \"CVE-2026-25253\",\n      \"severity\": \"high\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw (aka clawdbot or Moltbot) before 2026.1.29 obtains a gatewayUrl value from a query string a...\",\n      \"description\": \"OpenClaw (aka clawdbot or Moltbot) before 2026.1.29 obtains a gatewayUrl value from a query string and automatically makes a WebSocket connection without prompting, sending a token value.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-01T23:15:49.717\",\n      \"references\": [\n        \"https://depthfirst.com/post/1-click-rce-to-steal-your-moltbot-data-and-keys\",\n        \"https://ethiack.com/news/blog/one-click-rce-moltbot\",\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-g8p2-7wf7-98mq\"\n      ],\n      \"cvss_score\": 8.8,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-25253\"\n    }\n  ]\n}\n\nFile v0.1.3:skill.json\n\n{\n  \"name\": \"clawsec-suite\",\n  \"version\": \"0.1.3\",\n  \"description\": \"ClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup for additional security skills.\",\n  \"author\": \"prompt-security\",\n  \"license\": \"AGPL-3.0-or-later\",\n  \"homepage\": \"https://clawsec.prompt.security/\",\n  \"keywords\": [\n    \"security\",\n    \"skills\",\n    \"catalog\",\n    \"installer\",\n    \"integrity\",\n    \"advisory\",\n    \"feed\",\n    \"threat-intel\",\n    \"hooks\",\n    \"approval\",\n    \"agents\",\n    \"ai\",\n    \"suite\",\n    \"openclaw\",\n    \"signature\",\n    \"verification\"\n  ],\n  \"sbom\": {\n    \"files\": [\n      {\n        \"path\": \"SKILL.md\",\n        \"required\": true,\n        \"description\": \"Suite skill documentation and installation guide\"\n      },\n      {\n        \"path\": \"CHANGELOG.md\",\n        \"required\": true,\n        \"description\": \"Version history and security improvements changelog\"\n      },\n      {\n        \"path\": \"HEARTBEAT.md\",\n        \"required\": true,\n        \"description\": \"Portable heartbeat and update-check procedure\"\n      },\n      {\n        \"path\": \"advisories/feed.json\",\n        \"required\": true,\n        \"description\": \"Embedded advisory feed seed (merged from clawsec-feed)\"\n      },\n      {\n        \"path\": \"advisories/feed.json.sig\",\n        \"required\": true,\n        \"description\": \"Detached Ed25519 signature for advisory feed\"\n      },\n      {\n        \"path\": \"advisories/checksums.json\",\n        \"required\": true,\n        \"description\": \"SHA-256 checksum manifest for advisory artifacts\"\n      },\n      {\n        \"path\": \"advisories/checksums.json.sig\",\n        \"required\": true,\n        \"description\": \"Detached Ed25519 signature for checksum manifest\"\n      },\n      {\n        \"path\": \"advisories/feed-signing-public.pem\",\n        \"required\": true,\n        \"description\": \"Pinned Ed25519 public key for feed signature verification\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/HOOK.md\",\n        \"required\": true,\n        \"description\": \"OpenClaw hook metadata for advisory-driven malicious-skill checks\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/handler.ts\",\n        \"required\": true,\n        \"description\": \"OpenClaw hook handler for approval-gated advisory actions with signature verification\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/utils.mjs\",\n        \"required\": true,\n        \"description\": \"Shared utility functions (isObject, normalizeSkillName, uniqueStrings)\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/version.mjs\",\n        \"required\": true,\n        \"description\": \"Shared semver parsing and version matching logic\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/feed.mjs\",\n        \"required\": true,\n        \"description\": \"Advisory feed loading with Ed25519 signature and checksum manifest verification\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/types.ts\",\n        \"required\": true,\n        \"description\": \"TypeScript type definitions for hook and feed structures\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/state.ts\",\n        \"required\": true,\n        \"description\": \"Advisory state persistence and loading\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/matching.ts\",\n        \"required\": true,\n        \"description\": \"Advisory-to-skill matching and alert message generation\"\n      },\n      {\n        \"path\": \"scripts/setup_advisory_hook.mjs\",\n        \"required\": true,\n        \"description\": \"Installer script for enabling the advisory guardian hook\"\n      },\n      {\n        \"path\": \"scripts/setup_advisory_cron.mjs\",\n        \"required\": true,\n        \"description\": \"Installer script for optional periodic advisory scan cron\"\n      },\n      {\n        \"path\": \"scripts/guarded_skill_install.mjs\",\n        \"required\": true,\n        \"description\": \"Two-step confirmation installer with signature verification that blocks risky skill installs\"\n      },\n      {\n        \"path\": \"scripts/discover_skill_catalog.mjs\",\n        \"required\": true,\n        \"description\": \"Dynamic skill-catalog discovery with remote index fetch and suite-local fallback metadata\"\n      },\n      {\n        \"path\": \"scripts/sign_detached_ed25519.mjs\",\n        \"required\": false,\n        \"description\": \"Utility script for generating Ed25519 detached signatures\"\n      },\n      {\n        \"path\": \"scripts/verify_detached_ed25519.mjs\",\n        \"required\": false,\n        \"description\": \"Utility script for verifying Ed25519 detached signatures\"\n      },\n      {\n        \"path\": \"scripts/generate_checksums_json.mjs\",\n        \"required\": false,\n        \"description\": \"Utility script for generating SHA-256 checksum manifests\"\n      }\n    ]\n  },\n  \"embedded_components\": {\n    \"clawsec-feed\": {\n      \"source_skill\": \"clawsec-feed\",\n      \"source_version\": \"0.0.4\",\n      \"paths\": [\n        \"advisories/feed.json\",\n        \"advisories/feed.json.sig\",\n        \"advisories/checksums.json\",\n        \"advisories/checksums.json.sig\",\n        \"advisories/feed-signing-public.pem\"\n      ],\n      \"capabilities\": [\n        \"advisory-feed monitoring\",\n        \"new-advisory detection\",\n        \"affected-skill cross-reference\",\n        \"approval-gated malicious-skill removal recommendations\",\n        \"double-confirmation gating for risky skill installs\",\n        \"Ed25519 signature verification\",\n        \"checksum manifest verification\"\n      ],\n      \"standalone_available\": true,\n      \"deprecation_plan\": \"standalone skill may be retired after suite migration is verified\"\n    }\n  },\n  \"catalog\": {\n    \"description\": \"Available protections in the ClawSec suite\",\n    \"base_url\": \"https://clawsec.prompt.security/releases/download\",\n    \"skills\": {\n      \"clawsec-feed\": {\n        \"description\": \"Advisory monitoring is now embedded in clawsec-suite\",\n        \"integrated_in_suite\": true,\n        \"standalone_available\": true,\n        \"compatible\": [\n          \"openclaw\",\n          \"moltbot\",\n          \"clawdbot\",\n          \"other\"\n        ]\n      },\n      \"openclaw-audit-watchdog\": {\n        \"description\": \"Automated daily audits with email reporting\",\n        \"default_install\": true,\n        \"compatible\": [\n          \"openclaw\",\n          \"moltbot\",\n          \"clawdbot\"\n        ],\n        \"note\": \"Tailored for OpenClaw/MoltBot family\"\n      },\n      \"soul-guardian\": {\n        \"description\": \"Drift detection and file integrity guard\",\n        \"default_install\": false,\n        \"compatible\": [\n          \"openclaw\",\n          \"moltbot\",\n          \"clawdbot\",\n          \"other\"\n        ]\n      },\n      \"clawtributor\": {\n        \"description\": \"Community incident reporting (shares anonymized data)\",\n        \"default_install\": false,\n        \"requires_explicit_consent\": true,\n        \"compatible\": [\n          \"openclaw\",\n          \"moltbot\",\n          \"clawdbot\",\n          \"other\"\n        ]\n      }\n    }\n  },\n  \"openclaw\": {\n    \"emoji\": \"📦\",\n    \"category\": \"security\",\n    \"requires\": {\n      \"bins\": [\n        \"curl\",\n        \"jq\",\n        \"shasum\",\n        \"openssl\"\n      ]\n    },\n    \"triggers\": [\n      \"clawsec suite\",\n      \"security suite\",\n      \"security advisories\",\n      \"malicious skill alert\",\n      \"remove malicious skills\",\n      \"safe skill install\",\n      \"confirm skill install\",\n      \"check advisories\",\n      \"advisory feed\",\n      \"install security skills\",\n      \"verify skills\",\n      \"check skill integrity\",\n      \"update skills\"\n    ]\n  }\n}\n\nArchive v0.1.2: 26 files, 53210 bytes\n\nFiles: advisories/feed.json (6761b), CHANGELOG.md (6836b), HEARTBEAT.md (6803b), hooks/clawsec-advisory-guardian/handler.ts (8337b), hooks/clawsec-advisory-guardian/HOOK.md (2072b), hooks/clawsec-advisory-guardian/lib/feed.mjs (17545b), hooks/clawsec-advisory-guardian/lib/matching.ts (6138b), hooks/clawsec-advisory-guardian/lib/state.ts (2475b), hooks/clawsec-advisory-guardian/lib/suppression.mjs (5289b), hooks/clawsec-advisory-guardian/lib/types.ts (836b), hooks/clawsec-advisory-guardian/lib/utils.mjs (473b), hooks/clawsec-advisory-guardian/lib/version.mjs (2972b), scripts/discover_skill_catalog.mjs (8231b), scripts/generate_checksums_json.mjs (2176b), scripts/guarded_skill_install.mjs (9393b), scripts/setup_advisory_cron.mjs (2993b), scripts/setup_advisory_hook.mjs (2434b), scripts/sign_detached_ed25519.mjs (1689b), scripts/verify_detached_ed25519.mjs (1847b), skill.json (7558b), SKILL.md (14313b), test/advisory_suppression.test.mjs (11352b), test/feed_verification.test.mjs (20208b), test/guarded_install.test.mjs (12484b), test/skill_catalog_discovery.test.mjs (7391b), _meta.json (132b)\n\nFile v0.1.2:SKILL.md\n\n---\nname: clawsec-suite\nversion: 0.1.2\ndescription: ClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup for additional security skills.\nhomepage: https://clawsec.prompt.security\nclawdis:\n  emoji: \"📦\"\n  requires:\n    bins: [curl, jq, shasum, openssl]\n---\n\n# ClawSec Suite\n\nThis means `clawsec-suite` can:\n- monitor the ClawSec advisory feed,\n- track which advisories are new since last check,\n- cross-reference advisories against locally installed skills,\n- recommend removal for malicious-skill advisories and require explicit user approval first,\n- and still act as the setup/management entrypoint for other ClawSec protections.\n\n## Included vs Optional Protections\n\n### Built into clawsec-suite\n- Embedded feed seed file: `advisories/feed.json`\n- Portable heartbeat workflow in `HEARTBEAT.md`\n- Advisory polling + state tracking + affected-skill checks\n- OpenClaw advisory guardian hook package: `hooks/clawsec-advisory-guardian/`\n- Setup scripts for hook and optional cron scheduling: `scripts/`\n- Guarded installer: `scripts/guarded_skill_install.mjs`\n- Dynamic catalog discovery for installable skills: `scripts/discover_skill_catalog.mjs`\n\n### Installed separately (dynamic catalog)\n`clawsec-suite` does not hard-code add-on skill names in this document.\n\nDiscover the current catalog from the authoritative index (`https://clawsec.prompt.security/skills/index.json`) at runtime:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/discover_skill_catalog.mjs\"\n```\n\nFallback behavior:\n- If the remote catalog index is reachable and valid, the suite uses it.\n- If the remote index is unavailable or malformed, the script falls back to suite-local catalog metadata in `skill.json`.\n\n## Installation\n\n### Option A: Via clawhub (recommended)\n\n```bash\nnpx clawhub@latest install clawsec-suite\n```\n\n### Option B: Manual download with signature + checksum verification\n\n```bash\nset -euo pipefail\n\nVERSION=\"${SKILL_VERSION:?Set SKILL_VERSION (e.g. 0.0.8)}\"\nINSTALL_ROOT=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}\"\nDEST=\"$INSTALL_ROOT/clawsec-suite\"\nBASE=\"https://github.com/prompt-security/clawsec/releases/download/clawsec-suite-v${VERSION}\"\n\nTEMP_DIR=\"$(mktemp -d)\"\ntrap 'rm -rf \"$TEMP_DIR\"' EXIT\n\n# Pinned release-signing public key (verify fingerprint out-of-band on first use)\n# Fingerprint (SHA-256 of SPKI DER): 711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8\nRELEASE_PUBKEY_SHA256=\"711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8\"\ncat > \"$TEMP_DIR/release-signing-public.pem\" <<'PEM'\n-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAS7nijfMcUoOBCj4yOXJX+GYGv2pFl2Yaha1P4v5Cm6A=\n-----END PUBLIC KEY-----\nPEM\n\nACTUAL_KEY_SHA256=\"$(openssl pkey -pubin -in \"$TEMP_DIR/release-signing-public.pem\" -outform DER | shasum -a 256 | awk '{print $1}')\"\nif [ \"$ACTUAL_KEY_SHA256\" != \"$RELEASE_PUBKEY_SHA256\" ]; then\n  echo \"ERROR: Release public key fingerprint mismatch\" >&2\n  exit 1\nfi\n\nZIP_NAME=\"clawsec-suite-v${VERSION}.zip\"\n\n# 1) Download release archive + signed checksums manifest + signing public key\ncurl -fsSL \"$BASE/$ZIP_NAME\" -o \"$TEMP_DIR/$ZIP_NAME\"\ncurl -fsSL \"$BASE/checksums.json\" -o \"$TEMP_DIR/checksums.json\"\ncurl -fsSL \"$BASE/checksums.sig\" -o \"$TEMP_DIR/checksums.sig\"\n\n# 2) Verify checksums manifest signature before trusting any hashes\nopenssl base64 -d -A -in \"$TEMP_DIR/checksums.sig\" -out \"$TEMP_DIR/checksums.sig.bin\"\nif ! openssl pkeyutl -verify \\\n  -pubin \\\n  -inkey \"$TEMP_DIR/release-signing-public.pem\" \\\n  -sigfile \"$TEMP_DIR/checksums.sig.bin\" \\\n  -rawin \\\n  -in \"$TEMP_DIR/checksums.json\" >/dev/null 2>&1; then\n  echo \"ERROR: checksums.json signature verification failed\" >&2\n  exit 1\nfi\n\nEXPECTED_ZIP_SHA=\"$(jq -r '.archive.sha256 // empty' \"$TEMP_DIR/checksums.json\")\"\nif [ -z \"$EXPECTED_ZIP_SHA\" ]; then\n  echo \"ERROR: checksums.json missing archive.sha256\" >&2\n  exit 1\nfi\n\nif command -v shasum >/dev/null 2>&1; then\n  ACTUAL_ZIP_SHA=\"$(shasum -a 256 \"$TEMP_DIR/$ZIP_NAME\" | awk '{print $1}')\"\nelse\n  ACTUAL_ZIP_SHA=\"$(sha256sum \"$TEMP_DIR/$ZIP_NAME\" | awk '{print $1}')\"\nfi\n\nif [ \"$EXPECTED_ZIP_SHA\" != \"$ACTUAL_ZIP_SHA\" ]; then\n  echo \"ERROR: Archive checksum mismatch for $ZIP_NAME\" >&2\n  exit 1\nfi\n\necho \"Checksums manifest signature and archive hash verified.\"\n\n# 3) Install verified archive\nmkdir -p \"$INSTALL_ROOT\"\nrm -rf \"$DEST\"\nunzip -q \"$TEMP_DIR/$ZIP_NAME\" -d \"$INSTALL_ROOT\"\n\nchmod 600 \"$DEST/skill.json\"\nfind \"$DEST\" -type f ! -name \"skill.json\" -exec chmod 644 {} \\;\n\necho \"Installed clawsec-suite v${VERSION} to: $DEST\"\necho \"Next step (OpenClaw): node \\\"\\$DEST/scripts/setup_advisory_hook.mjs\\\"\"\n```\n\n## OpenClaw Automation (Hook + Optional Cron)\n\nAfter installing the suite, enable the advisory guardian hook:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/setup_advisory_hook.mjs\"\n```\n\nOptional: create/update a periodic cron nudge (default every `6h`) that triggers a main-session advisory scan:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/setup_advisory_cron.mjs\"\n```\n\nWhat this adds:\n- scan on `agent:bootstrap` and `/new` (`command:new`),\n- compare advisory `affected` entries against installed skills,\n- notify when new matches appear,\n- and ask for explicit user approval before any removal flow.\n\nRestart the OpenClaw gateway after enabling the hook. Then run `/new` once to force an immediate scan in the next session context.\n\n## Guarded Skill Install Flow (Double Confirmation)\n\nWhen the user asks to install a skill, treat that as the first request and run a guarded install check:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/guarded_skill_install.mjs\" --skill helper-plus --version 1.0.1\n```\n\nBehavior:\n- If no advisory match is found, install proceeds.\n- If `--version` is omitted, matching is conservative: any advisory that references the skill name is treated as a match.\n- If advisory match is found, the script prints advisory context and exits with code `42`.\n- Then require an explicit second confirmation from the user and rerun with `--confirm-advisory`:\n\n```bash\nnode \"$SUITE_DIR/scripts/guarded_skill_install.mjs\" --skill helper-plus --version 1.0.1 --confirm-advisory\n```\n\nThis enforces:\n1. First confirmation: user asked to install.\n2. Second confirmation: user explicitly approves install after seeing advisory details.\n\n## Embedded Advisory Feed Behavior\n\nThe embedded feed logic uses these defaults:\n\n- Remote feed URL: `https://clawsec.prompt.security/advisories/feed.json`\n- Remote feed signature URL: `${CLAWSEC_FEED_URL}.sig` (override with `CLAWSEC_FEED_SIG_URL`)\n- Remote checksums manifest URL: sibling `checksums.json` (override with `CLAWSEC_FEED_CHECKSUMS_URL`)\n- Local seed fallback: `~/.openclaw/skills/clawsec-suite/advisories/feed.json`\n- Local feed signature: `${CLAWSEC_LOCAL_FEED}.sig` (override with `CLAWSEC_LOCAL_FEED_SIG`)\n- Local checksums manifest: `~/.openclaw/skills/clawsec-suite/advisories/checksums.json`\n- Pinned feed signing key: `~/.openclaw/skills/clawsec-suite/advisories/feed-signing-public.pem` (override with `CLAWSEC_FEED_PUBLIC_KEY`)\n- State file: `~/.openclaw/clawsec-suite-feed-state.json`\n- Hook rate-limit env (OpenClaw hook): `CLAWSEC_HOOK_INTERVAL_SECONDS` (default `300`)\n\n**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.\n\n### Quick feed check\n\n```bash\nFEED_URL=\"${CLAWSEC_FEED_URL:-https://clawsec.prompt.security/advisories/feed.json}\"\nSTATE_FILE=\"${CLAWSEC_SUITE_STATE_FILE:-$HOME/.openclaw/clawsec-suite-feed-state.json}\"\n\nTMP=\"$(mktemp -d)\"\ntrap 'rm -rf \"$TMP\"' EXIT\n\nif ! curl -fsSLo \"$TMP/feed.json\" \"$FEED_URL\"; then\n  echo \"ERROR: Failed to fetch advisory feed\"\n  exit 1\nfi\n\nif ! jq -e '.version and (.advisories | type == \"array\")' \"$TMP/feed.json\" >/dev/null; then\n  echo \"ERROR: Invalid advisory feed format\"\n  exit 1\nfi\n\nmkdir -p \"$(dirname \"$STATE_FILE\")\"\nif [ ! -f \"$STATE_FILE\" ]; then\n  echo '{\"schema_version\":\"1.0\",\"known_advisories\":[],\"last_feed_check\":null,\"last_feed_updated\":null}' > \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n\nNEW_IDS_FILE=\"$TMP/new_ids.txt\"\njq -r --argfile state \"$STATE_FILE\" '($state.known_advisories // []) as $known | [.advisories[]?.id | select(. != null and ($known | index(.) | not))] | .[]?' \"$TMP/feed.json\" > \"$NEW_IDS_FILE\"\n\nif [ -s \"$NEW_IDS_FILE\" ]; then\n  echo \"New advisories detected:\"\n  while IFS= read -r id; do\n    [ -z \"$id\" ] && continue\n    jq -r --arg id \"$id\" '.advisories[] | select(.id == $id) | \"- [\\(.severity | ascii_upcase)] \\(.id): \\(.title)\"' \"$TMP/feed.json\"\n  done < \"$NEW_IDS_FILE\"\nelse\n  echo \"FEED_OK - no new advisories\"\nfi\n```\n\n## Heartbeat Integration\n\nUse the suite heartbeat script as the single periodic security check entrypoint:\n\n- `skills/clawsec-suite/HEARTBEAT.md`\n\nIt handles:\n- suite update checks,\n- feed polling,\n- new-advisory detection,\n- affected-skill cross-referencing,\n- approval-gated response guidance for malicious/removal advisories,\n- and persistent state updates.\n\n## Approval-Gated Response Contract\n\nIf an advisory indicates a malicious or removal-recommended skill and that skill is installed:\n\n1. Notify the user immediately with advisory details and severity.\n2. Recommend removing or disabling the affected skill.\n3. Treat the original install request as first intent only.\n4. Ask for explicit second confirmation before deletion/disable action (or before proceeding with risky install).\n5. Only proceed after that second confirmation.\n\nThe suite hook and heartbeat guidance are intentionally non-destructive by default.\n\n## Advisory Suppression / Allowlist\n\nThe 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.\n\n### Activation\n\nAdvisory 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.\n\nIf the `enabledFor` array is missing, empty, or does not include `\"advisory\"`, all advisories are reported normally.\n\n### Config File Resolution (4-tier)\n\nThe advisory guardian resolves the suppression config using the same priority order as the audit pipeline:\n\n1. Explicit `--config <path>` argument\n2. `OPENCLAW_AUDIT_CONFIG` environment variable\n3. `~/.openclaw/security-audit.json`\n4. `.clawsec/allowlist.json`\n\n### Config Format\n\n```json\n{\n  \"enabledFor\": [\"advisory\"],\n  \"suppressions\": [\n    {\n      \"checkId\": \"CVE-2026-25593\",\n      \"skill\": \"clawsec-suite\",\n      \"reason\": \"First-party security tooling — reviewed by security team\",\n      \"suppressedAt\": \"2026-02-15\"\n    },\n    {\n      \"checkId\": \"CLAW-2026-0001\",\n      \"skill\": \"example-skill\",\n      \"reason\": \"Advisory does not apply to our deployment configuration\",\n      \"suppressedAt\": \"2026-02-16\"\n    }\n  ]\n}\n```\n\n### Sentinel Semantics\n\n- `\"enabledFor\": [\"advisory\"]` -- only advisory suppression active\n- `\"enabledFor\": [\"audit\"]` -- only audit suppression active (no effect on advisory pipeline)\n- `\"enabledFor\": [\"audit\", \"advisory\"]` -- both pipelines honor suppressions\n- Missing or empty `enabledFor` -- no suppression active (safe default)\n\n### Matching Rules\n\n- **checkId:** exact match against the advisory ID (e.g., `CVE-2026-25593` or `CLAW-2026-0001`)\n- **skill:** case-insensitive match against the affected skill name from the advisory\n- Both fields must match for an advisory to be suppressed\n\n### Required Fields per Suppression Entry\n\n| Field | Description | Example |\n|-------|-------------|---------|\n| `checkId` | Advisory ID to suppress | `CVE-2026-25593` |\n| `skill` | Affected skill name | `clawsec-suite` |\n| `reason` | Justification for audit trail (required) | `First-party tooling, reviewed by security team` |\n| `suppressedAt` | ISO 8601 date (YYYY-MM-DD) | `2026-02-15` |\n\n### Shared Config with Audit Pipeline\n\nThe advisory and audit pipelines share the same config file. Use the `enabledFor` array to control which pipelines honor the suppression list:\n\n```json\n{\n  \"enabledFor\": [\"audit\", \"advisory\"],\n  \"suppressions\": [\n    {\n      \"checkId\": \"skills.code_safety\",\n      \"skill\": \"clawsec-suite\",\n      \"reason\": \"First-party tooling — audit finding accepted\",\n      \"suppressedAt\": \"2026-02-15\"\n    },\n    {\n      \"checkId\": \"CVE-2026-25593\",\n      \"skill\": \"clawsec-suite\",\n      \"reason\": \"First-party tooling — advisory reviewed\",\n      \"suppressedAt\": \"2026-02-15\"\n    }\n  ]\n}\n```\n\nAudit 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.\n\n## Optional Skill Installation\n\nDiscover currently available installable skills dynamically, then install the ones you want:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/discover_skill_catalog.mjs\"\n\n# then install any discovered skill by name\nnpx clawhub@latest install <skill-name>\n```\n\nMachine-readable output is also available for automation:\n\n```bash\nnode \"$SUITE_DIR/scripts/discover_skill_catalog.mjs\" --json\n```\n\n## Security Notes\n\n- Always verify `checksums.json` signature before trusting its file URLs/hashes, then verify each file checksum.\n- Verify advisory feed detached signatures; do not enable `CLAWSEC_ALLOW_UNSIGNED_FEED` outside temporary migration windows.\n- Keep advisory polling rate-limited (at least 5 minutes between checks).\n- Treat `critical` and `high` advisories affecting installed skills as immediate action items.\n- If you migrate off standalone `clawsec-feed`, keep one canonical state file to avoid duplicate notifications.\n- Pin and verify public key fingerprints out-of-band before first use.\n\nFile v0.1.2:_meta.json\n\n{\n  \"ownerId\": \"kn76m78f01hqrtpgm895s0jsax80jd8v\",\n  \"slug\": \"clawsec-suite\",\n  \"version\": \"0.1.2\",\n  \"publishedAt\": 1771260968830\n}\n\nFile v0.1.2:CHANGELOG.md\n\n# Changelog\n\nAll notable changes to the ClawSec Suite will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.1.2]\n\n### Added\n\n- Advisory suppression module (`hooks/clawsec-advisory-guardian/lib/suppression.mjs`).\n- `loadAdvisorySuppression()` -- loads suppression config with `enabledFor: [\"advisory\"]` sentinel gate.\n- `isAdvisorySuppressed()` -- matches `advisory.id === rule.checkId` + case-insensitive skill name.\n- Advisory guardian handler integration: partitions matches into active/suppressed after `findMatches()`.\n- Suppressed matches tracked in state file (prevents re-evaluation) but not alerted.\n- Soft notification message for suppressed matches count.\n- Advisory suppression tests (13 tests in `advisory_suppression.test.mjs`).\n- Documentation in SKILL.md for advisory suppression/allowlist mechanism.\n\n### Changed\n\n- Advisory guardian handler (`handler.ts`) now loads suppression config and filters matches before alerting.\n\n### Security\n\n- Advisory suppression gated by config file sentinel (`enabledFor: [\"advisory\"]`) -- no CLI flag needed but config must explicitly opt in.\n- Suppressed matches are still tracked in state to maintain audit trail.\n\n## [0.1.1] - 2026-02-16\n\n### Added\n- Added `scripts/discover_skill_catalog.mjs` to dynamically discover installable skills from `https://clawsec.prompt.security/skills/index.json`.\n- Added `test/skill_catalog_discovery.test.mjs` to validate remote-catalog loading and fallback behavior.\n- Added CI signing-key drift guard script: `scripts/ci/verify_signing_key_consistency.sh`.\n\n### Changed\n- Updated `SKILL.md` to use dynamic catalog discovery commands instead of hard-coded optional-skill names.\n- Updated advisory feed defaults to signed-host URL (`https://clawsec.prompt.security/advisories/feed.json`).\n- Improved checksum manifest key compatibility in feed verification logic (supports basename and `advisories/*` key formats).\n- Kept `openclaw-audit-watchdog` as a standalone skill (not embedded in `clawsec-suite`).\n\n### Security\n- **Signing key drift control**: CI now enforces that all public key references (inline SKILL.md PEM, canonical `.pem` files, workflow-generated keys) resolve to the same fingerprint. Prevents stale, fabricated, or rotated-but-not-propagated key material from reaching releases.\n  - Enforced in: `.github/workflows/skill-release.yml`, `.github/workflows/deploy-pages.yml`\n  - Guard script: `scripts/ci/verify_signing_key_consistency.sh`\n\n### Fixed\n- **Fixed fabricated signing key in SKILL.md**: The manual installation script contained a hallucinated Ed25519 public key and fingerprint (`35866e1b...`) that never corresponded to the actual release signing key. Replaced with the real public key derived from the GitHub-secret-held private key. The bogus key was introduced in v0.0.10 (`Integration/signing work #20`) and went undetected because no consistency check existed at the time.\n- Corrected `checksums.sig` naming in release verification documentation.\n\n## [0.0.10] - 2026-02-11\n\n### Security\n\n#### Transport Security Hardening\n- **TLS Version Enforcement**: Eliminated support for TLS 1.0 and TLS 1.1, enforcing minimum TLS 1.2 for all HTTPS connections\n- **Certificate Validation**: Enabled strict certificate validation (`rejectUnauthorized: true`) to prevent MITM attacks\n- **Domain Allowlist**: Restricted advisory feed connections to approved domains only:\n  - `clawsec.prompt.security` (official ClawSec feed host)\n  - `prompt.security` (parent domain)\n  - `raw.githubusercontent.com` (GitHub raw content)\n  - `github.com` (GitHub releases)\n- **Strong Cipher Suites**: Configured modern cipher suites (AES-GCM, ChaCha20-Poly1305) for secure connections\n\n#### Signature Verification & Checksum Validation\n- **Fixed unverified file publication**: Refactored `deploy-pages.yml` workflow to download release assets to temporary directory before signature verification, ensuring unverified files never reach public directory\n- **Fixed schema mismatch**: Updated `deploy-pages.yml` to generate `checksums.json` with proper `schema_version` and `algorithm` fields that match parser expectations\n- **Fixed missing checksums abort**: Updated `loadRemoteFeed` to gracefully skip checksum verification when `checksums.json` is missing (e.g., GitHub raw content), while still enforcing fail-closed signature verification\n- **Fixed parser strictness**: Enhanced `parseChecksumsManifest` to accept legacy manifest formats through a fallback chain:\n  1. `schema_version` (new standard)\n  2. `version` (skill-release.yml format)\n  3. `generated_at` (old deploy-pages.yml format)\n  4. `\"1\"` (ultimate fallback)\n\n### Changed\n- Advisory feed loader now uses `secureFetch` wrapper with TLS 1.2+ enforcement and domain validation\n- Checksum verification is now graceful: feeds load successfully from sources without checksums (e.g., GitHub raw) while maintaining fail-closed signature verification\n- Workflow release mirroring flow changed from `download → verify → skip` to `download to temp → verify → mirror` (fail = delete temp)\n\n### Fixed\n- Unverified skill releases no longer published to public directory on signature verification failure\n- Schema mismatch between generated and expected checksums manifest fields\n- Feed loading failures when checksums.json missing from upstream sources\n- Parser rejection of valid legacy manifest formats\n\n### Security Impact\n- **Fail-closed security maintained**: All feed signatures still verified; invalid signatures reject feed loading\n- **No backward compatibility break**: Legacy manifests continue working through fallback chain\n- **Enhanced transport security**: Connections protected against downgrade attacks and MITM\n- **Defense in depth**: Multiple layers of verification (domain, TLS, certificate, signature, checksum)\n\n---\n\n## Release Notes Template\n\nWhen creating a new release, copy this template to the GitHub release notes:\n\n```markdown\n## Security Improvements\n\n### Transport Security\n✅ TLS 1.2+ enforcement (eliminated TLS 1.0, 1.1)\n✅ Strict certificate validation\n✅ Domain allowlist (prompt.security, github.com only)\n✅ Modern cipher suites (AES-GCM, ChaCha20-Poly1305)\n\n### Signature & Checksum Verification\n✅ Unverified files never published (temp directory workflow)\n✅ Proper schema fields in generated checksums.json\n✅ Graceful fallback when checksums missing (GitHub raw)\n✅ Legacy manifest format support (backward compatible)\n\n### Testing\nAll verification tests passed:\n- ✅ Unit tests: 14/14 passed\n- ✅ Parser lenience: 3/3 legacy formats accepted\n- ✅ Remote loading: Gracefully handles missing checksums\n- ✅ Workflow security: Temp directory prevents unverified publication\n```\n\nFile v0.1.2:HEARTBEAT.md\n\n# ClawSec Suite — Heartbeat Check\n\nRun this periodically (cron/systemd/CI/agent scheduler). It assumes POSIX shell, `curl`, and `jq`.\n\n## Goals\n\n1. Check whether `clawsec-suite` has an update available.\n2. Poll the advisory feed.\n3. Report new advisories, highlight affected installed skills, and require approval before removal actions.\n\n---\n\n## Configuration\n\n```bash\nINSTALL_ROOT=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}\"\nSUITE_DIR=\"$INSTALL_ROOT/clawsec-suite\"\nCHECKSUMS_URL=\"${CHECKSUMS_URL:-https://clawsec.prompt.security/releases/latest/download/checksums.json}\"\nFEED_URL=\"${CLAWSEC_FEED_URL:-https://clawsec.prompt.security/advisories/feed.json}\"\nSTATE_FILE=\"${CLAWSEC_SUITE_STATE_FILE:-$HOME/.openclaw/clawsec-suite-feed-state.json}\"\nMIN_FEED_INTERVAL_SECONDS=\"${MIN_FEED_INTERVAL_SECONDS:-300}\"\n```\n\n---\n\n## Step 0 — Basic sanity\n\n```bash\nset -euo pipefail\n\ntest -d \"$SUITE_DIR\"\ntest -f \"$SUITE_DIR/skill.json\"\n\necho \"=== ClawSec Suite Heartbeat ===\"\necho \"When:  $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\necho \"Suite: $SUITE_DIR\"\n```\n\n---\n\n## Step 1 — Check suite version updates\n\n```bash\nTMP=\"$(mktemp -d)\"\ntrap 'rm -rf \"$TMP\"' EXIT\n\ncurl -fsSLo \"$TMP/checksums.json\" \"$CHECKSUMS_URL\"\n\nINSTALLED_VER=\"$(jq -r '.version // \"\"' \"$SUITE_DIR/skill.json\" 2>/dev/null || true)\"\nLATEST_VER=\"$(jq -r '.version // \"\"' \"$TMP/checksums.json\" 2>/dev/null || true)\"\n\necho \"Installed suite: ${INSTALLED_VER:-unknown}\"\necho \"Latest suite:    ${LATEST_VER:-unknown}\"\n\nif [ -n \"$LATEST_VER\" ] && [ \"$LATEST_VER\" != \"$INSTALLED_VER\" ]; then\n  echo \"UPDATE AVAILABLE: clawsec-suite ${INSTALLED_VER:-unknown} -> $LATEST_VER\"\nelse\n  echo \"Suite appears up to date.\"\nfi\n```\n\n---\n\n## Step 2 — Initialize advisory state\n\n```bash\nmkdir -p \"$(dirname \"$STATE_FILE\")\"\n\nif [ ! -f \"$STATE_FILE\" ]; then\n  echo '{\"schema_version\":\"1.0\",\"known_advisories\":[],\"last_feed_check\":null,\"last_feed_updated\":null}' > \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n\nif ! jq -e '.schema_version and .known_advisories' \"$STATE_FILE\" >/dev/null 2>&1; then\n  echo \"WARNING: Invalid state file, resetting: $STATE_FILE\"\n  cp \"$STATE_FILE\" \"${STATE_FILE}.bak.$(date -u +%Y%m%d%H%M%S)\" 2>/dev/null || true\n  echo '{\"schema_version\":\"1.0\",\"known_advisories\":[],\"last_feed_check\":null,\"last_feed_updated\":null}' > \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n```\n\n---\n\n## Step 3 — Advisory feed check (embedded clawsec-feed)\n\n```bash\nnow_epoch=\"$(date -u +%s)\"\nlast_check=\"$(jq -r '.last_feed_check // \"1970-01-01T00:00:00Z\"' \"$STATE_FILE\")\"\nlast_epoch=\"$(date -u -d \"$last_check\" +%s 2>/dev/null || date -u -j -f \"%Y-%m-%dT%H:%M:%SZ\" \"$last_check\" +%s 2>/dev/null || echo 0)\"\n\nif [ $((now_epoch - last_epoch)) -lt \"$MIN_FEED_INTERVAL_SECONDS\" ]; then\n  echo \"Feed check skipped (rate limit: ${MIN_FEED_INTERVAL_SECONDS}s).\"\nelse\n  FEED_TMP=\"$TMP/feed.json\"\n  FEED_SOURCE=\"$FEED_URL\"\n\n  if ! curl -fsSLo \"$FEED_TMP\" \"$FEED_URL\"; then\n    if [ -f \"$SUITE_DIR/advisories/feed.json\" ]; then\n      cp \"$SUITE_DIR/advisories/feed.json\" \"$FEED_TMP\"\n      FEED_SOURCE=\"$SUITE_DIR/advisories/feed.json (local fallback)\"\n      echo \"WARNING: Remote feed unavailable, using local fallback.\"\n    else\n      echo \"ERROR: Remote feed unavailable and no local fallback feed found.\"\n      exit 1\n    fi\n  fi\n\n  if ! jq -e '.version and (.advisories | type == \"array\")' \"$FEED_TMP\" >/dev/null 2>&1; then\n    echo \"ERROR: Advisory feed has invalid format.\"\n    exit 1\n  fi\n\n  echo \"Feed source: $FEED_SOURCE\"\n  echo \"Feed updated: $(jq -r '.updated // \"unknown\"' \"$FEED_TMP\")\"\n\n  NEW_IDS_FILE=\"$TMP/new_ids.txt\"\n  jq -r --argfile state \"$STATE_FILE\" '($state.known_advisories // []) as $known | [.advisories[]?.id | select(. != null and ($known | index(.) | not))] | .[]?' \"$FEED_TMP\" > \"$NEW_IDS_FILE\"\n\n  if [ -s \"$NEW_IDS_FILE\" ]; then\n    echo \"New advisories:\"\n    while IFS= read -r id; do\n      [ -z \"$id\" ] && continue\n      jq -r --arg id \"$id\" '.advisories[] | select(.id == $id) | \"- [\\(.severity | ascii_upcase)] \\(.id): \\(.title)\"' \"$FEED_TMP\"\n      jq -r --arg id \"$id\" '.advisories[] | select(.id == $id) | \"  Action: \\(.action // \"Review advisory details\")\"' \"$FEED_TMP\"\n    done < \"$NEW_IDS_FILE\"\n  else\n    echo \"FEED_OK - no new advisories\"\n  fi\n\n  echo \"Affected installed skills (if any):\"\n  found_affected=0\n  removal_recommended=0\n  for skill_path in \"$INSTALL_ROOT\"/*; do\n    [ -d \"$skill_path\" ] || continue\n    skill_name=\"$(basename \"$skill_path\")\"\n\n    skill_hits=\"$(jq -r --arg skill_prefix \"${skill_name}@\" '\n      [.advisories[]\n      | select(any(.affected[]?; startswith($skill_prefix)))\n      | \"- [\\(.severity | ascii_upcase)] \\(.id): \\(.title)\\n  Action: \\(.action // \"Review advisory details\")\"\n      ] | .[]?\n    ' \"$FEED_TMP\")\"\n\n    if [ -n \"$skill_hits\" ]; then\n      found_affected=1\n      echo \"- $skill_name is referenced by advisory feed entries\"\n      printf \"%s\\n\" \"$skill_hits\"\n\n      if jq -e --arg skill_prefix \"${skill_name}@\" '\n        any(\n          .advisories[];\n          any(.affected[]?; startswith($skill_prefix))\n          and (\n            ((.type // \"\" | ascii_downcase) == \"malicious_skill\")\n            or ((.title // \"\" | ascii_downcase | test(\"malicious|exfiltrat|backdoor|trojan|stealer\")))\n            or ((.description // \"\" | ascii_downcase | test(\"malicious|exfiltrat|backdoor|trojan|stealer\")))\n            or ((.action // \"\" | ascii_downcase | test(\"remove|uninstall|disable|do not use|quarantine\")))\n          )\n        )\n      ' \"$FEED_TMP\" >/dev/null 2>&1; then\n        removal_recommended=1\n      fi\n    fi\n  done\n\n  if [ \"$found_affected\" -eq 0 ]; then\n    echo \"- none\"\n  fi\n\n  if [ \"$removal_recommended\" -eq 1 ]; then\n    echo \"Approval required: ask the user for explicit approval before removing any skill.\"\n    echo \"Double-confirmation policy: install request is first intent; require a second explicit confirmation with advisory context.\"\n  fi\n\n  # Persist state\n  current_utc=\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"\n  state_tmp=\"$TMP/state.json\"\n\n  jq --arg t \"$current_utc\" --arg updated \"$(jq -r '.updated // \"\"' \"$FEED_TMP\")\" --argfile feed \"$FEED_TMP\" '\n    .last_feed_check = $t\n    | .last_feed_updated = (if $updated == \"\" then .last_feed_updated else $updated end)\n    | .known_advisories = ((.known_advisories // []) + [$feed.advisories[]?.id] | map(select(. != null)) | unique)\n  ' \"$STATE_FILE\" > \"$state_tmp\"\n\n  mv \"$state_tmp\" \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n```\n\n---\n\n## Output Summary\n\nHeartbeat output should include:\n- suite version status,\n- advisory feed status,\n- new advisory list (if any),\n- installed skills that appear in advisory `affected` lists,\n- and a double-confirmation reminder before risky install/remove actions.\n\nIf your runtime sends alerts, treat `critical` and `high` advisories affecting installed skills as immediate notifications.\n\nFile v0.1.2:hooks/clawsec-advisory-guardian/HOOK.md\n\n---\nname: clawsec-advisory-guardian\ndescription: Detect advisory matches for installed skills and require explicit user approval before any removal action.\nmetadata: { \"openclaw\": { \"events\": [\"agent:bootstrap\", \"command:new\"] } }\n---\n\n# ClawSec Advisory Guardian Hook\n\nThis hook checks the ClawSec advisory feed against locally installed skills on:\n\n- `agent:bootstrap`\n- `command:new`\n\nWhen it detects an advisory affecting an installed skill, it posts an alert message.\nIf the advisory looks malicious or removal-oriented, it explicitly recommends removal\nand asks for user approval first.\n\n## Safety Contract\n\n- The hook does not delete or modify skills.\n- It only reports findings and requests explicit approval before removal.\n- Alerts are deduplicated using `~/.openclaw/clawsec-suite-feed-state.json`.\n\n## Optional Environment Variables\n\n- `CLAWSEC_FEED_URL`: override remote feed URL.\n- `CLAWSEC_FEED_SIG_URL`: override detached remote feed signature URL (default `${CLAWSEC_FEED_URL}.sig`).\n- `CLAWSEC_FEED_CHECKSUMS_URL`: override remote checksum manifest URL (default sibling `checksums.json`).\n- `CLAWSEC_FEED_CHECKSUMS_SIG_URL`: override detached remote checksum manifest signature URL.\n- `CLAWSEC_FEED_PUBLIC_KEY`: path to pinned feed-signing public key PEM.\n- `CLAWSEC_LOCAL_FEED`: override local fallback feed file.\n- `CLAWSEC_LOCAL_FEED_SIG`: override local detached feed signature path.\n- `CLAWSEC_LOCAL_FEED_CHECKSUMS`: override local checksum manifest path.\n- `CLAWSEC_LOCAL_FEED_CHECKSUMS_SIG`: override local checksum manifest signature path.\n- `CLAWSEC_VERIFY_CHECKSUM_MANIFEST`: set to `0` only for emergency troubleshooting (default verifies checksums).\n- `CLAWSEC_ALLOW_UNSIGNED_FEED`: set to `1` only for temporary migration compatibility; bypasses signature/checksum verification.\n- `CLAWSEC_SUITE_STATE_FILE`: override state file path.\n- `CLAWSEC_INSTALL_ROOT`: override installed skills root.\n- `CLAWSEC_SUITE_DIR`: override clawsec-suite install path.\n- `CLAWSEC_HOOK_INTERVAL_SECONDS`: minimum interval between hook scans (default `300`).\n\nFile v0.1.2:advisories/feed.json\n\n{\n  \"version\": \"0.0.2\",\n  \"updated\": \"2026-02-08T06:16:28Z\",\n  \"description\": \"Community-driven security advisory feed for ClawSec. Automatically updated with OpenClaw-related CVEs from NVD and community-reported security incidents.\",\n  \"advisories\": [\n    {\n      \"id\": \"CVE-2026-25593\",\n      \"severity\": \"high\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw is a personal AI assistant. Prior to 2026.1.20, an unauthenticated local client could use t...\",\n      \"description\": \"OpenClaw is a personal AI assistant. Prior to 2026.1.20, an unauthenticated local client could use the Gateway WebSocket API to write config via config.apply and set unsafe cliPath values that were later used for command discovery, enabling command injection as the gateway user. This vulnerability is fixed in 2026.1.20.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-06T21:16:17.790\",\n      \"references\": [\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-g55j-c2v4-pjcg\"\n      ],\n      \"cvss_score\": 8.4,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-25593\"\n    },\n    {\n      \"id\": \"CVE-2026-25475\",\n      \"severity\": \"medium\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw is a personal AI assistant. Prior to version 2026.1.30, the isValidMedia() function in src/...\",\n      \"description\": \"OpenClaw is a personal AI assistant. Prior to version 2026.1.30, the isValidMedia() function in src/media/parse.ts allows arbitrary file paths including absolute paths, home directory paths, and directory traversal sequences. An agent can read any file on the system by outputting MEDIA:/path/to/file, exfiltrating sensitive data to the user/channel. This issue has been patched in version 2026.1.30.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-04T20:16:07.287\",\n      \"references\": [\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-r8g4-86fx-92mq\"\n      ],\n      \"cvss_score\": 6.5,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-25475\"\n    },\n    {\n      \"id\": \"CVE-2026-25157\",\n      \"severity\": \"high\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw is a personal AI assistant. Prior to version 2026.1.29, there is an OS command injection vu...\",\n      \"description\": \"OpenClaw is a personal AI assistant. Prior to version 2026.1.29, there is an OS command injection vulnerability via the Project Root Path in sshNodeCommand. The sshNodeCommand function constructed a shell script without properly escaping the user-supplied project path in an error message. When the cd command failed, the unescaped path was interpolated directly into an echo statement, allowing arbitrary command execution on the remote SSH host. The parseSSHTarget function did not validate that SSH target strings could not begin with a dash. An attacker-supplied target like -oProxyCommand=... would be interpreted as an SSH configuration flag rather than a hostname, allowing arbitrary command execution on the local machine. This issue has been patched in version 2026.1.29.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-04T20:16:06.577\",\n      \"references\": [\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-q284-4pvr-m585\"\n      ],\n      \"cvss_score\": 7.7,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-25157\"\n    },\n    {\n      \"id\": \"CLAW-2026-0001\",\n      \"severity\": \"high\",\n      \"type\": \"prompt_injection\",\n      \"title\": \"Data exfiltration attempt via helper-plus skill\",\n      \"description\": \"The helper-plus skill was observed sending conversation data to an external server (suspicious-domain.com) on every invocation. The skill makes undocumented network calls that transmit full conversation context to a domain not mentioned in the skill description.\",\n      \"affected\": [\n        \"helper-plus@1.0.0\",\n        \"helper-plus@1.0.1\"\n      ],\n      \"action\": \"Remove helper-plus immediately. Do not use versions 1.0.0 or 1.0.1. Wait for a verified patched version.\",\n      \"published\": \"2026-02-04T09:30:00Z\",\n      \"references\": [],\n      \"source\": \"Community Report\",\n      \"github_issue_url\": \"https://github.com/prompt-security/clawsec/issues/1\",\n      \"reporter\": {\n        \"agent_name\": \"SecurityBot\",\n        \"opener_type\": \"agent\"\n      }\n    },\n    {\n      \"id\": \"CVE-2026-24763\",\n      \"severity\": \"high\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw (formerly  Clawdbot) is a personal AI assistant you run on your own devices. Prior to 2026....\",\n      \"description\": \"OpenClaw (formerly  Clawdbot) is a personal AI assistant you run on your own devices. Prior to 2026.1.29, a command injection vulnerability existed in OpenClaw’s Docker sandbox execution mechanism due to unsafe handling of the PATH environment variable when constructing shell commands. An authenticated user able to control environment variables could influence command execution within the container context. This vulnerability is fixed in 2026.1.29.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-02T23:16:08.593\",\n      \"references\": [\n        \"https://github.com/openclaw/openclaw/commit/771f23d36b95ec2204cc9a0054045f5d8439ea75\",\n        \"https://github.com/openclaw/openclaw/releases/tag/v2026.1.29\",\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-mc68-q9jw-2h3v\"\n      ],\n      \"cvss_score\": 8.8,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-24763\"\n    },\n    {\n      \"id\": \"CVE-2026-25253\",\n      \"severity\": \"high\",\n      \"type\": \"vulnerable_skill\",\n      \"title\": \"OpenClaw (aka clawdbot or Moltbot) before 2026.1.29 obtains a gatewayUrl value from a query string a...\",\n      \"description\": \"OpenClaw (aka clawdbot or Moltbot) before 2026.1.29 obtains a gatewayUrl value from a query string and automatically makes a WebSocket connection without prompting, sending a token value.\",\n      \"affected\": [],\n      \"action\": \"Review and update affected components. See NVD for remediation details.\",\n      \"published\": \"2026-02-01T23:15:49.717\",\n      \"references\": [\n        \"https://depthfirst.com/post/1-click-rce-to-steal-your-moltbot-data-and-keys\",\n        \"https://ethiack.com/news/blog/one-click-rce-moltbot\",\n        \"https://github.com/openclaw/openclaw/security/advisories/GHSA-g8p2-7wf7-98mq\"\n      ],\n      \"cvss_score\": 8.8,\n      \"nvd_url\": \"https://nvd.nist.gov/vuln/detail/CVE-2026-25253\"\n    }\n  ]\n}\n\nFile v0.1.2:skill.json\n\n{\n  \"name\": \"clawsec-suite\",\n  \"version\": \"0.1.2\",\n  \"description\": \"ClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup for additional security skills.\",\n  \"author\": \"prompt-security\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://clawsec.prompt.security/\",\n  \"keywords\": [\n    \"security\",\n    \"skills\",\n    \"catalog\",\n    \"installer\",\n    \"integrity\",\n    \"advisory\",\n    \"feed\",\n    \"threat-intel\",\n    \"hooks\",\n    \"approval\",\n    \"agents\",\n    \"ai\",\n    \"suite\",\n    \"openclaw\",\n    \"signature\",\n    \"verification\"\n  ],\n  \"sbom\": {\n    \"files\": [\n      {\n        \"path\": \"SKILL.md\",\n        \"required\": true,\n        \"description\": \"Suite skill documentation and installation guide\"\n      },\n      {\n        \"path\": \"CHANGELOG.md\",\n        \"required\": true,\n        \"description\": \"Version history and security improvements changelog\"\n      },\n      {\n        \"path\": \"HEARTBEAT.md\",\n        \"required\": true,\n        \"description\": \"Portable heartbeat and update-check procedure\"\n      },\n      {\n        \"path\": \"advisories/feed.json\",\n        \"required\": true,\n        \"description\": \"Embedded advisory feed seed (merged from clawsec-feed)\"\n      },\n      {\n        \"path\": \"advisories/feed.json.sig\",\n        \"required\": true,\n        \"description\": \"Detached Ed25519 signature for advisory feed\"\n      },\n      {\n        \"path\": \"advisories/checksums.json\",\n        \"required\": true,\n        \"description\": \"SHA-256 checksum manifest for advisory artifacts\"\n      },\n      {\n        \"path\": \"advisories/checksums.json.sig\",\n        \"required\": true,\n        \"description\": \"Detached Ed25519 signature for checksum manifest\"\n      },\n      {\n        \"path\": \"advisories/feed-signing-public.pem\",\n        \"required\": true,\n        \"description\": \"Pinned Ed25519 public key for feed signature verification\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/HOOK.md\",\n        \"required\": true,\n        \"description\": \"OpenClaw hook metadata for advisory-driven malicious-skill checks\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/handler.ts\",\n        \"required\": true,\n        \"description\": \"OpenClaw hook handler for approval-gated advisory actions with signature verification\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/utils.mjs\",\n        \"required\": true,\n        \"description\": \"Shared utility functions (isObject, normalizeSkillName, uniqueStrings)\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/version.mjs\",\n        \"required\": true,\n        \"description\": \"Shared semver parsing and version matching logic\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/feed.mjs\",\n        \"required\": true,\n        \"description\": \"Advisory feed loading with Ed25519 signature and checksum manifest verification\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/types.ts\",\n        \"required\": true,\n        \"description\": \"TypeScript type definitions for hook and feed structures\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/state.ts\",\n        \"required\": true,\n        \"description\": \"Advisory state persistence and loading\"\n      },\n      {\n        \"path\": \"hooks/clawsec-advisory-guardian/lib/matching.ts\",\n        \"required\": true,\n        \"description\": \"Advisory-to-skill matching and alert message generation\"\n      },\n      {\n        \"path\": \"scripts/setup_advisory_hook.mjs\",\n        \"required\": true,\n        \"description\": \"Installer script for enabling the advisory guardian hook\"\n      },\n      {\n        \"path\": \"scripts/setup_advisory_cron.mjs\",\n        \"required\": true,\n        \"description\": \"Installer script for optional periodic advisory scan cron\"\n      },\n      {\n        \"path\": \"scripts/guarded_skill_install.mjs\",\n        \"required\": true,\n        \"description\": \"Two-step confirmation installer with signature verification that blocks risky skill installs\"\n      },\n      {\n        \"path\": \"scripts/discover_skill_catalog.mjs\",\n        \"required\": true,\n        \"description\": \"Dynamic skill-catalog discovery with remote index fetch and suite-local fallback metadata\"\n      },\n      {\n        \"path\": \"scripts/sign_detached_ed25519.mjs\",\n        \"required\": false,\n        \"description\": \"Utility script for generating Ed25519 detached signatures\"\n      },\n      {\n        \"path\": \"scripts/verify_detached_ed25519.mjs\",\n        \"required\": false,\n        \"description\": \"Utility script for verifying Ed25519 detached signatures\"\n      },\n      {\n        \"path\": \"scripts/generate_checksums_json.mjs\",\n        \"required\": false,\n        \"description\": \"Utility script for generating SHA-256 checksum manifests\"\n      }\n    ]\n  },\n  \"embedded_components\": {\n    \"clawsec-feed\": {\n      \"source_skill\": \"clawsec-feed\",\n      \"source_version\": \"0.0.4\",\n      \"paths\": [\n        \"advisories/feed.json\",\n        \"advisories/feed.json.sig\",\n        \"advisories/checksums.json\",\n        \"advisories/checksums.json.sig\",\n        \"advisories/feed-signing-public.pem\"\n      ],\n      \"capabilities\": [\n        \"advisory-feed monitoring\",\n        \"new-advisory detection\",\n        \"affected-skill cross-reference\",\n        \"approval-gated malicious-skill removal recommendations\",\n        \"double-confirmation gating for risky skill installs\",\n        \"Ed25519 signature verification\",\n        \"checksum manifest verification\"\n      ],\n      \"standalone_available\": true,\n      \"deprecation_plan\": \"standalone skill may be retired after suite migration is verified\"\n    }\n  },\n  \"catalog\": {\n    \"description\": \"Available protections in the ClawSec suite\",\n    \"base_url\": \"https://clawsec.prompt.security/releases/download\",\n    \"skills\": {\n      \"clawsec-feed\": {\n        \"description\": \"Advisory monitoring is now embedded in clawsec-suite\",\n        \"integrated_in_suite\": true,\n        \"standalone_available\": true,\n        \"compatible\": [\n          \"openclaw\",\n          \"moltbot\",\n          \"clawdbot\",\n          \"other\"\n        ]\n      },\n      \"openclaw-audit-watchdog\": {\n        \"description\": \"Automated daily audits with email reporting\",\n        \"default_install\": true,\n        \"compatible\": [\n          \"openclaw\",\n          \"moltbot\",\n          \"clawdbot\"\n        ],\n        \"note\": \"Tailored for OpenClaw/MoltBot family\"\n      },\n      \"soul-guardian\": {\n        \"description\": \"Drift detection and file integrity guard\",\n        \"default_install\": false,\n        \"compatible\": [\n          \"openclaw\",\n          \"moltbot\",\n          \"clawdbot\",\n          \"other\"\n        ]\n      },\n      \"clawtributor\": {\n        \"description\": \"Community incident reporting (shares anonymized data)\",\n        \"default_install\": false,\n        \"requires_explicit_consent\": true,\n        \"compatible\": [\n          \"openclaw\",\n          \"moltbot\",\n          \"clawdbot\",\n          \"other\"\n        ]\n      }\n    }\n  },\n  \"openclaw\": {\n    \"emoji\": \"📦\",\n    \"category\": \"security\",\n    \"requires\": {\n      \"bins\": [\n        \"curl\",\n        \"jq\",\n        \"shasum\",\n        \"openssl\"\n      ]\n    },\n    \"triggers\": [\n      \"clawsec suite\",\n      \"security suite\",\n      \"security advisories\",\n      \"malicious skill alert\",\n      \"remove malicious skills\",\n      \"safe skill install\",\n      \"confirm skill install\",\n      \"check advisories\",\n      \"advisory feed\",\n      \"install security skills\",\n      \"verify skills\",\n      \"check skill integrity\",\n      \"update skills\"\n    ]\n  }\n}","readmeExcerpt":"Skill: clawsec-suite Owner: davida-ps Summary: ClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup... Tags: latest:0.1.3 Version history: v0.1.3 | 2026-02-25T11:27:15.775Z | user Release 0.1.3 via CI v0.1.2 | 2026-02-16T16:56:08.830Z | user Release 0.1.2 via CI v0.1.1 | 2026-02-16T12:49:13.431Z | user Release 0.1","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"SUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/discover_skill_catalog.mjs\""},{"language":"bash","snippet":"npx clawhub@latest install clawsec-suite"},{"language":"bash","snippet":"curl -fsSL \"$BASE/$ZIP_NAME\" -o \"$TEMP_DIR/$ZIP_NAME\""},{"language":"bash","snippet":"curl -fsSL \"$BASE/checksums.json\" -o \"$TEMP_DIR/checksums.json\""},{"language":"bash","snippet":"curl -fsSL \"$BASE/checksums.sig\" -o \"$TEMP_DIR/checksums.sig\""},{"language":"bash","snippet":"set -euo pipefail\n\nVERSION=\"${SKILL_VERSION:?Set SKILL_VERSION (e.g. 0.0.8)}\"\nINSTALL_ROOT=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}\"\nDEST=\"$INSTALL_ROOT/clawsec-suite\"\nBASE=\"https://github.com/prompt-security/clawsec/releases/download/clawsec-suite-v${VERSION}\"\n\nTEMP_DIR=\"$(mktemp -d)\"\ntrap 'rm -rf \"$TEMP_DIR\"' EXIT\n\n# Pinned release-signing public key (verify fingerprint out-of-band on first use)\n# Fingerprint (SHA-256 of SPKI DER): 711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8\nRELEASE_PUBKEY_SHA256=\"711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8\"\ncat > \"$TEMP_DIR/release-signing-public.pem\" <<'PEM'\n-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAS7nijfMcUoOBCj4yOXJX+GYGv2pFl2Yaha1P4v5Cm6A=\n-----END PUBLIC KEY-----\nPEM\n\nACTUAL_KEY_SHA256=\"$(openssl pkey -pubin -in \"$TEMP_DIR/release-signing-public.pem\" -outform DER | shasum -a 256 | awk '{print $1}')\"\nif [ \"$ACTUAL_KEY_SHA256\" != \"$RELEASE_PUBKEY_SHA256\" ]; then\n  echo \"ERROR: Release public key fingerprint mismatch\" >&2\n  exit 1\nfi\n\nZIP_NAME=\"clawsec-suite-v${VERSION}.zip\"\n\n# 1) Download release archive + signed checksums manifest + signing public key\ncurl -fsSL \"$BASE/$ZIP_NAME\" -o \"$TEMP_DIR/$ZIP_NAME\"\ncurl -fsSL \"$BASE/checksums.json\" -o \"$TEMP_DIR/checksums.json\"\ncurl -fsSL \"$BASE/checksums.sig\" -o \"$TEMP_DIR/checksums.sig\"\n\n# 2) Verify checksums manifest signature before trusting any hashes\nopenssl base64 -d -A -in \"$TEMP_DIR/checksums.sig\" -out \"$TEMP_DIR/checksums.sig.bin\"\nif ! openssl pkeyutl -verify \\\n  -pubin \\\n  -inkey \"$TEMP_DIR/release-signing-public.pem\" \\\n  -sigfile \"$TEMP_DIR/checksums.sig.bin\" \\\n  -rawin \\\n  -in \"$TEMP_DIR/checksums.json\" >/dev/null 2>&1; then\n  echo \"ERROR: checksums.json signature verification failed\" >&2\n  exit 1\nfi\n\nEXPECTED_ZIP_SHA=\"$(jq -r '.archive.sha256 // empty' \"$TEMP_DIR/checksums.json\")\"\nif [ -z \"$EXPECTED_ZIP_SHA\" ]; then\n  echo \"ERROR: checksums.json missing archive.sha256\" >&2\n  exit 1\nfi\n\nif command -v shasum >/dev/null 2>&1; then\n "}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: clawsec-suite\nversion: 0.1.3\ndescription: ClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup for additional security skills.\nhomepage: https://clawsec.prompt.security\nclawdis:\n  emoji: \"📦\"\n  requires:\n    bins: [curl, jq, shasum, openssl]\n---\n\n# ClawSec Suite\n\nThis means `clawsec-suite` can:\n- monitor the ClawSec advisory feed,\n- track which advisories are new since last check,\n- cross-reference advisories against locally installed skills,\n- recommend removal for malicious-skill advisories and require explicit user approval first,\n- and still act as the setup/management entrypoint for other ClawSec protections.\n\n## Included vs Optional Protections\n\n### Built into clawsec-suite\n- Embedded feed seed file: `advisories/feed.json`\n- Portable heartbeat workflow in `HEARTBEAT.md`\n- Advisory polling + state tracking + affected-skill checks\n- OpenClaw advisory guardian hook package: `hooks/clawsec-advisory-guardian/`\n- Setup scripts for hook and optional cron scheduling: `scripts/`\n- Guarded installer: `scripts/guarded_skill_install.mjs`\n- Dynamic catalog discovery for installable skills: `scripts/discover_skill_catalog.mjs`\n\n### Installed separately (dynamic catalog)\n`clawsec-suite` does not hard-code add-on skill names in this document.\n\nDiscover the current catalog from the authoritative index (`https://clawsec.prompt.security/skills/index.json`) at runtime:\n\n```bash\nSUITE_DIR=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}/clawsec-suite\"\nnode \"$SUITE_DIR/scripts/discover_skill_catalog.mjs\"\n```\n\nFallback behavior:\n- If the remote catalog index is reachable and valid, the suite uses it.\n- If the remote index is unavailable or malformed, the script falls back to suite-local catalog metadata in `skill.json`.\n\n## Installation\n\n### Cross-shell path note\n\n- In `bash`/`zsh`, keep path variables expandable (for example, `INSTALL_ROOT=\"$HOME/.openclaw/skills\"`).\n- Do not single-quote home-variable paths (avoid `'$HOME/.openclaw/skills'`).\n- In PowerShell, set an explicit path:\n  - `$env:INSTALL_ROOT = Join-Path $HOME \".openclaw\\\\skills\"`\n- If a path is passed with unresolved tokens (like `\\$HOME/...`), suite scripts now fail fast with a clear error.\n\n### Option A: Via clawhub (recommended)\n\n```bash\nnpx clawhub@latest install clawsec-suite\n```\n\n### Option B: Manual download with signature + checksum verification\n\n```bash\nset -euo pipefail\n\nVERSION=\"${SKILL_VERSION:?Set SKILL_VERSION (e.g. 0.0.8)}\"\nINSTALL_ROOT=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}\"\nDEST=\"$INSTALL_ROOT/clawsec-suite\"\nBASE=\"https://github.com/prompt-security/clawsec/releases/download/clawsec-suite-v${VERSION}\"\n\nTEMP_DIR=\"$(mktemp -d)\"\ntrap 'rm -rf \"$TEMP_DIR\"' EXIT\n\n# Pinned release-signing public key (verify fingerprint out-of-band on first use)\n# Fingerprint (SHA-256 of SPKI DER): 711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8\nRELEASE_PUBKEY_SHA256=\"711424e4535f8409"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn76m78f01hqrtpgm895s0jsax80jd8v\",\n  \"slug\": \"clawsec-suite\",\n  \"version\": \"0.1.3\",\n  \"publishedAt\": 1772018835775\n}"},{"path":"CHANGELOG.md","content":"# Changelog\n\nAll notable changes to the ClawSec Suite will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.1.3]\n\n### Added\n\n- Contributor credit: portability and path-hardening improvements in this release were contributed by [@aldodelgado](https://github.com/aldodelgado) in PR #62.\n- Cross-shell path resolution support for home-directory tokens in suite path configuration (`~`, `$HOME`, `${HOME}`, `%USERPROFILE%`, `$env:HOME`).\n- Dedicated path-resolution regression coverage (`test/path_resolution.test.mjs`) including fallback behavior for invalid explicit path values.\n- Additional advisory/installer tests validating home-token expansion and escaped-token rejection.\n\n### Changed\n\n- Advisory guardian hook now resolves configured path environment variables through a shared portability helper.\n- Guarded install flow now resolves feed/signature/checksum/public-key path overrides through the same shared path helper for consistent behavior across shells/OSes.\n- Advisory matching now explicitly scopes to `application: \"openclaw\"` when present; legacy advisories without `application` remain eligible for backward compatibility.\n\n### Fixed\n\n- Prevented advisory-check bypass when a single explicit path env var is malformed: invalid explicit values now fall back to safe defaults instead of aborting the entire hook run.\n\n### Security\n\n- Escaped/unexpanded home-token inputs in path config are explicitly rejected while preserving secure defaults.\n\n## [0.1.2]\n\n### Added\n\n- Advisory suppression module (`hooks/clawsec-advisory-guardian/lib/suppression.mjs`).\n- `loadAdvisorySuppression()` -- loads suppression config with `enabledFor: [\"advisory\"]` sentinel gate.\n- `isAdvisorySuppressed()` -- matches `advisory.id === rule.checkId` + case-insensitive skill name.\n- Advisory guardian handler integration: partitions matches into active/suppressed after `findMatches()`.\n- Suppressed matches tracked in state file (prevents re-evaluation) but not alerted.\n- Soft notification message for suppressed matches count.\n- Advisory suppression tests (13 tests in `advisory_suppression.test.mjs`).\n- Documentation in SKILL.md for advisory suppression/allowlist mechanism.\n\n### Changed\n\n- Advisory guardian handler (`handler.ts`) now loads suppression config and filters matches before alerting.\n\n### Security\n\n- Advisory suppression gated by config file sentinel (`enabledFor: [\"advisory\"]`) -- no CLI flag needed but config must explicitly opt in.\n- Suppressed matches are still tracked in state to maintain audit trail.\n\n## [0.1.1] - 2026-02-16\n\n### Added\n- Added `scripts/discover_skill_catalog.mjs` to dynamically discover installable skills from `https://clawsec.prompt.security/skills/index.json`.\n- Added `test/skill_catalog_discovery.test.mjs` to validate remote-catalog loading and fallback behavior.\n- Added CI signing-key drift guar"},{"path":"HEARTBEAT.md","content":"# ClawSec Suite — Heartbeat Check\n\nRun this periodically (cron/systemd/CI/agent scheduler). It assumes POSIX shell, `curl`, and `jq`.\n\n## Goals\n\n1. Check whether `clawsec-suite` has an update available.\n2. Poll the advisory feed.\n3. Report new advisories, highlight affected installed skills, and require approval before removal actions.\n\n---\n\n## Configuration\n\n```bash\nINSTALL_ROOT=\"${INSTALL_ROOT:-$HOME/.openclaw/skills}\"\nSUITE_DIR=\"$INSTALL_ROOT/clawsec-suite\"\nCHECKSUMS_URL=\"${CHECKSUMS_URL:-https://clawsec.prompt.security/releases/latest/download/checksums.json}\"\nFEED_URL=\"${CLAWSEC_FEED_URL:-https://clawsec.prompt.security/advisories/feed.json}\"\nSTATE_FILE=\"${CLAWSEC_SUITE_STATE_FILE:-$HOME/.openclaw/clawsec-suite-feed-state.json}\"\nMIN_FEED_INTERVAL_SECONDS=\"${MIN_FEED_INTERVAL_SECONDS:-300}\"\n```\n\n---\n\n## Step 0 — Basic sanity\n\n```bash\nset -euo pipefail\n\ntest -d \"$SUITE_DIR\"\ntest -f \"$SUITE_DIR/skill.json\"\n\necho \"=== ClawSec Suite Heartbeat ===\"\necho \"When:  $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\necho \"Suite: $SUITE_DIR\"\n```\n\n---\n\n## Step 1 — Check suite version updates\n\n```bash\nTMP=\"$(mktemp -d)\"\ntrap 'rm -rf \"$TMP\"' EXIT\n\ncurl -fsSLo \"$TMP/checksums.json\" \"$CHECKSUMS_URL\"\n\nINSTALLED_VER=\"$(jq -r '.version // \"\"' \"$SUITE_DIR/skill.json\" 2>/dev/null || true)\"\nLATEST_VER=\"$(jq -r '.version // \"\"' \"$TMP/checksums.json\" 2>/dev/null || true)\"\n\necho \"Installed suite: ${INSTALLED_VER:-unknown}\"\necho \"Latest suite:    ${LATEST_VER:-unknown}\"\n\nif [ -n \"$LATEST_VER\" ] && [ \"$LATEST_VER\" != \"$INSTALLED_VER\" ]; then\n  echo \"UPDATE AVAILABLE: clawsec-suite ${INSTALLED_VER:-unknown} -> $LATEST_VER\"\nelse\n  echo \"Suite appears up to date.\"\nfi\n```\n\n---\n\n## Step 2 — Initialize advisory state\n\n```bash\nmkdir -p \"$(dirname \"$STATE_FILE\")\"\n\nif [ ! -f \"$STATE_FILE\" ]; then\n  echo '{\"schema_version\":\"1.0\",\"known_advisories\":[],\"last_feed_check\":null,\"last_feed_updated\":null}' > \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n\nif ! jq -e '.schema_version and .known_advisories' \"$STATE_FILE\" >/dev/null 2>&1; then\n  echo \"WARNING: Invalid state file, resetting: $STATE_FILE\"\n  cp \"$STATE_FILE\" \"${STATE_FILE}.bak.$(date -u +%Y%m%d%H%M%S)\" 2>/dev/null || true\n  echo '{\"schema_version\":\"1.0\",\"known_advisories\":[],\"last_feed_check\":null,\"last_feed_updated\":null}' > \"$STATE_FILE\"\n  chmod 600 \"$STATE_FILE\"\nfi\n```\n\n---\n\n## Step 3 — Advisory feed check (embedded clawsec-feed)\n\n```bash\nnow_epoch=\"$(date -u +%s)\"\nlast_check=\"$(jq -r '.last_feed_check // \"1970-01-01T00:00:00Z\"' \"$STATE_FILE\")\"\nlast_epoch=\"$(date -u -d \"$last_check\" +%s 2>/dev/null || date -u -j -f \"%Y-%m-%dT%H:%M:%SZ\" \"$last_check\" +%s 2>/dev/null || echo 0)\"\n\nif [ $((now_epoch - last_epoch)) -lt \"$MIN_FEED_INTERVAL_SECONDS\" ]; then\n  echo \"Feed check skipped (rate limit: ${MIN_FEED_INTERVAL_SECONDS}s).\"\nelse\n  FEED_TMP=\"$TMP/feed.json\"\n  FEED_SOURCE=\"$FEED_URL\"\n\n  if ! curl -fsSLo \"$FEED_TMP\" \"$FEED_URL\"; then\n    if [ -f \"$SUITE_DIR/advisories/feed.json\" ]; then\n      cp \"$SUITE_DIR/advisories/feed.json\" \"$FEED_TMP\"\n      FE"},{"path":"hooks/clawsec-advisory-guardian/HOOK.md","content":"---\nname: clawsec-advisory-guardian\ndescription: Detect advisory matches for installed skills and require explicit user approval before any removal action.\nmetadata: { \"openclaw\": { \"events\": [\"agent:bootstrap\", \"command:new\"] } }\n---\n\n# ClawSec Advisory Guardian Hook\n\nThis hook checks the ClawSec advisory feed against locally installed skills on:\n\n- `agent:bootstrap`\n- `command:new`\n\nWhen it detects an advisory affecting an installed skill, it posts an alert message.\nIf the advisory looks malicious or removal-oriented, it explicitly recommends removal\nand asks for user approval first.\n\n## Safety Contract\n\n- The hook does not delete or modify skills.\n- It only reports findings and requests explicit approval before removal.\n- Alerts are deduplicated using `~/.openclaw/clawsec-suite-feed-state.json`.\n\n## Optional Environment Variables\n\n- `CLAWSEC_FEED_URL`: override remote feed URL.\n- `CLAWSEC_FEED_SIG_URL`: override detached remote feed signature URL (default `${CLAWSEC_FEED_URL}.sig`).\n- `CLAWSEC_FEED_CHECKSUMS_URL`: override remote checksum manifest URL (default sibling `checksums.json`).\n- `CLAWSEC_FEED_CHECKSUMS_SIG_URL`: override detached remote checksum manifest signature URL.\n- `CLAWSEC_FEED_PUBLIC_KEY`: path to pinned feed-signing public key PEM.\n- `CLAWSEC_LOCAL_FEED`: override local fallback feed file.\n- `CLAWSEC_LOCAL_FEED_SIG`: override local detached feed signature path.\n- `CLAWSEC_LOCAL_FEED_CHECKSUMS`: override local checksum manifest path.\n- `CLAWSEC_LOCAL_FEED_CHECKSUMS_SIG`: override local checksum manifest signature path.\n- `CLAWSEC_VERIFY_CHECKSUM_MANIFEST`: set to `0` only for emergency troubleshooting (default verifies checksums).\n- `CLAWSEC_ALLOW_UNSIGNED_FEED`: set to `1` only for temporary migration compatibility; bypasses signature/checksum verification.\n- `CLAWSEC_SUITE_STATE_FILE`: override state file path.\n- `CLAWSEC_INSTALL_ROOT`: override installed skills root.\n- `CLAWSEC_SUITE_DIR`: override clawsec-suite install path.\n- `CLAWSEC_HOOK_INTERVAL_SECONDS`: minimum interval between hook scans (default `300`)."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1318,"uniquenessScore":41,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"agent-directory","verified":false,"confidence":"low","updatedAt":"2026-10-09T15:14:48.880Z","emptyReason":"No close protocol neighbors were found."},"items":[],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[]}}}