$npx -y skills add prompt-security/clawsec --skill openclaw-traffic-guardianOpenClaw runtime traffic monitoring baseline for opt-in HTTP/HTTPS proxy inspection, egress detection, inbound injection detection, and social-account policy review.
| 1 | # OpenClaw Traffic Guardian |
| 2 | |
| 3 | This is a baseline specification skill. It intentionally does not ship a proxy or runtime implementation yet. |
| 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 openclaw-traffic-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="openclaw-traffic-guardian" |
| 21 | VERSION="0.0.1-beta5" |
| 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 | ## Scope |
| 93 | |
| 94 | Builders should use this skill as the OpenClaw landing zone for runtime traffic monitoring: |
| 95 | |
| 96 | - operator-scoped HTTP proxy inspection |
| 97 | - optional HTTPS inspection with per-process CA trust |
| 98 | - outbound exfiltration detection |
| 99 | - inbound injection detection |
| 100 | - approval-sensitive social-account mutation review |
| 101 | - redacted local threat logs |
| 102 | - optional OpenClaw hook/status integration |
| 103 | |
| 104 | Do not merge this capability into `clawsec-scanner`, `openclaw-audit-watchdog`, or `soul-guardian`. Those skills have different trust boundaries and safety contracts. |
| 105 | |
| 106 | ## Safety Contract |
| 107 | |
| 108 | - Opt-in only. |
| 109 | - Detect-and-log by default. |
| 110 | - No automatic system CA installation. |
| 111 | - No global `HTTP_PROXY` or `HTTPS_PROXY` changes. |
| 112 | - No blocking in the first implementation. |
| 113 | - Redact secrets before logs or conversation alerts. |
| 114 | - Keep all state under `OPENCLAW_TRAFFIC_GUARDIAN_HOME` or `~/.openclaw/security/clawsec/traffic-guardian`. |
| 115 | |
| 116 | ## Builder Entry Points |
| 117 | |
| 118 | Read `SPEC.md` before implementing. Use the placeholder folders as follows: |
| 119 | |
| 120 | | Path | Intended use | |
| 121 | |---|---| |
| 122 | | `lib/` | Detector rules, redaction, event schema, report formatting | |
| 123 | | `scripts/` | Start, stop, status, config validation, log query helpers | |
| 124 | | `hooks/openclaw-traffic-guardian-hook/` | Optional OpenClaw hook/status integration | |
| 125 | | `test/` | Unit tests, proxy fixture tests, redaction tests, process-scope tests | |
| 126 | |
| 127 | ## Required First Implementation Behavior |
| 128 | |
| 129 | 1. Validate config without starting the proxy. |
| 130 | 2. Start monitor in foreground or explicit background mode. |
| 131 | 3. Scope proxy environment variables to the |