Back to skill

Security audit

AI Credit Share 中国平台助手

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real AI Credit Share platform helper, but it stores and prints sensitive credentials while enabling account and balance-affecting actions.

Review this skill carefully before installing. Use a unique password, avoid running it in logged or shared terminals, restrict or remove ~/.aicreditshare credential files, and manually confirm any publish, hire, approve, accept, cancel, payout, dispute, webhook, or API-key-reset action.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/init.sh:32
Finding

Predictable Shared Default Password for Agent Accounts

Content
View full analysis

Vulnerability Details

File Location: scripts/init.sh, lines 32–42
Vulnerability Type: Predictable hardcoded default credential
Risk Level: High

Vulnerable Code

bash
get_default_password() {
    if [ -n "$AICREDITSHARE_DEFAULT_PASSWORD" ]; then
        echo "$AICREDITSHARE_DEFAULT_PASSWORD"
    elif [ -f "${HOME}/.aicreditshare/default_password" ]; then
        cat "${HOME}/.aicreditshare/default_password"
    else
        echo "Test123456"  # Default password
    fi
}

Technical Analysis

When neither the AICREDITSHARE_DEFAULT_PASSWORD environment variable nor the local default-password file exists, the initialization script silently uses the fixed password Test123456. Both registration and login call this function when the user does not explicitly supply a password.

The documented registration example omits a password, making it likely that users following the normal setup process will create accounts with this publicly known credential. The fallback violates secure credential-generation principles because the password is identical across installations, is present in distributed source code, and has insufficient entropy.

Attack Path

  1. A user follows the documented registration procedure without supplying a password.
  2. get_default_password returns Test123456.
  3. The script creates the remote platform account using that predictable password.
  4. An attacker discovers or guesses the account email address through platform activity, messages, shared task details, logs, or other sources.
  5. The attacker attempts to log in with the publicly known default password.
  6. If the platform lacks effective rate limiting or additional authentication controls, the attacker gains access to the Agent account.

Impact Assessment

Successful exploitation could grant access to the affected AI Credit Share account. Based on the capabilities exposed by the S ...[truncated 459 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the hardcoded password fallback entirely.
  • Require users to supply a password explicitly, preferably through a hidden interactive prompt such as read -s.
  • Alternatively, generate a unique password using a cryptographically secure random source and require the user to store it securely.
  • Enforce an appropriate minimum password length and reject known or weak passwords.
  • Do not reuse a default password across accounts or installations.
  • Encourage or require multifactor authentication when the platform supports it.
  • Add server-side login rate limiting and monitoring as defense-in-depth measures.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/init.sh:45
Finding

Plaintext Credential Files Created Without Enforced Restrictive Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/init.sh, lines 45–99
Vulnerability Type: Insecure local storage of passwords and API credentials
Risk Level: High

Vulnerable Code

bash
save_default_password() {
    local password="$1"
    mkdir -p "${HOME}/.aicreditshare"
    echo -n "$password" > "${HOME}/.aicreditshare/default_password"
}

Registration also writes the API key and secret directly to a plaintext JSON file:

bash
mkdir -p ~/.aicreditshare
cat > ~/.aicreditshare/config.json << EOF
{
  "agent_id": "$agent_id",
  "api_key": "$agent_api_key",
  "api_secret": "$agent_api_secret",
  "email": "$email",
  "registered": true
}
EOF

save_default_password "$password"

Similar plaintext writes occur during login and secret regeneration, where the configuration can contain a JWT, API key, or API secret.

Technical Analysis

The script stores the account password, API key, API secret, and potentially a JWT in plaintext under ~/.aicreditshare. It does not set a restrictive process umask, assign mode 0700 to the credential directory, or assign mode 0600 to the credential files.

For newly created files, effective permissions therefore depend on the invoking environment's umask. If the umask is permissive, other local users or processes may be able to read the files. If a file already exists with insecure permissions, shell redirection truncates and rewrites it without necessarily correcting its mode.

Retaining the account password is also broader than necessary for authenticated API operations after registration.

Attack Path

  1. A user runs scripts/init.sh under a permissive umask or with pre-existing credential files that have permissive modes.
  2. The script writes the account password and API credentials to plaintext files.
  3. Another local user, compromised process, backup service, support bundle, or unintentionally ...[truncated 967 chars]
Remediation
View remediation

Remediation Suggestions

  • Set umask 077 before creating the credential directory or files.

  • Create the directory with an explicit restrictive mode, for example:

    bash
    install -d -m 700 "${HOME}/.aicreditshare"
    
  • Create credential files atomically with mode 0600, and verify or correct permissions on existing files with chmod 600.

  • Prefer an operating-system credential store, keychain, or dedicated secret-management service over plaintext JSON files.

  • Do not retain the account password after registration unless it is strictly necessary.

  • Store only the minimum credential material required for the selected authentication method.

  • Avoid following symbolic links when creating credential files, and use safe atomic replacement to reduce link and partial-write risks.

  • Document how users can revoke and rotate credentials after suspected exposure.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/init.sh:60
Finding

Passwords and API Credentials Exposed Through Terminal Output

Content
View full analysis

Vulnerability Details

File Location: scripts/init.sh, lines 60–61
Additional Locations: scripts/init.sh, lines 77–80, 111–112, 142–150, and 190–193
Vulnerability Type: Sensitive information exposure through console output
Risk Level: Medium

Vulnerable Code

Registration prints the supplied or default password:

bash
echo -e "${YELLOW}正在注册新Agent...${NC}"
echo -e "${YELLOW}使用密码: ${password}${NC}"

It subsequently prints the API credentials:

bash
echo "================================"
echo -e "${GREEN}Agent ID: $agent_id${NC}"
echo -e "${GREEN}Agent API Key: $agent_api_key${NC}"
echo -e "${GREEN}Agent API Secret: $agent_api_secret${NC}"
echo "================================"

The configuration command outputs the complete plaintext configuration:

bash
show_config() {
    if [ -f ~/.aicreditshare/config.json ]; then
        echo -e "${GREEN}当前配置:${NC}"
        cat ~/.aicreditshare/config.json | jq .

        if [ -f ~/.aicreditshare/default_password ]; then
            echo -e "\n${YELLOW}已保存默认密码${NC}"
        fi
    else
        echo -e "${RED}未找到配置文件,请先注册或登录${NC}"
    fi
}

Secret regeneration similarly prints the newly issued API key and secret.

Technical Analysis

Passwords, API secrets, and complete configuration data are written to standard terminal output. Terminal output is frequently captured by CI systems, remote-session recorders, troubleshooting tools, shell transcripts, support screenshots, or shared terminal multiplexers.

Although a newly generated secret may need to be presented once, printing passwords during every registration or login attempt and printing complete stored configuration exceeds the minimum disclosure required for the Skill's functionality.

Attack Path

  1. A user runs registration, login, secret regeneration, or the configuration-display command in a monitored, log ...[truncated 1025 chars]
Remediation
View remediation

Remediation Suggestions

  • Never print account passwords.
  • Redact tokens and secrets when displaying configuration; show only non-sensitive metadata and a short credential fingerprint.
  • Avoid printing API secrets during routine operations.
  • If a newly generated secret must be shown once, use a protected interactive workflow and warn users against running it in logged environments.
  • Send status information to the terminal without embedding sensitive values.
  • Ensure CI pipelines and automation do not enable shell tracing around credential operations.
  • Provide explicit credential-revocation and rotation instructions for users who suspect terminal-output exposure.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (27)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This finding highlights that the documented scope is inconsistent and mentions local credential/password storage and API key regeneration without clearly declaring those behaviors in the top-level purpose. Undisclosed credential persistence and secret rotation are sensitive operations; if users invoke the skill assuming routine marketplace automation, they may unintentionally expose long-lived secrets or invalidate existing integrations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This finding highlights that the documented scope is inconsistent and mentions local credential/password storage and API key regeneration without clearly declaring those behaviors in the top-level purpose. Undisclosed credential persistence and secret rotation are sensitive operations; if users invoke the skill assuming routine marketplace automation, they may unintentionally expose long-lived secrets or invalidate existing integrations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'shell' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script exposes an operation to regenerate API secrets, which is a sensitive credential-management action unrelated to basic task/skill marketplace browsing. If invoked unexpectedly, it can invalidate existing integrations, lock out legitimate clients, or hand control of credential rotation to an agent or workflow the user did not intend to authorize.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script writes passwords and API credentials to local files without strong user notice, consent, or access control, creating a durable secret-exposure path. Because this skill automates account creation and API usage, storing both account and API secrets on disk materially increases the chance of unauthorized platform access if the endpoint is compromised or shared.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script prints the user's password and later API secrets directly to stdout, exposing them to terminal scrollback, session recording, remote shells, logging agents, screen sharing, and shoulder-surfing. Credential disclosure at initialization is especially dangerous because these values enable full account/API access and may only be shown once, encouraging users to copy them insecurely.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Echoing the supplied password during registration/login is a direct credential exposure vulnerability. Anyone with access to the terminal, shell logs, recordings, CI job output, or support captures can obtain the account password and reuse it for account takeover, especially since the script also supports a predictable fallback default password.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README advertises operations including registration/login, freezing deposits, paying rewards, publishing and hiring services, and remote API calls, but it does not prominently warn users that these actions can spend funds, create accounts, or commit them on an external platform. In this context, missing risk disclosure and confirmation guidance is dangerous because the skill is explicitly designed to perform authenticated financial and account-affecting actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README provides broad natural-language trigger examples such as registering accounts, publishing jobs, accepting work, and checking balances, but it does not define activation boundaries, required confirmations, or limits on autonomous execution. In a skill that can perform authenticated remote actions with financial consequences, ambiguous triggers increase the risk of accidental invocation and unintended transactions.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 146)May include surrounding context.

A: 需要先安装 curl 和 jq:

bash
# Ubuntu/Debian
sudo apt install curl jq

# macOS
brew install curl jq

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill describes actions with direct financial effects—freezing deposits, paying out escrowed funds, imposing cancellation penalties, and hiring services—without a clear upfront confirmation requirement. In the context of an automated agent operating on a real platform, this makes accidental or socially engineered loss of funds significantly more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly says it will save returned 'agentApiKey' and 'agentApiSecret' and also supports regenerating API keys, but it provides no explicit security warning about the sensitivity of those secrets, storage location, retention, or the operational consequences of rotation. In a skill with network access and financial platform operations, silent credential storage materially increases the risk of account compromise or accidental lockout.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description advertises broad end-to-end automation across sensitive platform actions such as registration, task publishing, task acceptance, skill publishing, hiring, and balance queries without defining user-consent boundaries, authorization checks, or operational limits. In an agent ecosystem, vague all-in-one automation language increases the risk that the skill will be invoked for high-impact account or transactional actions beyond what the user explicitly intended.

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/aics.sh (reported line 57)May include surrounding context.

sh
local signature=$(echo -n "$sign_string" | openssl dgst -sha256 -hmac "$API_SECRET" | cut -d' ' -f2)
    
    if [ "$method" = "GET" ]; then
        curl -s "https://cn.aicreditshare.com${path}" \
            -H "X-Agent-Key: ${API_KEY}" \
            -H "X-Agent-Signature: ${signature}" \
            -H "X-Agent-Timestamp: ${timestamp}"

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script implements messaging, profile updates, webhook configuration, and API secret regeneration, but these sensitive capabilities are omitted from the skill description. This under-disclosure can mislead users into granting trust to a marketplace helper that can also change account settings and credentials, increasing the chance of unauthorized or unexpected account-impacting actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Credential rotation is an irreversible, high-sensitivity action, yet the script exposes it as a normal command with no confirmation, dry-run, or warning. This makes accidental invocation or misuse far more likely, potentially breaking automation or causing denial of access to dependent systems.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

All user-facing messages and help output are written in Chinese, which imposes a specific language/locale on users without opt-in. Under the stated policy, language-specific behavior should either offer choice or clearly document why the locale restriction is necessary.

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/init.sh (reported line 19)May include surrounding context.

sh
check_dependencies() {
    echo -e "${YELLOW}检查依赖...${NC}"
    
    if ! command -v curl &> /dev/null; then
        echo -e "${RED}错误: curl 未安装${NC}"
        exit 1
    fi

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script deliberately persists sensitive credentials beyond the immediate registration/login workflow by storing a default password and account/API credentials under ~/.aicreditshare. For a platform assistant, this creates unnecessary long-lived local secrets that can be recovered by other local users, malware, backups, shell-history-driven support workflows, or accidental disclosure, especially because no file permission hardening or encryption is applied.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
97% confidence
Finding

The script persists API key and API secret in ~/.aicreditshare/config.json after registration, creating a long-lived local session/credential cache. Because these are reusable credentials for the external platform, compromise of the local machine or account can directly lead to unauthorized API actions and account abuse.

Content

Scanner excerpt · scripts/init.sh (reported line 88)May include surrounding context.

sh
echo -e "${YELLOW}⚠️  请立即保存以上凭证,仅显示一次!${NC}"
        
        # 保存到配置文件
        mkdir -p ~/.aicreditshare
        cat > ~/.aicreditshare/config.json << EOF
{
  "agent_id": "$agent_id",

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The login request transmits user credentials to an external service, which is expected for this skill's purpose, but it still represents real outbound transfer of sensitive data to a third-party platform. In context, this is not inherently malicious, yet it is security-relevant because the script sends highly sensitive credentials and then persists returned tokens/keys locally.

Content

Scanner excerpt · scripts/init.sh (reported line 119)May include surrounding context.

sh
echo -e "${YELLOW}使用密码: ${password}${NC}"
    
    # 使用jq构建JSON,避免注入
    local response=$(curl -s -X POST "https://cn.aicreditshare.com/api/agent/login" \
        -H "Content-Type: application/json" \
        -d "$(jq -n \
            --arg email "$email" \

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The login flow persists the returned token and API key to disk, extending the lifetime of an authenticated session beyond the immediate command execution. This increases exposure to local compromise, accidental backup/sync leakage, and unauthorized reuse by other processes or users on the system.

Content

Scanner excerpt · scripts/init.sh (reported line 138)May include surrounding context.

sh
echo "================================"
        
        # 保存配置
        mkdir -p ~/.aicreditshare
        cat > ~/.aicreditshare/config.json << EOF
{
  "agent_id": "$agent_id",

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

README 全文及示例交互均默认要求中文,没有提供语言/地区选择,也未说明该技能仅面向特定中文地区用户或因合规原因必须使用中文。按照语言/locale 政策,若限定单一语言,应提供用户选择或给出明确、合理的限制说明。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill name and description are presented entirely in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. This can violate language/locale policy if the skill implicitly forces one language without opt-in or justification.

Content

No source excerpt is available for this finding.