Back to skill

Security audit

Tencent VOD

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Tencent VOD purpose, but it automatically changes the Python environment and stores long-lived API tokens in plaintext, so it should be reviewed before installing.

Install only if you are comfortable with the scripts modifying the active Python environment and storing Tencent VOD AIGC tokens in plaintext dotenv files. Prefer running in a dedicated virtual environment, inspect pip configuration before first use, keep dotenv files out of source control, restrict file permissions, and revoke or rotate any token that may have appeared in logs or shared files.

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)

T08 · Insecure Dependencies

Warning
Location
scripts/vod_auto_upgrade.py:43
Finding

Automatic Runtime Installation of Unpinned Dependencies

Content
View full analysis
={min_ver_str}" if min_ver_str else pkg_name try: installed_ver = _pkg_version(pkg_name) except PackageNotFoundError: print(f"{pkg_name} is not installed", file=sys.stderr) to_install.append(spec) continue if min_ver and _ver_tuple( ...[truncated 2532 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/vod_aigc_token.py:160
Finding

Long-Lived AIGC Tokens Stored and Displayed in Plaintext

Content
View full analysis
bool: """ Update or append TENCENTCLOUD_VOD_AIGC_TOKEN in the specified file. """ try: lines = [] if os.path.exists(filepath): with open(filepath, "r", encoding="utf-8", errors="replace") as f: lines = f.readlines() new_lines = [] found = False for line in lines: stripped = line.strip() if re.match(rf"""^\s*(?:export\s+)?{_TOKEN_KEY}\s*=""", stripped): new_lines.append(f'export {_TOKEN_KEY}="{token}"\n') found = True else: new_lines.append(line) if not found: if new_lines and not new_lines[-1].endswith("\n"): new_lines.append("\n") new_lines.append(f'export {_TOKEN_KEY}="{token}"\n') with open(filepath, "w", encoding="utf-8") as f: f.writelines(new_lines) return True except Exception as e: print(f"Failed to write {filepath}: {e}", file=sys.stderr) return False ``` The persistence policy automatically updates every candidate dotenv file already containing the token variable, or defaults to `~/.env`: ```python def save_token_to_env(token: str) -> list: """ Write the token to environment configuration files. """ target_files = find_token_in_env_files() if ...[truncated 3472 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (164)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding points to a broader description-behavior mismatch, including handling MPS-related task details despite the skill explicitly saying MPS operations should not trigger, plus undeclared local persistence to mem/elements.json. Hidden persistence and unsupported routing behavior can cause unauthorized data retention, confusion over trust boundaries, and accidental invocation of excluded functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding points to a broader description-behavior mismatch, including handling MPS-related task details despite the skill explicitly saying MPS operations should not trigger, plus undeclared local persistence to mem/elements.json. Hidden persistence and unsupported routing behavior can cause unauthorized data retention, confusion over trust boundaries, and accidental invocation of excluded functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding points to a broader description-behavior mismatch, including handling MPS-related task details despite the skill explicitly saying MPS operations should not trigger, plus undeclared local persistence to mem/elements.json. Hidden persistence and unsupported routing behavior can cause unauthorized data retention, confusion over trust boundaries, and accidental invocation of excluded functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding points to a broader description-behavior mismatch, including handling MPS-related task details despite the skill explicitly saying MPS operations should not trigger, plus undeclared local persistence to mem/elements.json. Hidden persistence and unsupported routing behavior can cause unauthorized data retention, confusion over trust boundaries, and accidental invocation of excluded functionality.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The script scans common dotenv files and later writes the newly created API token into them automatically. Persisting a long-lived cloud API token in plaintext inside ~/.env or a project .env materially increases secret exposure risk through accidental commits, local disclosure, backup leakage, or access by other tools/users on the host. In the context of a VOD AIGC token-management skill, this is more dangerous because the tool is specifically creating reusable credentials and normalizing insecure storage of them.

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 164)May include surrounding context.

python
# 候选 dotenv 文件路径(与 vod_load_env._ENV_FILES 保持一致,仅扫描 dotenv 风格文件)
_ALL_ENV_FILES = [
    os.path.expanduser("~/.env"),
    os.path.join(os.getcwd(), ".env"),
]

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

Including the current working directory's .env in the scan/write target set can cause sensitive AIGC tokens to be stored in project folders, where they are at elevated risk of source-control commits, sharing, or workspace compromise. Because these tokens are described as non-expiring, accidental persistence in a repository or shared directory can lead to long-term unauthorized API use.

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 165)May include surrounding context.

python
# 候选 dotenv 文件路径(与 vod_load_env._ENV_FILES 保持一致,仅扫描 dotenv 风格文件)
_ALL_ENV_FILES = [
    os.path.expanduser("~/.env"),
    os.path.join(os.getcwd(), ".env"),
]

_TOKEN_KEY = "TENCENTCLOUD_VOD_AIGC_TOKEN"

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

Defaulting token storage to ~/.env means newly created long-lived API tokens are silently persisted in plaintext even when the user only intended to create and view them. This broadens the secret's lifetime and attack surface, especially on shared systems or hosts with permissive home-directory backups and tooling.

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 169)May include surrounding context.

python
]

_TOKEN_KEY = "TENCENTCLOUD_VOD_AIGC_TOKEN"
_DEFAULT_ENV_FILE = os.path.expanduser("~/.env")


def _update_token_in_file(filepath: str, token: str) -> bool:

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The save_token_to_env logic falls back to writing the token to ~/.env whenever no existing token variable is found. This operationalizes insecure plaintext persistence of a non-expiring credential, making accidental leakage significantly more likely than ephemeral display-only handling.

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 241)May include surrounding context.

python
target_files = find_token_in_env_files()

    if not target_files:
        # 所有文件都没有配置,默认写入 ~/.env
        target_files = [_DEFAULT_ENV_FILE]

    written = []

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/vod_create_aigc_advanced_custom_element.py (reported line 161)May include surrounding context.

python
if not val:
        if required:
            print("  ⚠️  此项为必填,请重新输入。")
            return prompt_list_input(prompt_text, required=True)
        return []
    return [v.strip() for v in val.split(",") if v.strip()]

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/requirements.txt (reported line 17)May include surrounding context.

text
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_audio.py (reported line 20)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_chat.py (reported line 85)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_chat.py (reported line 97)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_image.py (reported line 19)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_image.py (reported line 364)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 29)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 57)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 58)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 59)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 69)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_token.py (reported line 88)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/vod_aigc_video.py (reported line 19)May include surrounding context.

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

python
实现说明:
  使用 python-dotenv 库的 load_dotenv 函数加载 dotenv 风格的配置文件。
  按以下顺序加载(已存在的环境变量不会被覆盖,先加载者优先):
    1. 默认行为:通过 find_dotenv(usecwd=True) 从当前目录向上递归找最近的 .env 并加载
    2. ~/.env                (用户级 dotenv,最高优先级)
    3. ./.env                (当前工作目录 dotenv)