Back to skill

Security audit

AI video auto generator

Security checks for vulnerabilities and agentic risk

Overview

This is a real AI video-generation skill, but it can automatically install and run dependencies, launch long jobs, and send local media or task data to external services with weak confirmation and scoping.

Install only after reviewing the external integrations. Use an isolated project and virtual environment, prefer --tracker local unless Feishu writes are intended, configure a repository you own and understand its visibility before using GitHub image hosting, avoid sensitive local reference paths or internal URLs, and pin dependencies before production use.

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

T09 · Insecure Skill Coding Practices

Error
Location
skills/project-generate/scripts/modules/script_generator.py:46
Finding

Unrestricted URL Fetching Enables Server-Side Request Forgery

Content
View full analysis
str: """Read web page content.""" try: from urllib.request import urlopen, Request req = Request(url, headers={"User-Agent": "Mozilla/5.0"}) with urlopen(req, timeout=15) as resp: html = resp.read().decode("utf-8", errors="replace") text = re.sub(r"<[^>]+>", "", html) text = re.sub(r"\s+", " ", text).strip() return text[:5000] except Exception as e: return f"[URL read error: {e}]" ``` The comments, docstring, and error message above have been translated into English for report readability; the executable control flow is unchanged. ### Technical Analysis The script accepts any string beginning with `http://` or `https://` and passes it directly to `urllib.request.urlopen`. There is no validation of the destination hostname or resolved IP address. The implementation does not reject: - Loopback destinations such as `127.0.0.1` or `[::1]` - RFC 1918 private networks - Link-local networks - Cloud instance metadata services such as `169.254.169.254` - Reserved or otherwise non-public address ranges - Redirects from an initially public URL to an internal destination The 15-second timeout and 5,000-character output truncation limit resource consumption but do not prevent access to internal services. The fetched response is returned to the script-generation workflow, creating a potential channel for extracting internal HTTP response content. This behavior exceeds the minimum privilege needed to retrieve public articles because the feature requires public web ...[truncated 1398 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
skills/agnes-ai/scripts/modules/image_api.py:79
Finding

Local Reference Images Can Be Published to a Default External GitHub Repository

Content
View full analysis
str: GITHUB_REPO, GITHUB_BRANCH = _load_github_config() if project: proj_name = os.path.basename(os.path.abspath(project)) else: _log(" ⚠️ upload_to_url: project=None, using 'default'") proj_name = "default" token = None pat_path = os.path.expanduser("~/.github-pat") if os.path.isfile(pat_path): with open(pat_path) as f: token = f.read().strip() if not token: token = os.environ.get("GITHUB_PAT") if token: remote_name = os.path.basename(local_path) encoded_remote_name = quote(remote_name, safe="") encoded_proj = quote(proj_name, safe="") api_url = f"https://api.github.com/repos/{GITHUB_REPO}/contents/{encoded_proj}/{encoded_remote_name}" raw_url = f"https://raw.githubusercontent.com/{GITHUB_REPO}/{GITHUB_BRANCH}/{encoded_proj}/{encoded_remote_name}" with open(local_path, "rb") as f: content_b64 = base64.b64encode(f.read()).decode() payload = { "message": f"upload {remote_name}", "content": content_b64, "branch": GITHUB_BRANCH, } put_req = Request( api_url, data=json.dumps(payload).encode("utf-8"), headers={ "Authorization": f"token {token}", "Content-Type": "application/json", "Accept": "application/vnd.github.v3+json", }, method="PUT", ) ``` The excerpt preserves the relevant executable upload behavior while omitting retry handling that does not change the vulnerability. Defaul ...[truncated 3033 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
skills/project-generate/scripts/pipeline.py:163
Finding

Runtime Installation and Execution of Unpinned Python and npm Dependencies

Content
View full analysis
bool: """Check whether a Python module is importable and install it if missing.""" try: importlib.import_module(mod) v = getattr(importlib.import_module(mod), "__version__", "?") print(f" ✅ {mod}: v{v}") return True except ImportError: name = pip_name or mod print(f" ⚠️ {mod} is not installed; automatically installing {name}...") r = subprocess.run( [py, "-m", "pip", "install", name, "-q"], capture_output=True, text=True, timeout=120) if r.returncode == 0: print(f" ✅ {name} installed successfully") return True ``` ```python except ImportError: print(" ⚠️ ffmpeg not found; automatically installing imageio-ffmpeg...") r = subprocess.run( [py, "-m", "pip", "install", "imageio-ffmpeg", "-q"], capture_output=True, text=True, timeout=120) ``` ```python from modules.hyperframes_stitch import ensure_installed as _hf_install if not _hf_install(): print(" ⚠️ Hyperframes installation failed; stitching will fall back to ffmpeg") ``` The comments and messages above have been translated into English for report readability. The npm installation path executes: ```python r = subprocess.run( [npm_cmd, "install", "hyperframes"], cwd=workspace, capture_output=True, text=True, timeout=120, ) ``` The Python dependency manifest contains no version or hash constraints: ```text opencv-python-headless Pillow numpy edge-tts python-docx imageio-ffmpeg ``` ### Techni ...[truncated 2503 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (239)

Tainted flow: 'get_req' from os.environ.get (line 121, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · skills/agnes-ai/scripts/modules/image_api.py (reported line 126)May include surrounding context.

python
"Accept": "application/vnd.github.v3+json",
                }, method="GET")
                try:
                    with urlopen(get_req, timeout=10) as resp:
                        existing = json.loads(resp.read().decode())
                        sha = existing.get("sha")
                        if sha:

Tainted flow: 'put_req' from os.environ.get (line 146, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · skills/agnes-ai/scripts/modules/image_api.py (reported line 156)May include surrounding context.

python
},
                    method="PUT",
                )
                with urlopen(put_req, timeout=30) as resp:
                    result = json.loads(resp.read().decode())
                    if result.get("content", {}).get("name"):
                        _log(f"  -> GitHub URL: {raw_url}")

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The document repeatedly promises full automation from idea to final output while also instructing automatic writes to script.json and pipeline execution, yet it omits any explicit permission declaration. This combination creates a real least-privilege and informed-consent issue even if the implementation is benign, because users are encouraged to let the agent perform impactful filesystem operations automatically.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · config/keys.example.env (reported line 11)May include surrounding context.

text
# 从 https://freesound.org/apiv2/apply/ 注册获取(免费)
FREESOUND_API_KEY=your_freesound_api_key_here

# 从 GitHub Settings → Developer settings → Personal access tokens 创建(需 contents:write 权限)
# 用于图床:上传图片到存储库,返回 raw 公网直链
GITHUB_PAT=your_github_personal_access_token_here

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/types/短剧.md (reported line 1)May include surrounding context.

md
# 短剧类型规范

当视频类型标签为 `【短剧】` 时加载此规范。

Static analysis

No suspicious patterns detected.