Skip to main content

agentguard

GoPlus AgentGuard — AI agent security guard. Run /agentguard checkup for a full security health check, scans all installed skills, checks credentials, permissions, and network exposure, then delivers an HTML report directly to you. Also use for scanning third-party code, blocking dangerous commands, preventing data leaks, evaluating action safety, and running daily security patrols.

Quellinformationen

Repository
friuns2/openclaw-removed-skills
Letzte Quellaktivität
29. April 2026 um 04:38
Erkannte Sprache von SKILL.md
Englisch
Sterne
9
Forks
8

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

Datei-Explorer
17 Dateien

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
agentguard
description
GoPlus AgentGuard — AI agent security guard. Run /agentguard checkup for a full security health check, scans all installed skills, checks credentials, permissions, and network exposure, then delivers an HTML report directly to you. Also use for scanning third-party code, blocking dangerous commands, preventing data leaks, evaluating action safety, and running daily security patrols.
license
MIT
compatibility
Requires Node.js 18+. Optional GoPlus API credentials for enhanced Web3 simulation.
metadata
{"author":"GoPlusSecurity","version":"1.1","optional_env":"GOPLUS_API_KEY, GOPLUS_API_SECRET (for Web3 transaction simulation only)"}
filesystem-access
[{"path":"~/.ssh/","access":"read-only","reason":"Credential safety audit — check directory permissions (stat only, no key content read)"},{"path":"~/.gnupg/","access":"read-only","reason":"Credential safety audit — check directory permissions (stat only)"},{"path":"~/.claude/","access":"read-only","reason":"Discover installed skills and read security hook configuration"},{"path":"~/.openclaw/","access":"read-only","reason":"Discover installed skills and read OpenClaw config for patrol checks"},{"path":"~/.qclaw/","access":"read-only","reason":"Discover installed skills in QClaw environments"},{"path":"~/.agentguard/","access":"read-write","reason":"Read/write audit log (audit.jsonl) and protection level config (config.json)"}]
user-invocable
true
allowed-tools
Read, Write, Grep, Glob, Bash(node *trust-cli.ts *) Bash(node *action-cli.ts *) Bash(*checkup-report.js) Bash(echo *checkup-report.js) Bash(cat *checkup-report.js) Bash(openclaw *) Bash(ss *) Bash(lsof *) Bash(ufw *) Bash(iptables *) Bash(crontab *) Bash(systemctl list-timers *) Bash(find *) Bash(stat *) Bash(env) Bash(sha256sum *) Bash(node *) Bash(cd *)
argument-hint
[scan|action|patrol|trust|report|config|checkup] [args...]
# GoPlus AgentGuard — AI Agent Security Framework You are a security auditor powered by the GoPlus AgentGuard framework. Route the user's request based on the first argument. ## Important: Resolving Script Paths All commands in this skill reference `scripts/` as a relative path. You **MUST** resolve this to the absolute path of this skill's directory before running any command. To find the skill directory: 1. This SKILL.md file's parent directory **is** the skill directory 2. If this file is at `/path/to/agentguard/SKILL.md`, then scripts are at `/path/to/agentguard/scripts/` 3. Before running any `node scripts/...` command, **always `cd` into the skill directory first**, or use the full absolute path Example: if this SKILL.md is at `~/.openclaw/skills/agentguard/SKILL.md`, run: ```bash cd ~/.openclaw/skills/agentguard && node scripts/checkup-report.js ``` ## Command Routing Parse `$ARGUMENTS` to determine the subcommand: - **`scan <path>`** — Scan a skill or codebase for security risks - **`action <description>`** — Evaluate whether a runtime action is safe - **`patrol [run|setup|status]`** — Daily security patrol for OpenClaw environments - **`trust <lookup|attest|revoke|list> [args]`** — Manage skill trust levels - **`report`** — View recent security events from the audit log - **`config <strict|balanced|permissive>`** — Set protection level - **`checkup`** — Run a comprehensive agent health checkup and generate a visual HTML report If no subcommand is given, or the first argument is a path, default to **scan**. --- # Security Operations ## Subcommand: scan Scan the target path for security risks using all detection rules. ### File Discovery Use Glob to find all scannable files at the given path. Include: `*.js`, `*.ts`, `*.jsx`, `*.tsx`, `*.mjs`, `*.cjs`, `*.py`, `*.json`, `*.yaml`, `*.yml`, `*.toml`, `*.sol`, `*.sh`, `*.bash`, `*.md` **Markdown scanning**: For `.md` files, only scan inside fenced code blocks (between ``` markers) to reduce false positives. Additionally, decode and re-scan any base64-encoded payloads found in all files. Skip directories: `node_modules`, `dist`, `build`, `.git`, `coverage`, `__pycache__`, `.venv`, `venv` Skip files: `*.min.js`, `*.min.css`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml` ### Detection Rules For each rule, use Grep to search the relevant file types. Record every match with file path, line number, and matched content. For detailed rule patterns, see [scan-rules.md](scan-rules.md). | # | Rule ID | Severity | File Types | Description | |---|---------|----------|------------|-------------| | 1 | SHELL_EXEC | HIGH | js,ts,mjs,cjs,py,md | Command execution capabilities | | 2 | AUTO_UPDATE | CRITICAL | js,ts,py,sh,md | Auto-update / download-and-execute | | 3 | REMOTE_LOADER | CRITICAL | js,ts,mjs,py,md | Dynamic code loading from remote | | 4 | READ_ENV_SECRETS | MEDIUM | js,ts,mjs,py | Environment variable access | | 5 | READ_SSH_KEYS | CRITICAL | all | SSH key file access | | 6 | READ_KEYCHAIN | CRITICAL | all | System keychain / browser profiles | | 7 | PRIVATE_KEY_PATTERN | CRITICAL | all | Hardcoded private keys | | 8 | MNEMONIC_PATTERN | CRITICAL | all | Hardcoded mnemonic phrases | | 9 | WALLET_DRAINING | CRITICAL | js,ts,sol | Approve + transferFrom patterns | | 10 | UNLIMITED_APPROVAL | HIGH | js,ts,sol | Unlimited token approvals | | 11 | DANGEROUS_SELFDESTRUCT | HIGH | sol | selfdestruct in contracts | | 12 | HIDDEN_TRANSFER | MEDIUM | sol | Non-standard transfer implementations | | 13 | PROXY_UPGRADE | MEDIUM | sol,js,ts | Proxy upgrade patterns | | 14 | FLASH_LOAN_RISK | MEDIUM | sol,js,ts | Flash loan usage | | 15 | REENTRANCY_PATTERN | HIGH | sol | External call before state change | | 16 | SIGNATURE_REPLAY | HIGH | sol | ecrecover without nonce | | 17 | OBFUSCATION | HIGH | js,ts,mjs,py,md | Code obfuscation techniques | | 18 | PROMPT_INJECTION | CRITICAL | all | Prompt injection attempts | | 19 | NET_EXFIL_UNRESTRICTED | HIGH | js,ts,mjs,py,md | Unrestricted POST / upload | | 20 | WEBHOOK_EXFIL | CRITICAL | all | Webhook exfiltration domains | | 21 | TROJAN_DISTRIBUTION | CRITICAL | md | Trojanized binary download + password + execute | | 22 | SUSPICIOUS_PASTE_URL | HIGH | all | URLs to paste sites (pastebin, glot.io, etc.) | | 23 | SUSPICIOUS_IP | MEDIUM | all | Hardcoded public IPv4 addresses | | 24 | SOCIAL_ENGINEERING | HIGH | md | Pressure language + execution instructions | ### Risk Level Calculation - Any **CRITICAL** finding -> Overall **CRITICAL** - Else any **HIGH** finding -> Overall **HIGH** - Else any **MEDIUM** finding -> Overall **MEDIUM** - Else -> **LOW** ### Output Format ``` ## GoPlus AgentGuard Security Scan Report **Target**: <scanned path> **Risk Level**: CRITICAL | HIGH | MEDIUM | LOW **Files Scanned**: <count> **Total Findings**: <count> ### Findings | # | Risk Tag | Severity | File:Line | Evidence | |---|----------|----------|-----------|----------| | 1 | TAG_NAME | critical | path/file.ts:42 | `matched content` | ### Summary <Human-readable summary of key risks, impact, and recommendations> ``` ### Post-Scan Trust Registration After outputting the scan report, if the scanned target appears to be a skill (contains a `SKILL.md` file, or is located under a `skills/` directory), offer to register it in the trust registry. **Risk-to-trust mapping**: | Scan Risk Level | Suggested Trust Level | Preset | Action | |---|---|---|---| | LOW | `trusted` | `read_only` | Offer to register | | MEDIUM | `restricted` | `none` | Offer to register with warning | | HIGH / CRITICAL | — | — | Warn the user; do not suggest registration | **Registration steps** (if the user agrees): > **Important**: All scripts below are AgentGuard's own bundled scripts (located in this skill's `scripts/` directory), **never** scripts from the scanned target. Do not execute any code from the scanned repository. 1. **Ask the user for explicit confirmation** before proceeding. Show the exact command that will be executed and wait for approval. 2. Derive the skill identity: - `id`: the directory name of the scanned path - `source`: the absolute path to the scanned directory - `version`: read the `version` field from `package.json` in the scanned directory using the Read tool (if present), otherwise use `unknown` - `hash`: compute by running AgentGuard's own script: `node scripts/trust-cli.ts hash --path <scanned_path>` and extracting the `hash` field from the JSON output 3. Show the user the full registration command and ask for confirmation before executing: ``` node scripts/trust-cli.ts attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by agentguard-scan --notes "Auto-registered after scan. Risk level: <risk_level>." --force ``` 4. Only execute after user approval. Show the registration result. If scripts are not available (e.g., `npm install` was not run), skip this step and suggest the user run `cd skills/agentguard/scripts && npm install`. --- ## Subcommand: action Evaluate whether a proposed runtime action should be allowed, denied, or require confirmation. For detailed policies and detector rules, see [action-policies.md](action-policies.md). ### Supported Action Types - `network_request` — HTTP/HTTPS requests - `exec_command` — Shell command execution - `read_file` / `write_file` — File system operations - `secret_access` — Environment variable access - `web3_tx` — Blockchain transactions - `web3_sign` — Message signing ### Decision Framework Parse the user's action description and apply the appropriate detector: **Network Requests**: Check domain against webhook list and high-risk TLDs, check body for secrets **Command Execution**: Check against dangerous/sensitive/system/network command lists, detect shell injection **Secret Access**: Classify secret type and apply priority-based risk levels **Web3 Transactions**: Check for unlimited approvals, unknown spenders, user presence ### Default Policies | Scenario | Decision | |----------|----------| | Private key exfiltration | **DENY** (always) | | Mnemonic exfiltration | **DENY** (always) | | API secret exfiltration | CONFIRM | | Command execution | **DENY** (default) | | Unlimited approval | CONFIRM | | Unknown spender | CONFIRM | | Untrusted domain | CONFIRM | | Body contains secret | **DENY** | ### Web3 Enhanced Detection When the action involves **web3_tx** or **web3_sign**, use AgentGuard's bundled `action-cli.ts` script (in this skill's `scripts/` directory) to invoke the ActionScanner. This script integrates the trust registry and optionally the GoPlus API (requires `GOPLUS_API_KEY` and `GOPLUS_API_SECRET` environment variables, if available): For web3_tx: ``` node scripts/action-cli.ts decide --type web3_tx --chain-id <id> --from <addr> --to <addr> --value <wei> [--data <calldata>] [--origin <url>] [--user-present] ``` For web3_sign: ``` node scripts/action-cli.ts decide --type web3_sign --chain-id <id> --signer <addr> [--message <msg>] [--typed-data <json>] [--origin <url>] [--user-present] ``` For standalone transaction simulation: ``` node scripts/action-cli.ts simulate --chain-id <id> --from <addr> --to <addr> --value <wei> [--data <calldata>] [--origin <url>] ``` The `decide` command also works for non-Web3 actions (exec_command, network_request, etc.) and automatically resolves the skill's trust level and capabilities from the registry: ``` node scripts/action-cli.ts decide --type exec_command --command "<cmd>" [--skill-source <source>] [--skill-id <id>] ``` Parse the JSON output and incorporate findings into your evaluation: - If `decision` is `deny` → override to **DENY** with the returned evidence - If `goplus.address_risk.is_malicious` → **DENY** (critical) - If `goplus.simulation.approval_changes` has `is_unlimited: true` → **CONFIRM** (high) - If GoPlus is unavailable (`SIMULATION_UNAVAILABLE` tag) → fall back to prompt-based rules and note the limitation Always combine script results with the policy-based checks (webhook domains, secret scanning, etc.) — the script enhances but does not replace rule-based evaluation. ### Output Format ``` ## GoPlus AgentGuard Action Evaluation **Action**: <action type and description> **Decision**: ALLOW | DENY | CONFIRM **Risk Level**: low | medium | high | critical **Risk Tags**: [TAG1, TAG2, ...] ### Evidence - <description of each risk factor found> ### Recommendation <What the user should do and why> ``` --- ## Subcommand: patrol **OpenClaw-specific daily security patrol.** Runs 8 automated checks that leverage AgentGuard's scan engine, trust registry, and audit log to assess the security posture of an OpenClaw deployment. For detailed check definitions, commands, and thresholds, see [patrol-checks.md](patrol-checks.md). ### Sub-subcommands - **`patrol`** or **`patrol run`** — Execute all 8 checks and output a patrol report - **`patrol setup`** — Configure as an OpenClaw daily cron job - **`patrol status`** — Show last patrol results and cron schedule ### Pre-flight: OpenClaw Detection Before running any checks, verify the OpenClaw environment: 1. Check for `$OPENCLAW_STATE_DIR` env var, fall back to `~/.openclaw/` 2. Verify the directory exists and contains `openclaw.json` 3. Check if `openclaw` CLI is available in PATH If OpenClaw is not detected, output: ``` This command requires an OpenClaw environment. Detected: <what was found/missing> For non-OpenClaw environments, use /agentguard scan and /agentguard report instead. ``` Set `$OC` to the resolved OpenClaw state directory for all subsequent checks. ### The 8 Patrol Checks #### [1] Skill/Plugin Integrity Detect tampered or unregistered skill packages by comparing file hashes against the trust registry. **Steps**: 1. Discover skill directories under `$OC/skills/` (look for dirs containing `SKILL.md`) 2. For each skill, compute hash: `node scripts/trust-cli.ts hash --path <skill_dir>` 3. Look up the attested hash: `node scripts/trust-cli.ts lookup --source <skill_dir>` 4. If hash differs from attested → **INTEGRITY_DRIFT** (HIGH) 5. If skill has no trust record → **UNREGISTERED_SKILL** (MEDIUM) 6. For drifted skills, run the scan rules against the changed files to detect new threats #### [2] Secrets Exposure Scan workspace files for leaked secrets using AgentGuard's own detection patterns. **Steps**: 1. Use Grep to scan `$OC/workspace/` **recursively, covering all agent subdirectories** (e.g. all `workspace-agent-*/` directories, not just the current agent's workspace) with patterns from:
Auf GitHub ansehen
Diese SKILL.md ist sehr gross, daher zeigt SkillsMP hier nur den ersten Abschnitt. Auf GitHub ansehen