Back to skill

Security audit

focusavatar

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real FocusAvatar client, but it needs review because it can send API secrets and job data to any backend URL configured in the environment without host or HTTPS checks.

Install only if you trust the publisher and the FocusAvatar backend you will use. Leave FOCUSAVATAR_API unset unless you intentionally set it to a trusted HTTPS service, avoid storing accessKeySecret permanently in shell startup files, prefer a temporary session or secret manager, and rotate the key if it may have been exposed. Pin installer and Python dependency versions where possible.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/focusavatar.py:20
Finding

Authentication credentials can be transmitted to an arbitrary or insecure endpoint

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:109
Finding

Installation instructions use unpinned third-party dependencies and source revisions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (19)

Tainted flow: 'headers' from os.environ.get (line 105, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The script sends user-supplied credentials in HTTP headers to an endpoint whose base URL is overridable via the FOCUSAVATAR_API environment variable. In an agent/runtime setting, an attacker who can influence environment variables can redirect requests to an attacker-controlled host and exfiltrate accessKeyId/accessKeySecret, making this a real secret-leak risk rather than a mere expected API call.

Content

Scanner excerpt · scripts/focusavatar.py (reported line 108)May include surrounding context.

python
headers = make_auth_headers(access_key_id, access_key_secret)
        try:
            payload = {"mp3": mp3, "mp4": mp4, "text": text}
            resp = requests.post(
                API_ENDPOINT.rstrip("/") + "/skill/api/submit",
                json=payload,
                headers=headers,

Tainted flow: 'status_url' from os.environ.get (line 148, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
96% confidence
Finding

The polling request reuses the same credential-bearing headers and posts to a status URL derived from the environment-controlled API_ENDPOINT. This means the same endpoint-redirection issue persists across repeated polling, potentially leaking secrets multiple times and increasing exposure if the host is malicious or misconfigured.

Content

Scanner excerpt · scripts/focusavatar.py (reported line 156)May include surrounding context.

python
while True:
            try:
                poll_count += 1
                r = requests.post(
                    status_url,
                    json={"orderNo": task_id},
                    headers=headers,

Tainted flow: 'url' from os.environ.get (line 210, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
96% confidence
Finding

The query flow posts orderNo together with credential headers to a URL built from the same environment-controlled API base. If an attacker can set or influence FOCUSAVATAR_API, they can capture both the credentials and task identifiers, enabling unauthorized API use and possible access to generated content.

Content

Scanner excerpt · scripts/focusavatar.py (reported line 212)May include surrounding context.

python
def query_result(order_no: str, key_id: str, key_secret: str):
            url = API_ENDPOINT.rstrip("/") + "/skill/api/api/result"
            h = make_auth_headers(key_id, key_secret)
            r = requests.post(url, json={"orderNo": order_no}, headers=h, timeout=30)
            r.raise_for_status()
            # 处理返回:如果是字符串就解析,已经是 dict 直接用
            raw = r.json()

Tainted flow: 'RESULT_URL' from os.environ.get (line 12, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The request destination is derived from the FOCUSAVATAR_API environment variable and is used directly in requests.post while authentication headers include access credentials. An attacker who can influence the environment can redirect the client to an arbitrary host and capture the X-Access-Key-Id and X-Access-Key-Secret values, turning this into a credential exfiltration/SSRF-style issue.

Content

Scanner excerpt · scripts/result.py (reported line 46)May include surrounding context.

python
"""
    headers = _auth_headers(access_key_id, access_key_secret)
    payload = {"orderNo": order_no}
    r = requests.post(RESULT_URL, json=payload, headers=headers, timeout=30)
    r.raise_for_status()
    raw = r.json()
    return json.loads(raw) if isinstance(raw, str) else raw

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

The README instructs users to install and execute a remote package via npx skills without pinning an exact version or otherwise constraining what code is fetched. If the upstream package is updated, compromised, or subject to dependency hijacking, users may run unexpected code during installation or execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

This installation guidance again relies on npx skills without a pinned version, which means the resolved package can change over time and may execute newly introduced or malicious code. Because this is an installation step, any compromise happens before users can meaningfully inspect the skill behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill explicitly requires environment-variable access for credentials and outbound network access to a backend API, but the manifest does not declare any tool scope or permissions boundary. This weakens user review and enforcement, because operators cannot easily see or constrain the skill's actual capabilities before installation or execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions recommend permanently storing accessKeySecret in shell startup files or persistent system environment variables, but do not clearly warn that this leaves long-lived credentials on disk and accessible to other local processes or future shell sessions. If the host is shared, backed up, or later compromised, the API secret may be recovered and abused.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

The installation command uses npx skills without pinning an exact version, so users may fetch and execute whatever package version is current at install time. This creates supply-chain risk: a compromised or malicious future release could run code during installation with the user's privileges.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

A second unpinned npx skills installation reference repeats the same supply-chain exposure later in the document. Repetition increases the chance users will follow the unsafe install path and execute an unintended package version.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script collects accessKeyId/accessKeySecret from environment variables or interactive input and transmits them, but does not clearly warn users about exposure risks, endpoint trust assumptions, or the consequences of overriding the API host. In an agent context, this matters because users may provide secrets without realizing they are sent to a configurable remote service.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/focusavatar.py (reported line 156)May include surrounding context.

python
while True:
            try:
                poll_count += 1
                r = requests.post(
                    status_url,
                    json={"orderNo": task_id},
                    headers=headers,

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/focusavatar.py (reported line 212)May include surrounding context.

python
def query_result(order_no: str, key_id: str, key_secret: str):
            url = API_ENDPOINT.rstrip("/") + "/skill/api/api/result"
            h = make_auth_headers(key_id, key_secret)
            r = requests.post(url, json={"orderNo": order_no}, headers=h, timeout=30)
            r.raise_for_status()
            # 处理返回:如果是字符串就解析,已经是 dict 直接用
            raw = r.json()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The accessKeySecret is collected with input(), which echoes the secret to the terminal and may expose it to shoulder-surfing, terminal logging, shell session recording, or shared console history mechanisms. Because this script handles live API credentials, visible entry materially increases the chance of credential disclosure.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/result.py (reported line 46)May include surrounding context.

python
"""
    headers = _auth_headers(access_key_id, access_key_secret)
    payload = {"orderNo": order_no}
    r = requests.post(RESULT_URL, json=payload, headers=headers, timeout=30)
    r.raise_for_status()
    raw = r.json()
    return json.loads(raw) if isinstance(raw, str) else raw

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger list contains broad terms such as "数字人", "视频生成", and "语音合成" that can match many ordinary user requests beyond this skill’s narrow backend API purpose. This can cause the agent to invoke the skill unexpectedly, leading to unintended third-party API calls using configured credentials and possible leakage of user prompts or media URLs to the external service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

文档标题及全文均以中文呈现,未说明这是可选语言、区域限定,或提供其他语言入口。根据规则,若技能在自然语言层面强制特定语言而没有用户选择或明确正当性,属于语言/locale 策略问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language instructions and prompts are entirely in Chinese and direct the user to provide specific Chinese phrasing to the assistant for timeout handling. There is no indication that users may choose another language or that the language restriction is required for a documented regional purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The file’s docstring and user-facing prompts are written only in Chinese, which imposes a specific language on users without any opt-in or alternative. The policy explicitly calls for flagging language or locale constraints when the skill forces a specific language without user choice.

Content

No source excerpt is available for this finding.