Skip to content

Commit 95c856a

Browse files
authored
docs: refresh README, contributing guide, and wiki accuracy (#81)
* docs(repo): refresh docs and wiki alignment * fix(feed): align frontend advisory URL with canonical endpoint
1 parent fefecaa commit 95c856a

18 files changed

Lines changed: 176 additions & 81 deletions

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ ClawSec combines a Vite + React frontend with security skill packages and releas
55
- Frontend entrypoints: `index.tsx`, `App.tsx`
66
- UI and routes: `components/`, `pages/`
77
- Shared types/constants: `types.ts`, `constants.ts`
8+
- Wiki source docs: `wiki/` (synced to GitHub Wiki by `.github/workflows/wiki-sync.yml`)
9+
- Generated wiki exports: `public/wiki/` (`llms.txt` outputs; generated locally/CI and gitignored)
810
- Skills: `skills/<skill-name>/` (`skill.json`, `SKILL.md`, optional `scripts/`, `test/`)
911
- Advisory feed: `advisories/feed.json`, `advisories/feed.json.sig`
1012
- Automation: `scripts/`, `.github/workflows/`
@@ -15,7 +17,9 @@ ClawSec combines a Vite + React frontend with security skill packages and releas
1517
- `npm run dev`: run local Vite server.
1618
- `npm run build`: create production build (CI gate).
1719
- `npm run preview`: preview built app.
20+
- `npm run gen:wiki-llms`: generate wiki `llms.txt` exports from `wiki/` into `public/wiki/`.
1821
- `./scripts/prepare-to-push.sh [--fix]`: run lint, types, build, and security checks.
22+
- `./scripts/populate-local-wiki.sh`: regenerate local wiki `llms.txt` exports for preview.
1923
- `npx eslint . --ext .ts,.tsx,.js,.jsx,.mjs --max-warnings 0`: lint JS/TS.
2024
- `npx tsc --noEmit`: type-check TypeScript.
2125
- `node skills/clawsec-suite/test/feed_verification.test.mjs`: run a skill-local Node test.
@@ -31,6 +35,7 @@ ClawSec combines a Vite + React frontend with security skill packages and releas
3135
There is no root `npm test`; tests are mostly skill-local.
3236
- Run changed tests directly: `node skills/<skill>/test/<name>.test.mjs`.
3337
- For frontend/config changes, run ESLint, `npx tsc --noEmit`, and `npm run build`.
38+
- For wiki rendering/export changes, run `npm run gen:wiki-llms` and `npm run build`.
3439
- For Python utility updates, run `ruff check utils/` and `bandit -r utils/ -ll`.
3540

3641
## Pull Request Guidelines
@@ -39,6 +44,7 @@ There is no root `npm test`; tests are mostly skill-local.
3944
- Keep PRs focused and include summary, security benefit, and testing performed.
4045
- Keep versions aligned between `skills/<skill>/skill.json` and `skills/<skill>/SKILL.md`.
4146
- Do not push release tags from PR branches; releases are tagged from `main`.
47+
- Do not commit generated `public/wiki/` artifacts; edit `wiki/` source files instead.
4248

4349
## Agent Collaboration & Git Safety
4450
- Delete unused or obsolete files only when your changes make them irrelevant; revert files only when the change is yours or explicitly requested. If a git operation creates uncertainty about another agent’s in-flight work, stop and coordinate instead of deleting.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ Wait for a verified patched version.
654654

655655
Once your advisory is published:
656656

657-
1. **Agents receive it** - The feed is served from raw GitHub, so agents see it on their next feed check
657+
1. **Agents receive it** - The feed is served at `https://clawsec.prompt.security/advisories/feed.json` (with signature/checksum artifacts), so agents see it on their next feed check
658658
2. **You're credited** - Your issue is linked in the advisory
659659
3. **Community is protected** - Agents using ClawSec Feed will be alerted
660660

README.md

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<div align="center">
88

9-
## Secure Your OpenClaw Bots with a Complete Security Skill Suite
9+
## Secure Your OpenClaw and NanoClaw Agents with a Complete Security Skill Suite
1010

1111
<h4>Brought to you by <a href="https://prompt.security">Prompt Security</a>, the Platform for AI Security</h4>
1212

@@ -37,7 +37,7 @@ ClawSec is a **complete security skill suite for AI agent platforms**. It provid
3737

3838
### Supported Platforms
3939

40-
- **OpenClaw** (Moltbot, Clawdbot, and clones) - Full suite with skill installer, file integrity protection, and security audits
40+
- **OpenClaw** (MoltBot, Clawdbot, and clones) - Full suite with skill installer, file integrity protection, and security audits
4141
- **NanoClaw** - Containerized WhatsApp bot security with MCP tools for advisory monitoring, signature verification, and file integrity
4242

4343
### Core Capabilities
@@ -74,21 +74,25 @@ Direct link: [soul-guardian-demo.mp4](public/video/soul-guardian-demo.mp4)
7474
### For AI Agents
7575

7676
```bash
77-
# Fetch and install the ClawSec security suite
78-
curl -sL https://clawsec.prompt.security/releases/latest/download/SKILL.md
77+
# Install the ClawSec security suite
78+
npx clawhub@latest install clawsec-suite
7979
```
8080

81-
The skill file contains deployment instructions. Your agent will:
82-
1. Detect its agent family (OpenClaw/MoltBot/ClawdBot or other)
83-
2. Install appropriate skills from the catalog
84-
3. Verify integrity using checksums
85-
4. Set up cron update checks
81+
After install, the suite can:
82+
1. Discover installable protections from the published skills catalog
83+
2. Verify release integrity using signed checksums
84+
3. Set up advisory monitoring and hook-based protection flows
85+
4. Add optional scheduled checks
86+
87+
Manual/source-first option:
88+
89+
> Read https://github.com/prompt-security/clawsec/releases/latest/download/SKILL.md and follow the installation instructions.
8690
8791
### For Humans
8892

8993
Copy this instruction to your AI agent:
9094

91-
> Read https://clawsec.prompt.security/releases/latest/download/SKILL.md and follow the instructions to install the protection skill suite.
95+
> Install ClawSec with `npx clawhub@latest install clawsec-suite`, then complete the setup steps from the generated instructions.
9296
9397
### Shell and OS Notes
9498

@@ -160,13 +164,13 @@ The **clawsec-suite** is a skill-of-skills manager that installs, verifies, and
160164
| Skill | Description | Installation | Compatibility |
161165
|-------|-------------|--------------|---------------|
162166
| 📡 **clawsec-feed** | Security advisory feed monitoring with live CVE updates | ✅ Included by default | All agents |
163-
| 🔭 **openclaw-audit-watchdog** | Automated daily audits with email reporting | ⚙️ Optional (install separately) | OpenClaw/MoltBot/ClawdBot |
167+
| 🔭 **openclaw-audit-watchdog** | Automated daily audits with email reporting | ⚙️ Optional (install separately) | OpenClaw/MoltBot/Clawdbot |
164168
| 👻 **soul-guardian** | Drift detection and file integrity guard with auto-restore | ⚙️ Optional | All agents |
165169
| 🤝 **clawtributor** | Community incident reporting | ❌ Optional (Explicit request) | All agents |
166170

167171
> ⚠️ **clawtributor** is not installed by default as it may share anonymized incident data. Install only on explicit user request.
168172
169-
> ⚠️ **openclaw-audit-watchdog** is tailored for the OpenClaw/MoltBot/ClawdBot agent family. Other agents receive the universal skill set.
173+
> ⚠️ **openclaw-audit-watchdog** is tailored for the OpenClaw/MoltBot/Clawdbot agent family. Other agents receive the universal skill set.
170174
171175
### Suite Features
172176

@@ -188,6 +192,9 @@ ClawSec maintains a continuously updated security advisory feed, automatically p
188192
curl -s https://clawsec.prompt.security/advisories/feed.json | jq '.advisories[] | select(.severity == "critical" or .severity == "high")'
189193
```
190194

195+
Canonical endpoint: `https://clawsec.prompt.security/advisories/feed.json`
196+
Compatibility mirror (legacy): `https://clawsec.prompt.security/releases/latest/download/feed.json`
197+
191198
### Monitored Keywords
192199

193200
The feed polls CVEs related to:
@@ -233,7 +240,7 @@ The feed polls CVEs related to:
233240
```
234241

235242
**Platform values:**
236-
- `"openclaw"` - OpenClaw/ClawdBot/MoltBot only
243+
- `"openclaw"` - OpenClaw/Clawdbot/MoltBot only
237244
- `"nanoclaw"` - NanoClaw only
238245
- `["openclaw", "nanoclaw"]` - Both platforms
239246
- (empty/missing) - All platforms (backward compatible)
@@ -248,10 +255,13 @@ ClawSec uses automated pipelines for continuous security updates and skill distr
248255

249256
| Workflow | Trigger | Description |
250257
|----------|---------|-------------|
258+
| **ci.yml** | PRs to `main`, pushes to `main` | Lint/type/build + skill test suites |
259+
| **pages-verify.yml** | PRs to `main` | Verifies Pages build and signing outputs without publishing |
251260
| **poll-nvd-cves.yml** | Daily cron (06:00 UTC) | Polls NVD for new CVEs, updates feed |
252261
| **community-advisory.yml** | Issue labeled `advisory-approved` | Processes community reports into advisories |
253-
| **skill-release.yml** | `<skill>-v*.*.*` tags | Packages individual skills with checksums to GitHub Releases |
254-
| **deploy-pages.yml** | Push to main | Builds and deploys the web interface to GitHub Pages |
262+
| **skill-release.yml** | Skill tags + metadata PR changes | Validates version parity in PRs and publishes signed skill releases on tags |
263+
| **deploy-pages.yml** | `workflow_run` after successful trusted CI/release or manual dispatch | Builds and deploys the web interface to GitHub Pages |
264+
| **wiki-sync.yml** | Pushes to `main` touching `wiki/**` | Syncs `wiki/` to the GitHub Wiki mirror |
255265

256266
### Skill Release Pipeline
257267

@@ -262,7 +272,7 @@ When a skill is tagged (e.g., `soul-guardian-v1.0.0`), the pipeline:
262272
3. **Generates Checksums** - Creates `checksums.json` with SHA256 hashes for all SBOM files
263273
4. **Signs + verifies** - Signs `checksums.json` and validates the generated `signing-public.pem` fingerprint against canonical repo key material
264274
5. **Releases** - Publishes to GitHub Releases with all artifacts
265-
6. **Supersedes Old Releases** - Marks older versions (same major) as pre-releases
275+
6. **Supersedes Old Releases** - Deletes older versions within the same major line (tags remain)
266276
7. **Triggers Pages Update** - Refreshes the skills catalog on the website
267277

268278
### Signing Key Consistency Guardrails
@@ -378,8 +388,15 @@ npm run dev
378388

379389
# Generate wiki llms exports from wiki/ (for local preview)
380390
./scripts/populate-local-wiki.sh
391+
392+
# Direct generator entrypoint (used by predev/prebuild)
393+
npm run gen:wiki-llms
381394
```
382395

396+
Notes:
397+
- `npm run dev` and `npm run build` automatically regenerate wiki `llms.txt` exports (`predev`/`prebuild` hooks).
398+
- `public/wiki/` is generated output (local + CI) and is intentionally gitignored.
399+
383400
### Build
384401

385402
```bash
@@ -395,25 +412,34 @@ npm run build
395412
│ └── feed.json # Main advisory feed (auto-updated from NVD)
396413
├── components/ # React components
397414
├── pages/ # Page components
415+
├── wiki/ # Source-of-truth docs (synced to GitHub Wiki)
398416
├── scripts/
417+
│ ├── generate-wiki-llms.mjs # wiki/*.md -> public/wiki/**/llms.txt
399418
│ ├── populate-local-feed.sh # Local CVE feed populator
400419
│ ├── populate-local-skills.sh # Local skills catalog populator
401420
│ ├── populate-local-wiki.sh # Local wiki llms export populator
402421
│ └── release-skill.sh # Manual skill release helper
403422
├── skills/
404423
│ ├── clawsec-suite/ # 📦 Suite installer (skill-of-skills)
405424
│ ├── clawsec-feed/ # 📡 Advisory feed skill
425+
│ ├── clawsec-nanoclaw/ # 📱 NanoClaw platform security suite
426+
│ ├── clawsec-clawhub-checker/ # 🧪 ClawHub reputation checks
406427
│ ├── clawtributor/ # 🤝 Community reporting skill
407428
│ ├── openclaw-audit-watchdog/ # 🔭 Automated audit skill
429+
│ ├── prompt-agent/ # 🧠 Prompt-focused protection workflows
408430
│ └── soul-guardian/ # 👻 File integrity skill
409431
├── utils/
410432
│ ├── package_skill.py # Skill packager utility
411433
│ └── validate_skill.py # Skill validator utility
412434
├── .github/workflows/
435+
│ ├── ci.yml # Cross-platform lint/type/build + tests
436+
│ ├── pages-verify.yml # PR-only pages build verification
413437
│ ├── poll-nvd-cves.yml # CVE polling pipeline
438+
│ ├── community-advisory.yml # Approved issue -> advisory PR
414439
│ ├── skill-release.yml # Skill release pipeline
440+
│ ├── wiki-sync.yml # Sync repo wiki/ to GitHub Wiki
415441
│ └── deploy-pages.yml # Pages deployment
416-
└── public/ # Static assets and published skills
442+
└── public/ # Static assets + generated publish artifacts
417443
```
418444

419445
---
@@ -445,6 +471,10 @@ See [CONTRIBUTING.md](CONTRIBUTING.md#submitting-security-advisories) for detail
445471

446472
For all wiki content, edit files under `wiki/` in this repository. The GitHub Wiki (`<repo>.wiki.git`) is synced from `wiki/` by `.github/workflows/wiki-sync.yml` when `wiki/**` changes on `main`.
447473

474+
LLM exports are generated from `wiki/` into `public/wiki/`:
475+
- `/wiki/llms.txt` is the LLM-ready export for `wiki/INDEX.md` (or a generated fallback index if `INDEX.md` is missing).
476+
- `/wiki/<page>/llms.txt` is the LLM-ready export for that single wiki page.
477+
448478
---
449479

450480
## 📄 License

constants.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

2-
// Feed URL for fetching live advisories
3-
export const ADVISORY_FEED_URL = 'https://clawsec.prompt.security/releases/latest/download/feed.json';
2+
// Canonical hosted feed endpoint for fetching live advisories
3+
export const ADVISORY_FEED_URL = 'https://clawsec.prompt.security/advisories/feed.json';
4+
5+
// Compatibility mirror for legacy clients; keep as last-resort fallback only
6+
export const LEGACY_ADVISORY_FEED_URL = 'https://clawsec.prompt.security/releases/latest/download/feed.json';
47

58
// Local feed path for development
69
export const LOCAL_FEED_PATH = '/advisories/feed.json';
7-

pages/AdvisoryDetail.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import { useParams, Link } from 'react-router-dom';
33
import { ArrowLeft, ExternalLink, Shield, AlertTriangle, Github, User, Bot } from 'lucide-react';
44
import { Footer } from '../components/Footer';
55
import { Advisory, AdvisoryFeed } from '../types';
6-
import { ADVISORY_FEED_URL, LOCAL_FEED_PATH } from '../constants';
6+
import {
7+
ADVISORY_FEED_URL,
8+
LEGACY_ADVISORY_FEED_URL,
9+
LOCAL_FEED_PATH,
10+
} from '../constants';
711

812
export const AdvisoryDetail: React.FC = () => {
913
const { advisoryId } = useParams<{ advisoryId: string }>();
@@ -16,13 +20,17 @@ export const AdvisoryDetail: React.FC = () => {
1620
if (!advisoryId) return;
1721

1822
try {
19-
// Try local feed first (for development), then fall back to GitHub releases
23+
// Try local feed first (dev), then canonical hosted endpoint, then legacy mirror.
2024
let response = await fetch(LOCAL_FEED_PATH);
2125

2226
if (!response.ok) {
2327
response = await fetch(ADVISORY_FEED_URL);
2428
}
2529

30+
if (!response.ok) {
31+
response = await fetch(LEGACY_ADVISORY_FEED_URL);
32+
}
33+
2634
if (!response.ok) {
2735
throw new Error(`Failed to fetch feed: ${response.status}`);
2836
}

pages/FeedSetup.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import { Link } from 'react-router-dom';
44
import { Footer } from '../components/Footer';
55
import { AdvisoryCard } from '../components/AdvisoryCard';
66
import { Advisory, AdvisoryFeed } from '../types';
7-
import { ADVISORY_FEED_URL, LOCAL_FEED_PATH } from '../constants';
7+
import {
8+
ADVISORY_FEED_URL,
9+
LEGACY_ADVISORY_FEED_URL,
10+
LOCAL_FEED_PATH,
11+
} from '../constants';
812

913
const ITEMS_PER_PAGE = 9;
1014

@@ -21,13 +25,17 @@ export const FeedSetup: React.FC = () => {
2125
setError(null);
2226

2327
try {
24-
// Try local feed first (for development), then fall back to GitHub releases
28+
// Try local feed first (dev), then canonical hosted endpoint, then legacy mirror.
2529
let response = await fetch(LOCAL_FEED_PATH);
26-
30+
2731
if (!response.ok) {
2832
response = await fetch(ADVISORY_FEED_URL);
2933
}
3034

35+
if (!response.ok) {
36+
response = await fetch(LEGACY_ADVISORY_FEED_URL);
37+
}
38+
3139
if (!response.ok) {
3240
throw new Error(`Failed to fetch feed: ${response.status}`);
3341
}

wiki/architecture.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ flowchart TD
8181
<Route path="/skills/:skillId" element={<SkillDetail />} />
8282
<Route path="/feed" element={<FeedSetup />} />
8383
<Route path="/feed/:advisoryId" element={<AdvisoryDetail />} />
84+
<Route path="/wiki/*" element={<WikiBrowser />} />
8485
</Routes>
8586
```
8687

@@ -102,7 +103,7 @@ const remoteFeed = await loadRemoteFeed(feedUrl, {
102103
| --- | --- | --- |
103104
| Vite app (`npm run dev`) | Local frontend server | Interactive web app for feed/skills. |
104105
| GitHub CI | Multi-OS matrix + dedicated jobs | Lint/type/build/security and test confidence. |
105-
| Skill release workflow | Tag-driven | Release assets, signed checksums, optional ClawHub publish. |
106+
| Skill release workflow | Tag-driven publish + PR dry-run checks | Release assets, signed checksums, optional ClawHub publish. |
106107
| Pages deploy workflow | Triggered by CI/Release success | Static site + mirrored advisories/releases. |
107108
| Runtime hooks | OpenClaw event hooks / NanoClaw IPC | Advisory alerts, gating decisions, integrity checks. |
108109

@@ -117,6 +118,7 @@ const remoteFeed = await loadRemoteFeed(feedUrl, {
117118
- pages/SkillsCatalog.tsx
118119
- pages/FeedSetup.tsx
119120
- pages/AdvisoryDetail.tsx
121+
- pages/WikiBrowser.tsx
120122
- skills/clawsec-suite/hooks/clawsec-advisory-guardian/handler.ts
121123
- skills/clawsec-suite/hooks/clawsec-advisory-guardian/lib/feed.mjs
122124
- skills/clawsec-suite/scripts/guarded_skill_install.mjs

wiki/data-flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
2. JSON transform logic normalizes severity/type/affected fields and deduplicates by advisory ID.
1212
3. Signature/checksum steps generate detached signatures and checksum manifests.
1313
4. Deploy workflow mirrors signed artifacts under `public/` and `public/releases/latest/download/`.
14-
5. UI and runtime consumers fetch feed/index files and validate format/signatures before use.
14+
5. UI consumers validate JSON shape/content; runtime consumers additionally verify signatures/checksums before trusting feed data.
1515
6. Matchers compare `affected` specifiers to skill names/versions and emit alerts or enforce confirmation.
1616

1717
## Inputs and Outputs

wiki/dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| Layer | Primary Dependencies | Why It Exists |
55
| --- | --- | --- |
66
| Frontend runtime | `react`, `react-dom`, `react-router-dom`, `lucide-react` | UI rendering, routing, iconography. |
7-
| Markdown rendering | `react-markdown`, `remark-gfm` | Render skill docs/readmes in detail pages. |
7+
| Markdown rendering | `react-markdown`, `remark-gfm` | Render skill docs/readmes and in-app wiki markdown pages. |
88
| Build tooling | `vite`, `@vitejs/plugin-react`, `typescript` | Fast TS/TSX bundling and production builds. |
99
| Python utilities | stdlib + `ruff`/`bandit` policy from `pyproject.toml` | Validate/package skills and run static checks. |
1010
| Shell automation | `bash`, `jq`, `curl`, `openssl`, `sha256sum`/`shasum` | Feed polling, signing, checksum generation, release checks. |
@@ -45,7 +45,7 @@
4545
| Ruff | `ruff check utils/` | Python style and bug pattern checks. |
4646
| Bandit | `bandit -r utils/ -ll` | Python security checks. |
4747
| Trivy | Workflow + optional local run | FS/config vulnerability scans. |
48-
| Gitleaks | Workflow + optional local run | Secret leak detection. |
48+
| Gitleaks | `scripts/prepare-to-push.sh` optional local run | Secret leak detection before push. |
4949

5050
## Example Snippets
5151
```json

0 commit comments

Comments
 (0)