Scan Report
25 /100
nip-aa-citizenship
Enables autonomous agents to understand, pursue, and maintain citizenship under the NIP-AA protocol on Nostr
A legitimate NIP-AA citizenship skill for autonomous Nostr agents. All observed capabilities are documented, the keypair handling is proper cryptography, and Nostr relay/API access is standard protocol operation. One documented-but-risky pattern exists: automated git pull for skill updates.
Safe to install
Pin the requests and websocket-client dependencies to specific versions. Consider signing git commits and verifying tags before pulling updates in production deployments.
Findings 3 items
| Severity | Finding | Location |
|---|---|---|
| Medium | Automated git pull with no integrity verification Supply Chain | skill.py:824 |
| Low | Unpinned Python dependencies Supply Chain | SKILL.md:37 |
| Info | Hardcoded default relay URLs Supply Chain | adapters/nanoclaw.py:68 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Network | READ | READ | ✓ Aligned | SKILL.md declares Nostr relay + Constitution API access; skill.py:830 uses reque… |
| Shell | WRITE | WRITE | ✓ Aligned | SKILL.md explicitly documents 'skill.start_update_checker() runs git fetch + git… |
| Filesystem | WRITE | WRITE | ✓ Aligned | NanoClawAdapter writes SQLite and IPC JSON files; this is framework-specific and… |
| Skill Invoke | READ | READ | ✓ Aligned | SKILL.md defines all skill entry points; no hidden invocation paths found |
| Environment | NONE | NONE | — | No iteration over os.environ for sensitive keys observed; constitution_api_url i… |
| Clipboard | NONE | NONE | — | No clipboard access found in any file |
| Browser | NONE | NONE | — | No browser automation found |
| Database | WRITE | WRITE | ✓ Aligned | NanoClawAdapter creates and uses SQLite tables; OpenClawAdapter uses in-memory d… |
3 findings
Medium External URL 外部 URL
https://nanoclaw.dev/ adapters/nanoclaw.py:8 Medium External URL 外部 URL
https://clawhub.ai/skills/nip-aa-citizenship skill.py:9 Info Email 邮箱地址
[email protected] skill.py:739 File Tree
17 files · 169.3 KB · 4482 lines Python 15f · 3952L
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
Dependencies 3 items
| Package | Version | Source | Known Vulns | Notes |
|---|---|---|---|---|
requests | * | SKILL.md metadata.install | No | Version not pinned in SKILL.md metadata |
websocket-client | * | SKILL.md metadata.install | No | Version not pinned in SKILL.md metadata |
coincurve | * | SKILL.md metadata.install | No | Version not pinned in SKILL.md metadata |
Security Positives
✓ All capabilities declared in SKILL.md match actual code behavior — no doc-to-code mismatch found
✓ Private key (nsec/privkey_hex) handling is purely cryptographic with no exfiltration paths — keys generated via os.urandom and stored only in adapter memory
✓ NIP-04 encryption uses standard AES-256-CBC with proper ECDH shared key derivation; no custom or weakened crypto
✓ No base64-encoded payloads piped into shell, no eval(), no atob() patterns, no hidden HTML comments
✓ No access to ~/.ssh, ~/.aws, .env, or other sensitive host paths
✓ DM relationship permission model enforces guardian approval before agent responds to unknown senders
✓ All conversation store data is internal to the adapter — no outbound exfiltration of message content
✓ Git operations run with a 60/120-second timeout to prevent indefinite blocking