Back to skill

Security audit

AndonQ

Security checks for vulnerabilities and agentic risk

Overview

The skill’s Tencent Cloud support purpose is coherent, but its login-code handling and an undeclared update-check network call create review-worthy security concerns.

Review before installing. Use this only if you are comfortable authorizing Tencent Cloud support/resource access and sending related questions to the AndonQ backend. Do not paste OAuth temporary codes into chat; prefer the local interactive binding command. Be aware it may contact clawhub.ai for update checks despite the stated Tencent-only network scope.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:91
Finding

Shell Command Injection Through User-Controlled OAuth Token Binding

Content
View full analysis
' ``` The receiving token parser does not constrain the input to a safe token character set: ```python _TOKEN_INLINE_RE = re.compile(r"^X-(.+?)-TANDON-CODE$", re.IGNORECASE) def _extract_token(raw: str) -> str: if not raw: return "" s = raw.strip() m = _TOKEN_INLINE_RE.match(s) if m: return m.group(1).strip() return s ``` ### Technical Analysis The Skill instructs the Agent to place untrusted, user-supplied text directly inside a single-quoted shell command. A single quote in the pasted value can terminate the intended quoted argument. Shell metacharacters that follow can then be interpreted by the shell rather than passed to Python as token data. The Python-side `_extract_token` function does not prevent this upstream vulnerability. It accepts arbitrary nonempty input when the optional wrapper pattern does not match, and the wrapper pattern itself permits essentially arbitrary characters. Validation therefore occurs neither before shell interpolation nor after the value reaches the script. This is an insecure invocation pattern even though `andon_auth.py` does not independently invoke a shell. ### Attack Path 1. An attacker provides a purported OAuth temporary code containing a single quote followed by shell syntax. 2. The Agent follows the documented binding workflow and substitutes the value into: ```bash python3 .../andon_auth.py --save '' ``` 3. The embedded quote closes the original shell argument. 4. Subsequent shell operators cause attacker-selected commands to execute. 5. Those commands run with the same operating-system privileges and filesystem access as the Agent process. For exampl ...[truncated 740 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/andon_auth.py:66
Finding

OAuth Authorization Flow Uses a Cleartext HTTP Redirect URI

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Note
Location
scripts/check_env.py:119
Finding

Automatic Version Check Contacts an Undeclared External Domain

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/andon_auth.py:145
Finding

Non-Atomic OAuth Credential Storage Permits Transient Exposure and Symlink Attacks

Content
View full analysis
None: token = _extract_token(token) if not token: raise ValueError("Temporary code cannot be empty") CONFIG_DIR.mkdir(parents=True, exist_ok=True) payload = { "token": token, "obtained_at": int(time.time()), } AUTH_FILE.write_text( json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8" ) try: os.chmod(AUTH_FILE, 0o600) except OSError: # chmod may not take effect on Windows pass ``` ### Technical Analysis The credential file is written first and changed to mode `0600` afterward. Creation permissions therefore initially depend on the process umask. With a permissive umask, another local account may be able to read the temporary code during the interval before `chmod` completes. The operation is not atomic. A crash or interruption can leave a partial credential file. In addition, `Path.write_text` follows symbolic links. If an attacker who can modify `~/.andonq` or its contents places a symbolic link at `auth.json`, saving a token can write credential data to the link target and subsequently apply `chmod` to that target. The code also creates the configuration directory without explicitly enforcing mode `0700`. Existing directories with unsafe ownership or permissions are not rejected. ### Attack Path A local symlink attack can proceed as follows: 1. An attacker gains the ability to create or replace entries in the user's `~/.andonq` directory. 2. The attacker creates `~/.andonq/auth.json` as a symbolic link to a target writable by the victim account. 3. The user or Agent runs the token-binding operation. 4. `AUTH_FILE.write_text` follows the symbolic link and writes the OAuth token and timestamp to the target. 5. `os.chmod` th ...[truncated 922 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description promises a broad intelligent customer-service capability covering Tencent Cloud product Q&A, multiple forms of ticket/work-order lookup and management, and resource queries. The supplied code does not implement any of those user-facing functions. Instead, it is a narrow authentication utility that builds an OAuth2 authorization URL and stores/loads a temporary token-like code in a local file under ~/.andonq/auth.json. While auth can be a supporting component for a larger skill, this chunk’s actual purpose is materially different from the declared purpose and adds an undeclared capability: local credential handling. Therefore this code chunk does not accurately represent the declared skill behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents an end-user Tencent Cloud intelligent customer-service agent for work-order management, product Q&A, and resource queries. The supplied code chunk does something materially different: it is an auxiliary CLI environment/setup script. Its core behaviors are checking Python runtime compatibility, querying a skill registry for updates/changelog, and verifying or interactively binding an OAuth2 temporary code stored in local files. While auth/setup could be a supporting detail for the broader skill, this chunk itself does not implement any of the described business capabilities and introduces undeclared behaviors such as remote version checks and local credential storage. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' 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.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script explicitly recommends that users send their temporary OAuth code to the agent, which trains users to disclose a live credential into a conversational channel. Even if the code is short-lived, it can enable unauthorized API access during its validity window and creates a phishing-style anti-pattern where the agent becomes a credential collection point.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This error-handling text asks users to provide the temporary auth code directly to the agent for binding, causing the agent to solicit secrets. In an agent environment, chat content may be logged, retained, or exposed to other tools, so encouraging secret submission materially increases credential theft and misuse risk.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The reauthorization flow repeats the same unsafe pattern by recommending that users share a fresh temporary code with the agent. Repetition makes the behavior appear endorsed and normal, increasing the likelihood that users disclose valid credentials that can be captured from transcripts or abused immediately.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The markdown instructs the agent to 'must' answer identity-related questions using a fixed response in Chinese. Although the file includes English metadata, this runtime instruction does not offer the user a language/locale choice or opt-in, which conflicts with the policy against forcing a specific language.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This skill sends user-provided content and a bearer-like temporary auth code to an external Tencent endpoint, which is a real external data transmission path. In context this is expected product behavior, but it still carries security risk because sensitive support queries, ticket details, or resource information may be transmitted off-agent to a third-party service and the returned Markdown is documented as being displayed raw.

Content

Scanner excerpt · references/api/ChatCompletionsAndonQ.md (reported line 23)May include surrounding context.

| content | 是 | String | 用户问题,如 查询我的工单 | | session_id | 是 | String | 会话 ID(UUID v4),同一对话必须保持不变 |

curl 示例

bash
curl -XPOST 'https://andon.cloud.tencent.com/api/v1/gateway/chat-completions-andonq' \

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The protocol-agreement flow explicitly instructs the user to reply with the Chinese word "同意" and shows the exact command sending that string. The document does not offer an alternative language or indicate that Chinese is optional, which constitutes a language-policy constraint in natural-language instructions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes an agent for Tencent Cloud support interactions, ticket management, and resource queries. This file instead implements installation/runtime environment validation, OAuth temporary-code binding to local files, version checking against a remote registry, and update caching, which are operational bootstrap tasks not reflected in the manifest description.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill's stated purpose is Tencent Cloud customer service functions such as ticket queries, Q&A, and cloud resource lookup. This script additionally contacts the ClawHub registry over HTTPS and can invoke a local clawhub subprocess to inspect skill versions, which is not justified by the customer-service business purpose described in the manifest.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/check_env.py (reported line 139)May include surrounding context.

python
def _get_info_via_clawhub(slug):
    """L2: 通过本地已安装的 clawhub CLI 获取版本"""
    import subprocess
    result = subprocess.run(
        ["clawhub", "inspect", slug, "--versions", "--json"],
        capture_output=True, text=True, timeout=VERSION_CHECK_TIMEOUT,
    )

Static analysis

No suspicious patterns detected.