$npx -y skills add prompt-security/clawsec --skill picoclaw-security-guardianPicoclaw security posture skill with advisory awareness, configuration drift detection, and supply-chain verification guidance.
| 1 | # Picoclaw Security Guardian |
| 2 | |
| 3 | Detailed architecture/operator docs: `wiki/modules/picoclaw-security-guardian.md`. |
| 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 picoclaw-security-guardian -a openclaw -y |
| 11 | ``` |
| 12 | |
| 13 | ## Release Artifact Verification |
| 14 | |
| 15 | 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. |
| 16 | |
| 17 | ```bash |
| 18 | set -euo pipefail |
| 19 | |
| 20 | SKILL_NAME="picoclaw-security-guardian" |
| 21 | VERSION="0.0.6" |
| 22 | REPO="prompt-security/clawsec" |
| 23 | TAG="${SKILL_NAME}-v${VERSION}" |
| 24 | BASE="https://github.com/${REPO}/releases/download/${TAG}" |
| 25 | ZIP_NAME="${SKILL_NAME}-v${VERSION}.zip" |
| 26 | TMP_DIR="$(mktemp -d)" |
| 27 | trap 'rm -rf "$TMP_DIR"' EXIT |
| 28 | |
| 29 | RELEASE_PUBKEY_SHA256="711424e4535f84093fefb024cd1ca4ec87439e53907b305b79a631d5befba9c8" |
| 30 | |
| 31 | curl -fsSL "$BASE/checksums.json" -o "$TMP_DIR/checksums.json" |
| 32 | curl -fsSL "$BASE/checksums.sig" -o "$TMP_DIR/checksums.sig" |
| 33 | curl -fsSL "$BASE/signing-public.pem" -o "$TMP_DIR/signing-public.pem" |
| 34 | curl -fsSL "$BASE/$ZIP_NAME" -o "$TMP_DIR/$ZIP_NAME" |
| 35 | curl -fsSL "$BASE/SKILL.md" -o "$TMP_DIR/SKILL.md" |
| 36 | curl -fsSL "$BASE/skill.json" -o "$TMP_DIR/skill.json" |
| 37 | |
| 38 | ACTUAL_PUBKEY_SHA256="$(openssl pkey -pubin -in "$TMP_DIR/signing-public.pem" -outform DER | shasum -a 256 | awk '{print $1}')" |
| 39 | if [ "$ACTUAL_PUBKEY_SHA256" != "$RELEASE_PUBKEY_SHA256" ]; then |
| 40 | echo "ERROR: signing-public.pem fingerprint mismatch" >&2 |
| 41 | exit 1 |
| 42 | fi |
| 43 | |
| 44 | openssl base64 -d -A -in "$TMP_DIR/checksums.sig" -out "$TMP_DIR/checksums.sig.bin" |
| 45 | openssl pkeyutl -verify -rawin -pubin \ |
| 46 | -inkey "$TMP_DIR/signing-public.pem" \ |
| 47 | -sigfile "$TMP_DIR/checksums.sig.bin" \ |
| 48 | -in "$TMP_DIR/checksums.json" >/dev/null |
| 49 | |
| 50 | hash_file() { |
| 51 | if command -v shasum >/dev/null 2>&1; then |
| 52 | shasum -a 256 "$1" | awk '{print $1}' |
| 53 | else |
| 54 | sha256sum "$1" | awk '{print $1}' |
| 55 | fi |
| 56 | } |
| 57 | |
| 58 | verify_manifest_file() { |
| 59 | asset="$1" |
| 60 | path="$2" |
| 61 | expected="$(jq -r --arg asset "$asset" '.files[$asset].sha256 // empty' "$TMP_DIR/checksums.json")" |
| 62 | if [ -z "$expected" ]; then |
| 63 | echo "ERROR: checksums.json missing $asset" >&2 |
| 64 | exit 1 |
| 65 | fi |
| 66 | actual="$(hash_file "$path")" |
| 67 | if [ "$actual" != "$expected" ]; then |
| 68 | echo "ERROR: checksum mismatch for $asset" >&2 |
| 69 | exit 1 |
| 70 | fi |
| 71 | } |
| 72 | |
| 73 | expected_archive="$(jq -r '.archive.sha256 // empty' "$TMP_DIR/checksums.json")" |
| 74 | if [ -z "$expected_archive" ]; then |
| 75 | echo "ERROR: checksums.json missing archive.sha256" >&2 |
| 76 | exit 1 |
| 77 | fi |
| 78 | actual_archive="$(hash_file "$TMP_DIR/$ZIP_NAME")" |
| 79 | if [ "$actual_archive" != "$expected_archive" ]; then |
| 80 | echo "ERROR: archive checksum mismatch" >&2 |
| 81 | exit 1 |
| 82 | fi |
| 83 | |
| 84 | verify_manifest_file "SKILL.md" "$TMP_DIR/SKILL.md" |
| 85 | verify_manifest_file "skill.json" "$TMP_DIR/skill.json" |
| 86 | |
| 87 | echo "Signed release manifest, archive, SKILL.md, and skill.json verified." |
| 88 | ``` |
| 89 | |
| 90 | Only install or extract the archive after this verification succeeds. |
| 91 | |
| 92 | ## Goal |
| 93 | |
| 94 | Provide Picoclaw with the same support-matrix security capabilities ClawSec tracks for mature platform modules: |
| 95 | |
| 96 | | Skill name | supported platform | security feed | config drift | agent posture-review lane | chain of supply verification | |
| 97 | |---|---|---|---|---|---| |
| 98 | | picoclaw-security-guardian | Picoclaw | Yes | Yes | Separate package | Yes | |
| 99 | |
| 100 | ## Threat model |
| 101 | |
| 102 | Picoclaw is a lightweight AI gateway that can expose chat channels, a Web UI, tool execution, MCP servers, credentials, schedulers, and embedded/router deployments. This skill focuses on the trust boundaries where those features become security-sensitive. |
| 103 | |
| 104 | ## Default safety posture |
| 105 | |
| 106 | - Read-only by default. |
| 107 | - No scheduler creation in v0.0.1. |
| 108 | - No outbound network by default. |
| 109 | - Writes only explicit report/profile outputs under `$PICOCLAW_HOME/security/clawsec/` unless the operator supplies test-local temporary paths. |
| 110 | - Advisory checks fail closed when verification state is not verified unless the operator passes `--allow-unsigned` for a documented emergency/offline window. |
| 111 | |
| 112 | ## Security advisory awareness |
| 113 | |
| 114 | Use `scripts/check_advisories.mjs` with a local feed/cache and verification state: |
| 115 | |
| 116 | ```bash |
| 117 | node scripts/check_advisories.mjs --feed ~/.picoclaw/security/clawsec/feed.json --state ~/.picoclaw/security/clawsec/feed-verification-state.json |
| 118 | ``` |
| 119 | |
| 120 | The script filters advisories for `picoclaw`, `ai-gateway`, empty/all-platform advisories, or affected package entries containing `picoclaw`. |
| 121 | The expected feed input is the consolidated signed ClawSec advisory feed, so i |