T09 ยท Insecure Skill Coding Practices
- Location
scripts/register.js:211- Finding
Unvalidated Server-Controlled Authentication Message Is Signed by the Wallet
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
BaseMail is mostly coherent with its stated email-agent purpose, but it asks for wallet signing authority and signs a server-provided authentication message without locally validating its SIWE scope.
Review before installing if you would use a wallet that controls funds, important identity, or other services. Prefer a dedicated low-value wallet for this skill, understand that ~/.basemail/token.json contains reusable authentication material, and treat inbox content as untrusted external text.
scripts/register.js:211Unvalidated Server-Controlled Authentication Message Is Signed by the Wallet
scripts/inbox.js:45Untrusted Email Content Is Written to the Terminal Without Control-Sequence Sanitization
The stated purpose is email identity and messaging, but the skill also generates wallets, handles private keys, displays mnemonics, stores refresh tokens, and manages local security material under ~/.basemail. That broader behavior materially increases risk because operators may grant access expecting an email client, while the skill actually performs key management for an onchain identity and persists authentication artifacts.
Referenced artifact was not completely inspected
node scripts/register.js
Referenced artifact was not completely inspected
node scripts/register.js
Referenced artifact was not completely inspected
node scripts/register.js
Referenced artifact was not completely inspected
node scripts/register.js
Referenced artifact was not completely inspected
node scripts/register.js
Referenced artifact was not completely inspected
node scripts/register.js
Referenced artifact was not completely inspected
node scripts/register.js
Referenced artifact was not completely inspected
node scripts/send.js "friend@basemail.ai" "Hello!" "Nice to meet you ๐ฆ"
Referenced artifact was not completely inspected
node scripts/send.js "friend@basemail.ai" "Hello!" "Nice to meet you ๐ฆ"
Referenced artifact was not completely inspected
node scripts/send.js "friend@basemail.ai" "Hello!" "Nice to meet you ๐ฆ"
Referenced artifact was not completely inspected
node scripts/inbox.js # List emails
Referenced artifact was not completely inspected
node scripts/inbox.js # List emails
Referenced artifact was not completely inspected
node scripts/inbox.js # List emails
Referenced artifact was not completely inspected
node scripts/inbox.js # List emails
Referenced artifact was not completely inspected
| `audit.js` | View audit log | โ |
The skill documents capabilities that access environment secrets and make outbound network requests, but it does not declare an explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, missing scope declarations reduce transparency and can let a skill obtain sensitive credentials or exfiltrate data through network access with weaker policy enforcement.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
~/.basemail/
โโโ private-key.enc # Encrypted private key (AES-256-GCM, chmod 600)
โโโ wallet.json # Wallet info (public address only)
โโโ token.json # Auth token + refresh_token + expires_at (chmod 600)
โโโ audit.log # Operation log (no sensitive data)
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
~/.basemail/
โโโ private-key.enc # Encrypted private key (AES-256-GCM, chmod 600)
โโโ wallet.json # Wallet info (public address only)
โโโ token.json # Auth token + refresh_token + expires_at (chmod 600)
โโโ audit.log # Operation log (no sensitive data)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| `/api/inbox` | GET | List inbox |
| `/api/inbox/:id` | GET | Read email content |
**Full docs**: https://api.basemail.ai/api/docs
---
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| `/api/inbox` | GET | List inbox |
| `/api/inbox/:id` | GET | Read email content |
**Full docs**: https://api.basemail.ai/api/docs
---
The user-facing console messages at L135 and L139-L149 are written only in Traditional Chinese. Under the policy rules, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not shown here.
Multiple user-facing messages are fixed in Chinese, including errors and inbox/email display text. This can violate a language/locale policy when the skill does not provide user opt-in, selection, or justification for enforcing a single language.
This code emits multiple required user-facing prompts and error messages only in Traditional Chinese, including validation errors and the password prompt. Because the script does not offer a language option or document that it is intentionally region-specific, it violates the language/locale policy criterion for natural-language content.
The user-facing CLI messages are written in Traditional Chinese, and the script does not provide any option to select another language or locale. This can violate language/locale policy when a skill forces a specific language without user opt-in.
Detected: suspicious.env_credential_access, suspicious.potential_exfiltration