Back to skill

Security audit

instreet

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real InStreet social-network integration, but it can store credentials and automatically publish posts or comments under the user's account without clear approval controls.

Review before installing. Only use this skill if you are comfortable registering with the InStreet service, storing an API key locally, and allowing scripts to publish posts or comments under that agent identity. Do not schedule or run the heartbeat script unless you explicitly want automated public activity, and consider fixing credential permissions and JSON escaping first.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/instreet_init.sh:27
Finding

API Key Duplicated in a Configuration File Without Explicitly Restricted Permissions

Content
View full analysis
"$CONFIG_DIR/api_key" chmod 600 "$CONFIG_DIR/api_key" # 创建配置文件 cat > "$CONFIG_DIR/config.json" << EOF { "api_key": "$api_key", "username": "$username", "bio": "$bio", "heartbeat_interval": 1800, "base_url": "https://instreet.coze.site/api/v1" } EOF ``` ### Technical Analysis The script correctly restricts the dedicated `api_key` file to mode `600`, but it also writes the same bearer token into `config.json` without applying equivalent permissions. The resulting permissions depend on the process umask and existing filesystem state. Under a permissive umask, the configuration file may be readable by other local users. Protecting only the dedicated key file is ineffective when an unrestricted duplicate of the credential is stored elsewhere. Because this API key is used as a bearer token, possession of it is sufficient to authenticate as the registered InStreet agent. ### Attack Path 1. A user runs `instreet_init.sh` in an environment with a permissive umask. 2. The script writes the API key to both `api_key` and `config.json`. 3. The script applies mode `600` only to `api_key`. 4. Another local account or process with filesystem access reads `config.json`. 5. The attacker extracts the value of `api_key`. 6. The attacker submits requests with `Authorization: Bearer ` to impersonate the agent. Exploitation requires local read access to the generated configuration file and permissions that expose it. ### Impact Assessment An attacker who obtains the key can act with the remote privileges assigned to the InStreet agent. This may include creating posts, submitting comments, reading authenticated API data, and otherwise impersonating the agent. The issue does not directly gra ...[truncated 150 chars]
Remediation
View remediation
"$CONFIG_DIR/config.json" <

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/instreet_init.sh:20
Finding

Untrusted Values Are Interpolated Directly into JSON Request Bodies

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Automated posting/commenting and use of local credential files are materially sensitive behaviors that are not clearly disclosed in the skill metadata. In a social-network integration skill, hidden automation can directly affect an external identity, generate unwanted content, or abuse stored credentials under the guise of ordinary community engagement.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Automated posting/commenting and use of local credential files are materially sensitive behaviors that are not clearly disclosed in the skill metadata. In a social-network integration skill, hidden automation can directly affect an external identity, generate unwanted content, or abuse stored credentials under the guise of ordinary community engagement.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares shell-backed behavior and references executable scripts, but does not declare any tool scope or permissions. This creates an authorization and transparency gap: an agent may invoke shell-capable behavior without clear user or platform constraints, increasing the chance of unintended command execution or access to local files.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match normal discussion about social interaction or networking, making accidental invocation likely. Because this skill can lead to script execution and external posting behavior, overbroad activation materially raises the risk of unintended actions on a user's behalf.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill text mentions recurring heartbeat tasks and posting/commenting capabilities but omits clear user-facing warnings that these actions can modify external accounts and may recur automatically. In this context, hidden automation is especially risky because it can create persistent, repeated activity on a social platform without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation describes authenticated endpoints for posting content and accessing a dashboard, but it does not warn that these actions can affect a real account, publish user-controlled content, or expose private account data. In an agent skill context, that omission is risky because an agent may invoke these APIs on a user's behalf without clearly surfacing consent or the consequences of the action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This shell script accesses a stored API key from the user's home directory and uses it for authenticated actions, but the file only reports missing configuration and does not disclose that a sensitive credential will be read and used. Under the code-file criteria, sensitive credential access should have some visible warning, comment, or documentation unless already clearly disclosed elsewhere.

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

sh
# 发送评论请求
echo "正在发送评论..."
response=$(curl -s -X POST https://instreet.coze.site/api/v1/comments \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "$REQUEST_BODY")

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The inline documentation describes the script as a heartbeat task, but the implementation performs random social actions that alter external content. This mismatch is dangerous because it can mislead users and operators into granting trust or scheduling the script under false assumptions, increasing the likelihood of unauthorized posting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script silently reads an API key from local files and uses it for outbound requests without clearly disclosing credential access or network transmission at the point of use. While using API keys is expected for integrations, the lack of transparency and consent is dangerous in a skill context because it can surprise users and enable unintended authenticated actions on their behalf.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script labeled as a heartbeat randomly performs active community actions including browsing, commenting, and creating posts. Autonomous content creation on an external platform is dangerous because it can modify third-party state without user approval, cause spam or reputation damage, and make the host unknowingly act through stored credentials.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The comment frames browsing, commenting, and posting as normal heartbeat behavior, normalizing actions that actually modify external community content. This is risky because maintainers may overlook that scheduled execution can generate unsolicited activity using stored credentials.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This POST request transmits authenticated data to an external endpoint to create a comment on behalf of the user. External transmission itself is not always unsafe, but here it is dangerous because it performs a state-changing action with stored credentials and randomized content, creating risk of unauthorized or unintended community interaction.

Content

Scanner excerpt · scripts/instreet_heartbeat.sh (reported line 55)May include surrounding context.

sh
COMMENTS=("很有见地!" "感谢分享这个观点" "这个话题值得深入讨论" "学习了,谢谢!")
            RANDOM_COMMENT="${COMMENTS[RANDOM % ${#COMMENTS[@]}]}"
            
            curl -s -X POST https://instreet.coze.site/api/v1/comments \
                 -H "Authorization: Bearer $API_KEY" \
                 -H "Content-Type: application/json" \
                 -d "{\"post_id\": \"$POST_ID\", \"content\": \"$RANDOM_COMMENT\"}" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script posts comments and new threads to an external service without any interactive consent, confirmation, or prominent warning. In the context of an agent skill, this is more dangerous because users may expect assistance, not autonomous social actions that can spam a community, violate platform policies, or damage the user's identity and reputation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This POST request creates a new external post using a bearer token and generated content, which changes third-party state without user review. In a social-platform integration skill, autonomous posting is particularly risky because it can generate spam, policy violations, or reputational harm under the user's account.

Content

Scanner excerpt · scripts/instreet_heartbeat.sh (reported line 70)May include surrounding context.

sh
RANDOM_TITLE="${TITLES[RANDOM % ${#TITLES[@]}]}"
        RANDOM_CONTENT="${CONTENTS[RANDOM % ${#CONTENTS[@]}]}"
        
        curl -s -X POST https://instreet.coze.site/api/v1/posts \
             -H "Authorization: Bearer $API_KEY" \
             -H "Content-Type: application/json" \
             -d "{\"title\": \"$RANDOM_TITLE\", \"content\": \"$RANDOM_CONTENT\"}" \

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The initialization script performs a network registration with a third-party service and persists the returned API key locally, which expands the skill's effective behavior beyond simple social/community interaction. This is risky because it creates a durable trust relationship and local secret storage without clearly scoped consent, making credential exposure or unintended account linkage possible.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The script sends user-supplied profile data to an external service during setup. In the context of an agent skill, external transmission is more sensitive because users may expect local configuration, and the script provides limited transparency about the remote service and data handling.

Content

Scanner excerpt · scripts/instreet_init.sh (reported line 20)May include surrounding context.

sh
# 注册 Agent 到 InStreet 平台
echo "正在注册 Agent..."
response=$(curl -s -X POST https://instreet.coze.site/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d "{\"username\": \"$username\", \"bio\": \"$bio\"}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script collects username and bio, then immediately transmits them to a remote endpoint with only a generic registration message. This is dangerous because users are not given a clear privacy or network disclosure about what data leaves the system, where it is sent, and for what retention or processing purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script writes the returned API key and related account data to disk without first warning the user or requesting confirmation. This is dangerous because persistent local credential storage increases the blast radius of compromise from local malware, backups, misconfigured permissions, or shared environments.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

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

Content

Scanner excerpt · scripts/instreet_init.sh (reported line 30)May include surrounding context.

sh
# 安全保存 API Key
    echo "$api_key" > "$CONFIG_DIR/api_key"
    chmod 600 "$CONFIG_DIR/api_key"
    
    # 创建配置文件
    cat > "$CONFIG_DIR/config.json" << EOF

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script loads api_key and username from a local configuration file and later uses the API key for authenticated posting, but there is no comment, prompt, or user-facing notice explaining that stored credentials will be accessed. For code files, access to sensitive credentials should have some visible disclosure unless already clearly documented in the skill description, which is not present in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script sends the title, content, category, and agent username to a remote HTTPS endpoint using curl. Although it prints that it is posting to InStreet, it does not explicitly warn the user that their provided content and account identity will be transmitted to an external service, which is the kind of disclosure required for network operations that send user or system data.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The script constructs a JSON request body by directly interpolating unescaped user-controlled values such as TITLE, CONTENT, and CATEGORY into a quoted JSON string. An attacker can inject quotes, braces, or crafted payload content to break the JSON structure, alter submitted fields, or cause unintended requests and reliability failures when authenticated data is transmitted to the external API.

Content

Scanner excerpt · scripts/instreet_post.sh (reported line 53)May include surrounding context.

sh
# 发帖到 InStreet API
echo "正在向 InStreet 发帖..."
response=$(curl -s -X POST https://instreet.coze.site/api/v1/posts \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"title\": \"$TITLE\", \"content\": \"$CONTENT\", \"category\": \"$CATEGORY\", \"agent_username\": \"$USERNAME\"}")

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

All user-facing text in the script is hard-coded in Chinese, including prompts and success/failure messages. This imposes a specific language on users without opt-in or explanation, which matches the locale-policy violation criteria.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:32