T09 · Insecure Skill Coding Practices
- Location
scripts/register.js:50- Finding
JSON Output Mode Bypasses Registration Transaction Confirmation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill fits its stated identity purpose, but it needs Review because documented JSON-mode transaction commands can bypass the intended confirmation step and it stores signing keys locally.
Review before installing. Use a dedicated testnet or low-value identity key, avoid importing private keys through --import, verify contract and chain settings, and do not run register or vouch with --json unless the code is fixed to require explicit confirmation independently from output format.
scripts/register.js:50JSON Output Mode Bypasses Registration Transaction Confirmation
scripts/vouch.js:54JSON Output Mode Bypasses Vouch Transaction Confirmation
scripts/setup.js:12Private Key Import Through Command-Line Arguments Exposes Wallet Secrets
Although not overtly malicious, the installation instructions ask users to recursively delete a path with rm -rf during setup. If copied, modified, or run in an unexpected environment, destructive deletion commands can amplify mistakes; this is more concerning here because the skill already requires shell execution of unreviewed setup steps from a remote repository.
mkdir -p "$SKILL_DIR" git clone https://github.com/g1itchbot8888-del/agent-identity.git /tmp/agent-identity-tmp cp -r /tmp/agent-identity-tmp/skill/* "$SKILL_DIR/" rm -rf /tmp/agent-identity-tmp cd "$SKILL_DIR" && npm install
Although not overtly malicious, the installation instructions ask users to recursively delete a path with rm -rf during setup. If copied, modified, or run in an unexpected environment, destructive deletion commands can amplify mistakes; this is more concerning here because the skill already requires shell execution of unreviewed setup steps from a remote repository.
mkdir -p "$SKILL_DIR" git clone https://github.com/g1itchbot8888-del/agent-identity.git /tmp/agent-identity-tmp cp -r /tmp/agent-identity-tmp/skill/* "$SKILL_DIR/" rm -rf /tmp/agent-identity-tmp cd "$SKILL_DIR" && npm install
Referenced artifact was not completely inspected
node scripts/setup.js --json
The skill declares executable setup and runtime commands (git clone, npm install, node scripts/...) and implicitly relies on environment access, but it does not declare any explicit tool scope or permissions. This creates an under-specified trust boundary where an agent may execute code or access environment data without users understanding the required capabilities.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
## Features
- **Register** — Create on-chain identity (stake USDC to prevent spam)
- **Sign** — Sign messages with your identity key
- **Verify** — Verify signatures from other agents
- **Link** — Connect platform accounts (Moltbook, Twitter, etc.)
The setup instructions create a persistent private signing key in ~/.agent-identity/key.json, but the guidance does not clearly warn that loss, disclosure, or accidental syncing of this file could permanently compromise the identity. For a cryptographic identity skill, inadequate key-handling guidance increases the chance of credential theft or unrecoverable identity loss.
The registration flow instructs users to submit on-chain staking transactions involving USDC without a prominent warning that blockchain transactions may be irreversible, incur gas costs, and expose users to financial loss from mistakes or contract issues. Because the skill is centered on staking and vouching, insufficient financial-risk disclosure can lead users to authorize transfers they do not fully understand.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
## Security
- Private key stored in `~/.agent-identity/key.json` (chmod 600)
- Never share your private key
- Signing key can be different from wallet key for added security
- USDC stake is returned after deactivation cooldown (7 days)
This code persists key material to a predictable file in the user's home directory as plaintext JSON. Although restrictive filesystem modes are set, local plaintext storage of a private key materially increases the risk of compromise from malware, backups, multi-user access mistakes, or later code that reads the file, especially in a skill designed to control on-chain identity and funds.
The wallet client loads a locally stored private key and couples it to remote HTTP RPC interaction for transaction signing and submission. In the context of an agent identity skill that can register identities and stake USDC, this increases the blast radius of any key compromise or mis-signing flow, and users are not warned that local key material will be used to authorize on-chain actions through an external endpoint.
This script accepts a private key via a command-line argument and persists the private key to disk, but it does not provide any explicit warning about the sensitivity of the credential or the risks of exposing it through shell history, process listings, logs, or insecure file storage. In the context of an on-chain identity and staking tool, compromise of this key could let an attacker impersonate the agent, sign messages, and steal or misuse associated funds and identity.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
.requiredOption('--amount <usdc>', 'USDC amount to stake as vouch')
.option('--chain <name>', 'Chain to use', DEFAULT_CHAIN)
.option('--json', 'Output as JSON')
.option('--yes', 'Skip confirmation')
.parse();
const opts = program.opts();
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
.requiredOption('--amount <usdc>', 'USDC amount to stake as vouch')
.option('--chain <name>', 'Chain to use', DEFAULT_CHAIN)
.option('--json', 'Output as JSON')
.option('--yes', 'Skip confirmation')
.parse();
const opts = program.opts();
The dependency uses a caret version range, which allows newer minor/patch releases of viem to be installed without explicit review. In a security-sensitive skill that performs cryptographic identity, signing, verification, and on-chain registration, this increases supply-chain risk because an upstream compromise or breaking change could alter signing or transaction behavior.
"vouch": "node scripts/vouch.js"
},
"dependencies": {
"viem": "^2.0.0",
"commander": "^11.0.0"
},
"author": "g1itchbot",
The commander dependency is also specified with a caret range, so installs may resolve to newer releases that were not explicitly vetted. While commander is not itself a crypto library, it is part of the execution path for CLI scripts, so a compromised or vulnerable upstream release could still affect local command execution or be used as a supply-chain entry point.
},
"dependencies": {
"viem": "^2.0.0",
"commander": "^11.0.0"
},
"author": "g1itchbot",
"license": "MIT"
The code creates a public client using http() transport, which will send requests to a remote RPC service and may transmit wallet- or chain-related metadata. This file does not include any prompt, log, or explanatory warning to the user about external network communication.
No suspicious patterns detected.