$npx -y skills add prompt-security/clawsec --skill clawsec-clawhub-checkerClawHub reputation checker for clawsec-suite. Adds a standalone reputation gate before guarded skill installation.
| 1 | # ClawSec ClawHub Checker |
| 2 | |
| 3 | Adds a reputation gate on top of the `clawsec-suite` guarded installer. |
| 4 | |
| 5 | ## Vercel Skills Installation |
| 6 | |
| 7 | Install with the Vercel Skills CLI for this harness: |
| 8 | |
| 9 | ```bash |
| 10 | npx skills add prompt-security/clawsec --skill clawsec-clawhub-checker -a openclaw -y |
| 11 | ``` |
| 12 | |
| 13 | ## Operational Notes |
| 14 | |
| 15 | - Required runtime: `node`, `clawhub`, `openclaw` |
| 16 | - Depends on: installed `clawsec-suite` |
| 17 | - Side effects: none on other skills; this package does not rewrite installed suite files |
| 18 | - Advisory-hook wiring is optional and manual in this release |
| 19 | - Network behavior: reputation checks call ClawHub inspect/search endpoints |
| 20 | - Trust model: scores are heuristic and confirmation-gated |
| 21 | |
| 22 | ## What It Does |
| 23 | |
| 24 | 1. Reads skill metadata from ClawHub (`inspect --json`) |
| 25 | 2. Evaluates scanner status (including VirusTotal summary when present) |
| 26 | 3. Applies additional reputation heuristics (age, updates, author history, downloads) |
| 27 | 4. Requires explicit `--confirm-reputation` when score is below threshold |
| 28 | |
| 29 | ## Installation |
| 30 | |
| 31 | Install after `clawsec-suite`: |
| 32 | |
| 33 | ```bash |
| 34 | npx clawhub@latest install clawsec-suite |
| 35 | npx clawhub@latest install clawsec-clawhub-checker |
| 36 | ``` |
| 37 | |
| 38 | Optional preflight check (validates local paths and prints recommended command): |
| 39 | |
| 40 | ```bash |
| 41 | node ~/.openclaw/skills/clawsec-clawhub-checker/scripts/setup_reputation_hook.mjs |
| 42 | ``` |
| 43 | |
| 44 | ## Release Artifact Verification |
| 45 | |
| 46 | For standalone installs, verify the signed release manifest before trusting `SKILL.md`, `skill.json`, or the archive. The `skill.json` file is the package metadata/SBOM source, and the release pipeline signs `checksums.json` with the ClawSec release key. |
| 47 | |
| 48 | ```bash |
| 49 | set -euo pipefail |
| 50 | |
| 51 | SKILL_NAME="clawsec-clawhub-checker" |
| 52 | VERSION="0.0.8" |
| 53 | REPO="prompt-security/clawsec" |
| 54 | TAG="${SKILL_NAME}-v${VERSION}" |
| 55 | BASE="https://github.com/${REPO}/releases/download/${TAG}" |
| 56 | ZIP_NAME="${SKILL_NAME}-v${VERSION}.zip" |
| 57 | TMP_DIR="$(mktemp -d)" |
| 58 | trap 'rm -rf "$TMP_DIR"' EXIT |
| 59 | |
| 60 | RELEASE_PUBKEY_SHA256="711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8" |
| 61 | |
| 62 | curl -fsSL "$BASE/checksums.json" -o "$TMP_DIR/checksums.json" |
| 63 | curl -fsSL "$BASE/checksums.sig" -o "$TMP_DIR/checksums.sig" |
| 64 | curl -fsSL "$BASE/signing-public.pem" -o "$TMP_DIR/signing-public.pem" |
| 65 | curl -fsSL "$BASE/$ZIP_NAME" -o "$TMP_DIR/$ZIP_NAME" |
| 66 | curl -fsSL "$BASE/SKILL.md" -o "$TMP_DIR/SKILL.md" |
| 67 | curl -fsSL "$BASE/skill.json" -o "$TMP_DIR/skill.json" |
| 68 | |
| 69 | ACTUAL_PUBKEY_SHA256="$(openssl pkey -pubin -in "$TMP_DIR/signing-public.pem" -outform DER | shasum -a 256 | awk '{print $1}')" |
| 70 | if [ "$ACTUAL_PUBKEY_SHA256" != "$RELEASE_PUBKEY_SHA256" ]; then |
| 71 | echo "ERROR: signing-public.pem fingerprint mismatch" >&2 |
| 72 | exit 1 |
| 73 | fi |
| 74 | |
| 75 | openssl base64 -d -A -in "$TMP_DIR/checksums.sig" -out "$TMP_DIR/checksums.sig.bin" |
| 76 | openssl pkeyutl -verify -rawin -pubin \ |
| 77 | -inkey "$TMP_DIR/signing-public.pem" \ |
| 78 | -sigfile "$TMP_DIR/checksums.sig.bin" \ |
| 79 | -in "$TMP_DIR/checksums.json" >/dev/null |
| 80 | |
| 81 | hash_file() { |
| 82 | if command -v shasum >/dev/null 2>&1; then |
| 83 | shasum -a 256 "$1" | awk '{print $1}' |
| 84 | else |
| 85 | sha256sum "$1" | awk '{print $1}' |
| 86 | fi |
| 87 | } |
| 88 | |
| 89 | verify_manifest_file() { |
| 90 | asset="$1" |
| 91 | path="$2" |
| 92 | expected="$(jq -r --arg asset "$asset" '.files[$asset].sha256 // empty' "$TMP_DIR/checksums.json")" |
| 93 | if [ -z "$expected" ]; then |
| 94 | echo "ERROR: checksums.json missing $asset" >&2 |
| 95 | exit 1 |
| 96 | fi |
| 97 | actual="$(hash_file "$path")" |
| 98 | if [ "$actual" != "$expected" ]; then |
| 99 | echo "ERROR: checksum mismatch for $asset" >&2 |
| 100 | exit 1 |
| 101 | fi |
| 102 | } |
| 103 | |
| 104 | expected_archive="$(jq -r '.archive.sha256 // empty' "$TMP_DIR/checksums.json")" |
| 105 | if [ -z "$expected_archive" ]; then |
| 106 | echo "ERROR: checksums.json missing archive.sha256" >&2 |
| 107 | exit 1 |
| 108 | fi |
| 109 | actual_archive="$(hash_file "$TMP_DIR/$ZIP_NAME")" |
| 110 | if [ "$actual_archive" != "$expected_archive" ]; then |
| 111 | echo "ERROR: archive checksum mismatch" >&2 |
| 112 | exit 1 |
| 113 | fi |
| 114 | |
| 115 | verify_manifest_file "SKILL.md" "$TMP_DIR/SKILL.md" |
| 116 | verify_manifest_file "skill.json" "$TMP_DIR/skill.json" |
| 117 | |
| 118 | echo "Signed release manifest, archive, SKILL.md, and skill.json verified." |
| 119 | ``` |
| 120 | |
| 121 | Only install or extract the archive after this verification succeeds. |
| 122 | |
| 123 | ## Usage |
| 124 | |
| 125 | Run the enhanced installer directly from this skill: |
| 126 | |
| 127 | ```bash |
| 128 | node ~/.openclaw/skills/clawsec-clawhub-checker/scripts/enhanced_guarded_install.mjs \ |
| 129 | --skill some-skill \ |
| 130 | --version 1.0.0 |
| 131 | ``` |
| 132 | |
| 133 | If a skill is below threshold, rerun only with explicit approval: |
| 134 | |
| 135 | ```bash |
| 136 | node ~/.openclaw/skills/clawsec-clawhub-checker/scripts/enhanced_guarded_install.mjs \ |
| 137 | --skill some-skill \ |
| 138 | --version 1.0.0 \ |
| 139 | --confirm-reputation |
| 140 | ``` |
| 141 | |
| 142 | ## Optional Advisory-Hook Wiring (Manual) |
| 143 | |
| 144 | This release does not auto-patch `clawsec-suite` hook files. |
| 145 | If you rely on advisory alerts that include `reputationWarning` / `reputationWarnings`, wire the check |