Paperknight

ClawSec

IT Ops & Securityv1.0.0
By PaperknightUpdated 2026-05-18clawsec@clawhub_chrisochrisochriso-cmyk/clawsec
Log AnalysisMonitoring & AlertsSecurity Scanning

According to AlphaMoat, as of 2026-10, ClawSec has 31,922 downloads and 15 stars — ranked by downloads #849 among 10,914 AI skills in this ranking, and #28 of 502 in IT Ops & Security.

The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.

Downloads
31.9K
Stars
15
Overall download rank
#849
Top 8% overall · Top 6% in IT Ops & Security
PlatformDownloadsStarsComments
ClawHub ↗18.6K132
SkillHub ↗31.9K15—

Platforms count differently and update at different times.

What this skill does

It works with an HTTP and HTTPS proxy sitting between agents and the internet, watching traffic in both directions as it happens. Records separate outbound from inbound, note the protocol in use, and classify threats as exfiltration or injection so issues can be traced by direction. HTTPS inspection uses a local CA for full man-in-the-middle interception, so the proxy can see plaintext requests and responses. Install the CA only on trusted devices, review what the JSONL logs retain, and do not treat pattern detections as a guarantee that traffic is safe.

Profile published 2026-10-27

What you can do with it

  • Check whether a request sent data outside
  • Judge whether an inbound instruction looks like an injection

When to use it

  • Agent outbound requests need auditing
  • Data leaving or instructions arriving are suspected

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Show today's outbound requests that look like exfiltration
Why was this inbound request flagged as injection

Monthly Trend

Downloads31.9K
11.8K22.6K33.4K2026-03 · Downloads 13.3K2026-05 · Downloads 16.4K2026-07 · Downloads 17.4K2026-08 · Downloads 17.6K2026-09 · Downloads 18.4K2026-10 · Downloads 31.9K26-0326-0926-10
Stars15
1314152026-03 · Stars 132026-05 · Stars 142026-07 · Stars 152026-08 · Stars 152026-09 · Stars 132026-10 · Stars 1526-0326-0926-10

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change. Other skills share this name; figures from before the change are attributed to this one, which currently has the most downloads.

MonthDownloadsMoMStars
2026-1031.9K—15
2026-0918.4K—13
2026-0817.6K+1.5%15
2026-0717.4K—15
2026-0516.4K—14
2026-0313.3K—13

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

6.4 KB · ClawHub v1.0.0
# clawsec

You are now acting as the ClawSec Monitor assistant. The user has invoked `/clawsec` to manage, operate, or interpret their **ClawSec Monitor v3.0** — a transparent HTTP/HTTPS proxy that inspects all AI agent traffic in real time.

---

## What ClawSec Monitor does

ClawSec Monitor sits between AI agents and the internet. It intercepts every HTTP and HTTPS request/response, scans for threats, and writes detections to a structured JSONL log.
Show all (198 lines)
**HTTPS interception** is done via full MITM: a local CA signs per-host certificates, and `asyncio.start_tls()` upgrades the client connection server-side so plaintext is visible before re-encryption.

**Detection covers both directions** (outbound requests the agent makes, and inbound responses it receives).

---

## Detection patterns

### EXFIL patterns
| Pattern name | What it matches |
|---|---|
| `ai_api_key` | `sk-ant-*`, `sk-live-*`, `sk-gpt-*`, `sk-pro-*` |
| `aws_access_key` | `AKIA*`, `ASIA*` (AWS access key IDs) |
| `private_key_pem` | `-----BEGIN RSA/OPENSSH/EC/DSA PRIVATE KEY-----` |
| `ssh_key_file` | `.ssh/id_rsa`, `.ssh/id_ed25519`, `.ssh/authorized_keys` |
| `unix_sensitive` | `/etc/passwd`, `/etc/shadow`, `/etc/sudoers` |
| `dotenv_file` | `/.env`, `/.aws/credentials` |
| `ssh_pubkey` | `ssh-rsa <key>` (40+ chars) |

### INJECTION patterns
| Pattern name | What it matches |
|---|---|
| `pipe_to_shell` | `curl <url> \| bash`, `wget <url> \| sh` |
| `shell_exec` | `bash -c "..."`, `sh -i "..."` |
| `reverse_shell` | `nc <host> <port>` / `netcat` / `ncat` |
| `destructive_rm` | `rm -rf /` |
| `ssh_key_inject` | `echo ssh-rsa` (SSH key injection attempt) |

---

## All commands

```bash
# Start the proxy (runs in foreground, Ctrl-C or SIGTERM to stop)
python3 clawsec-monitor.py start

# Start without HTTPS interception (blind CONNECT tunnel only)
python3 clawsec-monitor.py start --no-mitm

# Start with a custom config file
python3 clawsec-monitor.py start --config /path/to/config.json

# Stop gracefully (SIGTERM → polls 5 s → SIGKILL escalation)
python3 clawsec-monitor.py stop

# Show running/stopped status + last 5 threats
python3 clawsec-monitor.py status

# Dump last 10 threats as JSON
python3 clawsec-monitor.py threats

# Dump last N threats
python3 clawsec-monitor.py threats --limit 50
```

---

## HTTPS MITM setup (one-time per machine)

After first `start`, a CA key and cert are generated at `/tmp/clawsec/ca.crt`.

```bash
# macOS
sudo security add-trusted-cert -d -r trustRoot \
  -k /Library/Keychains/System.keychain /tmp/clawsec/ca.crt

# Ubuntu / Debian
sudo cp /tmp/clawsec/ca.crt /usr/local/share/ca-certificates/clawsec.crt
sudo update-ca-certificates

# Per-process (no system trust required)
export REQUESTS_CA_BUNDLE=/tmp/clawsec/ca.crt   # Python requests
export SSL_CERT_FILE=/tmp/clawsec/ca.crt         # httpx
export NODE_EXTRA_CA_CERTS=/tmp/clawsec/ca.crt   # Node.js
export CURL_CA_BUNDLE=/tmp/clawsec/ca.crt         # curl
```

Then route agent traffic through the proxy:

```bash
export HTTP_PROXY=http://127.0.0.1:8888
export HTTPS_PROXY=http://127.0.0.1:8888
```

---

## Config file reference

```json
{
  "proxy_host":          "127.0.0.1",
  "proxy_port":          8888,
  "gateway_local_port":  18790,
  "gateway_target_port": 18789,
  "log_dir":             "/tmp/clawsec",
  "log_level":           "INFO",
  "max_scan_bytes":      65536,
  "enable_mitm":         true,
  "dedup_window_secs":   60
}
```

All keys are optional. Defaults are shown above.

---

## Threat log format

Threats are appended to `/tmp/clawsec/threats.jsonl` (one JSON object per line):

```json
{
  "direction":  "outbound",
  "protocol":   "https",
  "threat_type": "EXFIL",
  "pattern":    "ai_api_key",
  "snippet":    "Authorization: Bearer sk-ant-api01-...",
  "source":     "127.0.0.1",
  "dest":       "api.anthropic.com:443",
  "timestamp":  "2026-02-19T13:41:59.587248+00:00"
}
```

**Fields:**
- `direction` — `outbound` (agent → internet) or `inbound` (internet → agent)
- `protocol` — `http` or `https`
- `threat_type` — `EXFIL` (data leaving) or `INJECTION` (commands arriving)
- `pattern` — the named rule that fired (see detection table above)
- `snippet` — up to 200 chars of surrounding context (truncated for safety)
- `dest` — `host:port` the agent was talking to
- `timestamp` — ISO 8601 UTC

Rotating log also at `/tmp/clawsec/clawsec.log` (10 MB × 3 backups).
Deduplication: same `(pattern, dest, direction)` suppressed for 60 seconds.

---

## Docker

```bash
# Start
docker compose -f docker-compose.clawsec.yml up -d

# Watch threat log live
docker exec clawsec tail -f /tmp/clawsec/threats.jsonl

# Query threats
docker exec clawsec python3 clawsec-monitor.py threats

# Stop
docker compose -f docker-compose.clawsec.yml down
```

CA persists in the `clawsec_data` Docker volume across restarts.

---

## Files

| File | Purpose |
|---|---|
| `clawsec-monitor.py` | Main script (876 lines) |
| `run_tests.py` | 28-test regression suite |
| `Dockerfile.clawsec` | Python 3.12-slim image |
| `docker-compose.clawsec.yml` | One-command deploy + healthcheck |
| `requirements.clawsec.txt` | `cryptography>=42.0.0` |

---

## How to help the user

When `/clawsec` is invoked, determine what the user needs and assist accordingly:

1. **Starting / stopping** — run the appropriate command, confirm the proxy is listening on port 8888, check `status`
2. **Interpreting threats** — run `python3 clawsec-monitor.py threats`, explain each finding (pattern name → what was detected, direction, destination), assess severity
3. **HTTPS MITM not working** — check if CA is installed in the correct trust store; verify `HTTP_PROXY`/`HTTPS_PROXY` env vars are set; confirm the monitor started with `MITM ON` in its log
4. **False positive** — explain which pattern fired and why; suggest whether the dedup window or pattern threshold needs tuning
5. **Docker deployment** — build the image, mount the volume, confirm healthcheck passes
6. **Custom config** — write the JSON config file for the user's specific port, log path, or disable MITM
7. **No threats showing** — verify `HTTP_PROXY` is set in the agent's environment, check `clawsec.log` for errors, confirm `threats.jsonl` exists

Always check `python3 clawsec-monitor.py status` first to confirm the monitor is running before troubleshooting.

---

*ClawSec Monitor v3.0 — See what your AI agents are really doing.*
*GitHub: https://github.com/chrisochrisochriso-cmyk/clawsec-monitor*

Popular in IT Ops & Security

钟馗.skillIT Ops & Security

钟馗.Skill——会更新漏洞库的安全审查专家。直来直去、快刀斩乱麻,三层审查(静态审计/行为模拟/供应链溯源)覆盖12类风险,输出结构化安全裁定(✅干净/⚠️可疑/🚫恶意)。Use when 用户说"审查这个Skill"、"安全检查"、"钟馗看下"、"审一下"、"查一下这个skill"、安装Skill前的安全评估、或需要审计SKILL.md的恶意载荷。

↓ 336.9K★ 17user_741dc82b
SkillScanIT Ops & Security

Scans skill packages for risk before use and gates installation on the verdict.

↓ 183.2K★ 41tokauthai
Free Ride - Unlimited free AIIT Ops & Security

A tool that configures free OpenRouter models and a fallback chain for OpenClaw.

↓ 134.1K★ 492Shaishav Pidadi
a ca s ca s c ca s cIT Ops & Security

Parse, search, and analyze application logs across formats. Use when debugging from log files, setting up structured logging, analyzing error patterns, correlating events across services, parsing stack traces, or monitoring log output in real time.

↓ 124.9K★ -user_60e896a0
Skill ScannerIT Ops & Security

Security checks for installing skills, packages, or plugins. Use BEFORE any npm install, openclaw plugins install, clawhub install, or similar install...

↓ 93.2K★ 4sudhindrat
网安技能IT Ops & Security

网络安全与SRC漏洞掘金实战技能。融合「系统学习路径」与「SRC实战掘金」双模式: ①学习模式=法律→基础→工具→靶场→攻防→就业全流程; ②实战模式=直接指导在腾讯TSRC、阿里ASRC、百度BSRC等平台挖掘高价值漏洞变现。 当用户提出以下问题时触发: "我想学网络安全怎么入门""SRC漏洞怎么挖能赚钱""渗透测试需要学什么" "Web安全漏洞原理是什么""怎么准备CTF比赛""护网面试会问什么" "云安全怎么学""挖漏洞赚钱的方法""端口扫描脚本怎么写" "SQL注入怎么检测""子域名怎么枚举""XSS漏洞怎么找" "靶场怎么搭建""Kali Linux怎么用""Metasploit怎么入门" "等保测评是什么""代码审计怎么做""内网渗透怎么学" "信息泄露漏洞怎么挖""越权漏洞怎么测试""逻辑漏洞挖掘技巧" "简历怎么写才能进安全公司""安全行业面试题有哪些" "Burp Suite怎么用""DVWA怎么安装""Pikachu靶场搭建" "Vulhub漏洞复现""网络安全法有什么规定""CTF夺旗赛怎么参加" "AWD比赛是什么""应急响应怎么做""攻击溯源怎么搞" "数据安全怎么保障""公有云安全怎么防护""私有云攻防怎么做" "云原生安全是什么"。

↓ 80.5K★ 16user_d2cc4baf
人人都能成为黑客v2.0(Lvan)IT Ops & Security

Unified Web penetration testing and SRC vulnerability hunting Skill. Model-driven threat modeling (12 dimensions), JSON 字段规范 state persistence, SRC/补天 compliant reporting with confirmed gate (3-layer determination). Use when user asks for authorized penetration testing, vulnerability assessment, SRC hunting (补天/Butian/vendor SRC/CNVD/众测), bug bounty, security evaluation with explicit target URL, or wants operational Recon→PoC→Report workflow. Do NOT use for CTF challenges, unauthorized testing, mobile app testing, infrastructure scanning, or social engineering.

↓ 56.8K★ 37user_a730098d
skill-vetterIT Ops & Security

Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.

↓ 54.0K★ -user_814dbe54

Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.