安全扫描
OpenClaw
可疑
medium confidenceThe skill mostly matches its stated PostgreSQL purpose, but there are metadata/instruction mismatches and a few implementation notes you should review before installing (credentials, backups, and required client tools).
评估建议
This skill appears to implement the PostgreSQL features it claims, but before installing: (1) note the registry metadata omits required PG environment variables — the scripts expect PGHOST/PGPORT/PGDATABASE/PGUSER/PGPASSWORD, so supply only a least-privileged DB user. (2) Ensure pg_dump/pg_restore and psycopg2 are installed on the host; the scripts use subprocess to call pg_dump and will fail if absent. (3) Backups are written to disk (backup_dir) — verify the directory, permissions, and retenti...详细分析 ▾
ℹ 用途与能力
The name/description, SKILL.md and included scripts all align with PostgreSQL tasks (query execution, schema export, backup/restore). However the registry metadata lists no required environment variables while the SKILL.md and scripts clearly expect PGHOST/PGPORT/PGDATABASE/PGUSER/PGPASSWORD — an inconsistency that should be resolved.
ℹ 指令范围
Runtime instructions are scoped to database operations and reference running the included Python scripts and PostgreSQL tools (pg_dump/pg_restore). The scripts read environment variables, write backup files to disk, and execute SQL — they do not call external network endpoints or exfiltrate data. One small mismatch: SKILL.md mentions 'performance monitoring' but there is no dedicated monitoring script; monitoring would be performed via queries (EXPLAIN, pg_stat_*), which is supported via query.py but not separately implemented.
✓ 安装机制
No install spec is provided (instruction-only install), so nothing is downloaded or written by an installer. The package includes Python scripts; risk comes from executing them, but there is no remote install URL or archive to fetch.
ℹ 凭证需求
The scripts legitimately require database connection credentials (PG* env vars). That access is proportionate to the stated purpose. The concern is the metadata omission of these env vars (metadata declares none), and the fact that PGPASSWORD is sensitive — you should only provide least-privilege credentials and verify where backups are stored and who can access them.
✓ 持久化与权限
The skill is not force-included (always: false) and does not request persistent system privileges or change other skills' configuration. Autonomous invocation is allowed (platform default) but not combined here with other red flags.
安装前注意事项
- note the registry metadata omits required PG environment variables — the scripts expect PGHOST/PGPORT/PGDATABASE/PGUSER/PGPASSWORD, so supply only a least-privileged DB user. (
- Ensure pg_dump/pg_restore and psycopg2 are installed on the host; the scripts use subprocess to call pg_dump and will fail if absent. (
- Backups are written to disk (backup_dir) — verify the directory, permissions, and retention policy so backups are not exposed. (
- Review the scripts yourself if you don't fully trust the source: they execute arbitrary SQL and run pg_restore/pg_dump, which can modify or drop data when run with sufficient privileges. (
- If you plan to allow the agent to invoke autonomously, restrict credentials and consider creating a dedicated read/backup role (avoid superuser) to limit blast radius.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.0.02026/2/28
Initial release: PostgreSQL database operations including query execution, schema export, and backup functionality
● 可疑
安装命令 点击复制
官方npx clawhub@latest install postgres-db
镜像加速npx clawhub@latest install postgres-db --registry https://cn.clawhub-mirror.com
技能文档
Overview
This skill provides comprehensive PostgreSQL database operations including query execution, schema management, backup/restore, and performance monitoring.
Capabilities
1. SQL Query Execution (scripts/query.py)
Execute SQL queries against PostgreSQL databases with support for:
- SELECT queries with result formatting
- INSERT/UPDATE/DELETE operations
- Transaction support
- Query result export (JSON, CSV)
2. Schema Export (scripts/schema_export.py)
Export database schema information:
- Table structures (columns, types, constraints)
- Indexes and foreign keys
- Views and triggers
- Export to JSON/Markdown format
3. Database Backup (scripts/backup.py)
Database backup and restore operations:
- Full database backup using pg_dump
- Table-specific backup
- Point-in-time recovery support
- Backup rotation management
4. Performance Monitoring
Monitor database performance:- Query execution plans (EXPLAIN ANALYZE)
- Index usage statistics
- Table size and row counts
- Connection pool status
Usage
Query Database
python scripts/query.py --dbname mydb --query "SELECT * FROM users LIMIT 10"
Export Schema
python scripts/schema_export.py --dbname mydb --output schema.json
Backup Database
python scripts/backup.py --dbname mydb --backup-dir /backups
Requirements
- PostgreSQL client tools (psql, pg_dump)
- Python 3.7+
- psycopg2 or asyncpg library
Configuration
Set environment variables:
PGHOST- Database hostPGPORT- Database port (default: 5432)PGDATABASE- Database namePGUSER- Database userPGPASSWORD- Database password
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制