Metadata-Version: 2.4
Name: clawaudit
Version: 0.2.0a6
Summary: OpenClaw security audit tool
Author-email: Shuai Yang <yannis.pku@gmail.com>
License: Proprietary
Requires-Python: >=3.9
Requires-Dist: click>=8.0
Requires-Dist: packaging>=21.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: requests>=2.28
Requires-Dist: rich>=13.0
Description-Content-Type: text/markdown

# Foresight ClawAudit

Security audit tool for OpenClaw instances. Scans runtime configuration, system environment, Skill plugins, supply chain integrity, and known CVEs — covering 31 check points across 8 categories.

## What OpenClaw Leaves on Your System

| Type | Path | Content |
|------|------|---------|
| Main config | `~/.openclaw/` | `openclaw.json`, API keys, workspace, memory |
| Workspace | `~/.openclaw/workspace/` | Files the AI operated on, Skill plugin code |
| Memory | `~/.openclaw/memory/` | SQLite + Markdown memory data |
| Agent auth | `~/.openclaw/agents/*/agent/auth-profiles.json` | OAuth tokens, third-party authorizations |
| Logs | `~/.openclaw/logs/` | Gateway runtime logs |
| Legacy dirs | `~/.clawdbot/`, `~/.moltbot/`, `~/.molthub/` | Pre-rename configs (Clawdbot -> Moltbot -> OpenClaw) |
| System service | LaunchAgent (macOS) / systemd (Linux) | Gateway daemon on `127.0.0.1:18789`, runs 24/7 |
| Exec approvals | `~/.openclaw/exec-approvals.json` | Shell command allowlist |

Foresight ClawAudit helps you identify security risks across all of these.

## Quick Start

```bash
# Install uv if not already installed (https://docs.astral.sh/uv/)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Run directly without install Foresight ClawAudit
uvx clawaudit scan --mode local
```

## Platform Requirements

- **Linux / macOS**: Supported natively
- **Windows**: Must run under WSL. Native Windows is not supported

## Installation

```bash
pip install clawaudit
# or
uv pip install clawaudit
```

## Usage

```bash
# Local scan (auto-detect OpenClaw path)
clawaudit scan --mode local
clawaudit scan --mode local --path ~/.openclaw

# Filter by category or check
clawaudit scan --mode local --category NET,AUTH

# Output: terminal (default) / json / sarif / markdown
clawaudit scan --mode local --format json -o report.json

# CVE database
clawaudit cvedb update
clawaudit cvedb list
```

Root is not required. Checks needing elevated privileges will SKIP with a reason. Exit codes: `0` = all pass, `1` = has FAIL, `2` = has CRITICAL.

## Check Categories

| Code | Category | Checks | Summary |
|------|----------|--------|---------|
| NET | Network Exposure | 4 | Port binding, TLS, IOC |
| AUTH | Authentication | 2 | Weak token, UI bypass |
| CONF | Configuration | 4 | Permissions, flags, baseline |
| EXEC | Execution Sandbox | 8 | Injection, sandbox, prompt |
| SC | Supply Chain | 3 | Source, integrity, poisoning |
| DATA | Data Security | 4 | Keys, leakage, exfiltration |
| SYS | System Security | 6 | Privileges, cron, SSH |
| CVE | Known Vulnerabilities | Dynamic | Version matching (271 advisories) |

## License

Proprietary. For personal and internal use only. Redistribution and modification are not permitted.

## About

Developed by [Beijing Institute of AI Safety and Governance (Beijing-AISI)](https://beijing-aisi.ac.cn). Beijing-AISI focuses on safe development, safety and security assessment, and governance of AI.

## Contact

- Email: contact@beijing-aisi.ac.cn
- Website: https://beijing-aisi.ac.cn
