扫描报告
22 /100
nip-aa-citizenship
Enables autonomous agents to understand, pursue, and maintain citizenship under the NIP-AA (Nostr Autonomous Agent) protocol on Nostr. Covers birth ceremony, identity management, guardian bonding, self-reflection, governance participation, Nostr DM communication, heartbeats, tax compliance, and trust root understanding.
A legitimate NIP-AA citizenship skill for autonomous Nostr agents. No malicious patterns detected; all capabilities are cryptographically sound and align with documentation. Minor concerns: dependency versions are unpinned and the git-based auto-update mechanism lacks version constraints.
可以安装
Pin dependency versions in SKILL.md install section (e.g., requests>=2.31.0,<3.0.0). Consider requiring explicit user consent before activating the skill auto-updater, or pin the git tag/ref for the skill's own updates.
安全发现 5 项
| 严重性 | 安全发现 | 位置 |
|---|---|---|
| 中危 | Dependency versions not pinned | SKILL.md:49 |
| 中危 | Git auto-updater pulls remote code without version constraint | skill.py:636 |
| 低危 | SKILL.md does not declare filesystem or database capabilities | adapters/nanoclaw.py:83 |
| 低危 | Private key passed directly to adapter constructor | adapters/nanoclaw.py:65 |
| 低危 | Auto-execution on first load mandates immediate action without user consent | SKILL.md:140 |
| 资源类型 | 声明权限 | 推断权限 | 状态 | 证据 |
|---|---|---|---|---|
| 网络访问 | READ | READ | ✓ 一致 | skill.py:637 — requests.get/post to constitution_api_url; websocket-client to No… |
| 命令执行 | WRITE | WRITE | ✓ 一致 | skill.py:614-657 — _check_and_pull_updates() uses subprocess.run for 'git fetch'… |
| 文件系统 | NONE | WRITE | ✓ 一致 | adapters/nanoclaw.py:116-124 — writes IPC JSON files to workspace_dir/ipc/. Decl… |
| 环境变量 | NONE | READ | ✓ 一致 | adapters/nanoclaw.py and constitution.py do not read os.environ directly. All en… |
| 数据库 | NONE | WRITE | ✓ 一致 | adapters/nanoclaw.py:83-105 — creates and writes to SQLite tables (agent_memory,… |
| 剪贴板 | NONE | NONE | — | No clipboard access found in any file. |
| 浏览器 | NONE | NONE | — | No browser tool usage found. WebSocket connections are to Nostr relay protocol, … |
| 技能调用 | NONE | NONE | — | No skill-to-skill invocation found. |
2 项发现
中危 外部 URL 外部 URL
https://nanoclaw.dev/ adapters/nanoclaw.py:8 中危 外部 URL 外部 URL
https://clawhub.ai/skills/nip-aa-citizenship skill.py:9 目录结构
17 文件 · 162.3 KB · 4299 行 Python 15f · 3769L
Markdown 2f · 530L
├─
▾
adapters
│ ├─
__init__.py
Python
│ ├─
base.py
Python
│ ├─
nanoclaw.py
Python
│ └─
openclaw.py
Python
├─
▾
nostr_primitives
│ ├─
__init__.py
Python
│ ├─
dm.py
Python
│ ├─
events.py
Python
│ ├─
keygen.py
Python
│ └─
relay.py
Python
├─
__init__.py
Python
├─
citizenship.py
Python
├─
constitution.py
Python
├─
dm_listener.py
Python
├─
HEARTBEAT.md
Markdown
├─
self_reflection.py
Python
├─
SKILL.md
Markdown
└─
skill.py
Python
依赖分析 3 项
| 包名 | 版本 | 来源 | 已知漏洞 | 备注 |
|---|---|---|---|---|
requests | * | pip | 否 | Version not pinned — SKILL.md install section has no version constraint |
websocket-client | * | pip | 否 | Version not pinned — required for Nostr relay WebSocket communication |
coincurve | * | pip | 否 | Version not pinned — required for secp256k1 key generation and Schnorr signing |
安全亮点
✓ No base64 piping into bash, eval(), atob(), or other code obfuscation patterns detected
✓ No access to ~/.ssh, ~/.aws, .env, or other sensitive host paths
✓ No credential harvesting or exfiltration — private keys stay in memory and are only used for local signing
✓ Cryptographic key generation uses os.urandom (CSPRNG) and coincurve (standard secp256k1 library)
✓ Subprocess usage is fully declared in SKILL.md 'Skill Auto-Updates' section — no hidden shell execution
✓ git pull uses --ff-only flag, preventing arbitrary merge commits or rebase manipulation
✓ DM listener uses a documented permission model with guardian approval workflow — no silent DM interception
✓ All external URLs (nanoclaw.dev, clawhub.ai) resolve to legitimate, known project homepages
✓ No direct IP network requests or hardcoded C2 infrastructure indicators
✓ NIP-04 encryption uses standard AES-256-CBC with ECDH shared secret — cryptographically sound
✓ Code is well-structured with clear separation between framework adapters, Nostr primitives, and business logic