Back to skill

Security audit

NeoDB

Security checks for vulnerabilities and agentic risk

Overview

This NeoDB skill is purpose-aligned, but its OAuth setup exposes and stores live account credentials in unsafe ways.

Review this skill before installing. Use it only if you are comfortable granting read/write NeoDB account access, and avoid running the setup script as written unless you can protect or immediately move the token into a secure secret store. If used, revoke or rotate the token if terminal output, shell history, session logs, backups, or artifact/scripts/.credentials.json may have been exposed.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup-auth.sh:100
Finding

OAuth Access Token and Client Secret Exposed in Plaintext

Content
View full analysis

Vulnerability Details

File Location: scripts/setup-auth.sh, lines 100-127
Vulnerability Type: Plaintext credential exposure and insecure credential storage
Risk Level: Medium

The setup script displays the complete OAuth access token in terminal output, embeds it in a configuration example, and saves both the access token and client secret in a project-local JSON file without enforcing restrictive file permissions.

Affected code segments: scripts/setup-auth.sh:100-101, scripts/setup-auth.sh:108-116, and scripts/setup-auth.sh:119-127

bash
echo "Access Token: ${ACCESS_TOKEN}"
echo ""
echo "=== Next Steps ==="
echo ""
echo "Add to your Claude Code settings (~/.claude/settings.json):"
echo ""
cat << SETTINGS_EOF
{
  "env": {
    "NEODB_TOKEN": "${ACCESS_TOKEN}",
    "NEODB_INSTANCE": "${INSTANCE}"
  }
}
SETTINGS_EOF
echo ""
echo "Or export in your shell:"
echo ""
echo "  export NEODB_TOKEN='${ACCESS_TOKEN}'"
echo "  export NEODB_INSTANCE='${INSTANCE}'"
echo ""

# Save credentials locally
CRED_FILE="$(dirname "$0")/.credentials.json"
cat > "$CRED_FILE" << CRED_EOF
{
  "instance": "${INSTANCE}",
  "client_id": "${CLIENT_ID}",
  "client_secret": "${CLIENT_SECRET}",
  "access_token": "${ACCESS_TOKEN}",
  "username": "${USERNAME}",
  "created_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
}
CRED_EOF
echo "Credentials saved to: ${CRED_FILE}"
echo "(Add .credentials.json to .gitignore!)"

Technical Analysis

OAuth bearer tokens function as credentials: possession is normally sufficient to authenticate API requests. Printing the complete token exposes it to terminal capture, session transcripts, screen sharing, CI logs, or other logging systems. The generated settings and shell-export examples repeat the token, further increasing its exposure surface.

The script also writes the access token and OAuth client secret to `scripts/.credentials.js ...[truncated 2091 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not print the complete access token. Display only a short masked fingerprint when confirmation is necessary.
  2. Do not emit configuration examples containing live credentials. Instead, provide instructions that reference a protected environment variable or credential store.
  3. Store credentials in an operating-system credential manager or secret-management service where available.
  4. If file storage is unavoidable, place the file outside the project and enforce owner-only access before writing:
    bash
    umask 077
    CRED_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/neodb/credentials.json"
    mkdir -p "$(dirname "$CRED_FILE")"
    install -m 600 /dev/null "$CRED_FILE"
    
  5. Write credentials atomically and verify that the destination is not a symbolic link and is owned by the current user.
  6. Add .credentials.json to a committed .gitignore as defense in depth, while recognizing that ignore rules do not replace secure permissions.
  7. Request the narrowest OAuth scopes supported by NeoDB and separate read-only from write-enabled workflows where possible.
  8. Document how users can revoke or rotate an exposed token and recommend immediate revocation if the credential file or terminal output has been disclosed.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (25)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description presents the skill as a content-management assistant, but the file also instructs users to run an authentication setup flow that can register apps, obtain access tokens, and store credentials locally. This hidden expansion of behavior is security-relevant because users may consent to a media-management skill without realizing it performs credential acquisition and local secret handling.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
94% confidence
Finding

The skill directs use of secrets from ~/.claude/settings.json, an agent configuration location that may contain other sensitive data and broad account settings. Referencing this path in the operational flow increases the risk of exposing or mishandling local configuration secrets, especially if shell-based troubleshooting or scripts later inspect that directory.

Content

Scanner excerpt · SKILL.md (reported line 14)May include surrounding context.

md
## 前置条件

需要环境变量(`~/.claude/settings.json` → `env`):
- `NEODB_TOKEN` — OAuth Access Token(必须)
- `NEODB_INSTANCE` — 实例域名(可选,默认 `neodb.social`)

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The skill requires an OAuth access token and references a setup flow for obtaining it, which means the skill operates with bearer credentials that can authorize account actions if exposed. In a shell-capable skill, token handling is especially sensitive because credentials may leak through command history, logs, process listings, scripts, or accidental output.

Content

Scanner excerpt · SKILL.md (reported line 15)May include surrounding context.

md
## 前置条件

需要环境变量(`~/.claude/settings.json` → `env`):
- `NEODB_TOKEN` — OAuth Access Token(必须)
- `NEODB_INSTANCE` — 实例域名(可选,默认 `neodb.social`)

首次使用运行鉴权:`bash scripts/setup-auth.sh [instance]`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 97)May include surrounding context.

md
- **官方 OpenAPI Spec**: [references/openapi.json](references/openapi.json)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 3)May include surrounding context.

sh
#!/bin/bash
# NeoDB OAuth Setup Script
# Run once to get an access token for CLI/skill use.
# Usage: bash setup-auth.sh [instance]
# Example: bash setup-auth.sh neodb.social

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 67)May include surrounding context.

sh
#!/bin/bash
# NeoDB OAuth Setup Script
# Run once to get an access token for CLI/skill use.
# Usage: bash setup-auth.sh [instance]
# Example: bash setup-auth.sh neodb.social

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 78)May include surrounding context.

sh
#!/bin/bash
# NeoDB OAuth Setup Script
# Run once to get an access token for CLI/skill use.
# Usage: bash setup-auth.sh [instance]
# Example: bash setup-auth.sh neodb.social

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 21)May include surrounding context.

sh
# Step 1: Register application
echo "[1/3] Registering application..."
APP_RESPONSE=$(curl -s -X POST "https://${INSTANCE}/api/v1/apps" \
  -d "client_name=${APP_NAME}" \
  -d "redirect_uris=${REDIRECT_URI}" \
  -d "scopes=read write" \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 68)May include surrounding context.

sh
# Step 3: Exchange code for token
echo ""
echo "[3/3] Exchanging code for access token..."
TOKEN_RESPONSE=$(curl -s -X POST "https://${INSTANCE}/oauth/token" \
  -d "grant_type=authorization_code" \
  -d "code=${AUTH_CODE}" \
  -d "client_id=${CLIENT_ID}" \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 85)May include surrounding context.

sh
# Verify token
echo "  Verifying token..."
ME_RESPONSE=$(curl -s "https://${INSTANCE}/api/me" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}")
USERNAME=$(echo "$ME_RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin).get('username','unknown'))" 2>/dev/null || echo "unknown")

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

This line prints the full bearer access token directly to the terminal. A bearer token grants whoever sees it the ability to act as the user within the token's scope, and terminal output is commonly captured in logs, recordings, screenshots, or support transcripts.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 93)May include surrounding context.

sh
echo "=== SUCCESS ==="
echo "Logged in as: ${USERNAME}"
echo "Instance: ${INSTANCE}"
echo "Access Token: ${ACCESS_TOKEN}"
echo ""
echo "=== Next Steps ==="
echo ""

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 97)May include surrounding context.

sh
echo ""
echo "=== Next Steps ==="
echo ""
echo "Add to your Claude Code settings (~/.claude/settings.json):"
echo ""
cat << SETTINGS_EOF
{

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The script creates a .credentials.json file specifically to hold active OAuth secrets, including the access token and client secret. Storing reusable credentials in a predictable plaintext file materially increases the chance of theft via local compromise, accidental sharing, backups, or repository inclusion.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 115)May include surrounding context.

sh
echo ""

# Save credentials locally
CRED_FILE="$(dirname "$0")/.credentials.json"
cat > "$CRED_FILE" << CRED_EOF
{
  "instance": "${INSTANCE}",

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 127)May include surrounding context.

sh
}
CRED_EOF
echo "Credentials saved to: ${CRED_FILE}"
echo "(Add .credentials.json to .gitignore!)"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill invokes shell commands with network and authenticated API capabilities but does not declare an explicit tool scope such as allowed-tools or permissions. That omission weakens least-privilege controls and makes it easier for the skill to be granted broader execution capability than users or the platform may expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation description includes generic phrases such as users mentioning books, movies, marking, ratings, or comments, plus broad intents like searching or managing lists. These are common everyday requests and the file does not provide clear boundaries or exclusion examples, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 24)May include surrounding context.

bash
# GET
curl -s -H "Authorization: Bearer $NEODB_TOKEN" \
  "https://${NEODB_INSTANCE:-neodb.social}/api/{endpoint}"

# POST (JSON)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This manifest-like OpenAPI file includes multiple delete operations such as removing collections, notes, reviews, marks, tags, and collection/tag items (for example paths under /api/me/collection/{collection_uuid}, /api/me/note/{note_uuid}, /api/me/review/item/{item_uuid}, /api/me/shelf/item/{item_uuid}, and /api/me/tag/{tag_uuid}). Their descriptions state the action tersely (for example 'Remove a collection.' or 'Delete a note.') but do not warn that these actions modify or remove user data and may be irreversible, which is a missing user-facing safety disclosure for a markdown/manifest-style skill description.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 21)May include surrounding context.

sh
# Step 1: Register application
echo "[1/3] Registering application..."
APP_RESPONSE=$(curl -s -X POST "https://${INSTANCE}/api/v1/apps" \
  -d "client_name=${APP_NAME}" \
  -d "redirect_uris=${REDIRECT_URI}" \
  -d "scopes=read write" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/setup-auth.sh (reported line 68)May include surrounding context.

sh
# Step 3: Exchange code for token
echo ""
echo "[3/3] Exchanging code for access token..."
TOKEN_RESPONSE=$(curl -s -X POST "https://${INSTANCE}/oauth/token" \
  -d "grant_type=authorization_code" \
  -d "code=${AUTH_CODE}" \
  -d "client_id=${CLIENT_ID}" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script prints the full access token to stdout and embeds it in example commands/config, which can expose it through terminal scrollback, shell logging, session recording, support screenshots, or CI logs. Anyone obtaining that token can use the granted OAuth permissions to read or modify the user's NeoDB data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script writes the instance, client ID, client secret, and access token in plaintext to a local .credentials.json file. This creates a real credential exposure risk because other local users, malware, backups, or accidental commits can recover long-lived secrets and use them to act on the user's NeoDB account.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file presents all skill content in a single forced locale, and there is no accompanying note offering users a language option or explaining a justified region-specific constraint. Under the policy, natural-language content that imposes a specific language without user opt-in should be flagged.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

This file documents authenticated endpoints such as /api/me, /api/me/preference, /api/me/review/, /api/me/shelf/{type}, /api/me/tag/, and /api/me/note/item/{item_uuid}/ that access private account, preference, review, shelf, tag, and note information. Although the endpoints are marked with bearer auth, the natural-language descriptions do not warn that invoking them accesses personal user data, which is a missing disclosure in a manifest/documentation file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file is natural-language documentation, and it consistently presents all instructions and API descriptions only in Chinese. Under the language/locale policy rule, forcing a single language without user opt-in can be a policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.