Back to skill

Security audit

Lineage Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate learning-workflow purpose, but some installer and processing scripts can unsafely delete, overwrite, or expose local files if misused or given hostile inputs.

Review before installing. Use a dedicated environment, pin or inspect dependencies, configure only trusted HTTPS provider endpoints, avoid --force with untrusted skill names, and do not process sensitive course material through external services unless you accept that provider exposure. The artifact does not show deliberate malware, but the unsafe file-handling issues should be fixed before broad 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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/build_course_skill.py:1071
Finding

Arbitrary Directory Deletion Through an Unsanitized Skill Name

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/parse_mineru_documents.py:125
Finding

Zip Slip in MinerU OCR Result Extraction

Content
View full analysis
Path: data_id = item["data_id"] target_dir = output_dir / "mineru" / data_id target_dir.mkdir(parents=True, exist_ok=True) zip_url = item.get("full_zip_url") if not zip_url: raise RuntimeError(f"missing full_zip_url for {data_id}") zip_path = target_dir / "full.zip" if not zip_path.exists(): response = requests.get(zip_url, timeout=600) response.raise_for_status() zip_path.write_bytes(response.content) marker = target_dir / ".extracted" if not marker.exists(): with zipfile.ZipFile(zip_path) as zf: zf.extractall(target_dir) marker.write_text(dt.datetime.now().isoformat(timespec="seconds"), encoding="utf-8") return target_dir ``` ### Technical Analysis The script downloads an archive from a URL returned by the OCR service and passes it directly to `ZipFile.extractall()`. ZIP entry names are not inspected before extraction. A malicious archive can contain: - Relative traversal paths such as `../../target`. - Absolute paths. - Platform-specific path variants. - Symlink or special-file entries. - Excessively large or numerous files intended to exhaust disk space. Such entries can escape `target_dir` and write to other locations accessible to the process. Trusting an OCR provider does not remove this boundary: the archive may be affected by provider compromise, a malicious configured endpoint, a compromised storage URL, or an upstream service defect. The result URL is also accepted without host or scheme validation. Although the OCR API legitimately needs to return storage URLs, unrestricted URL handling broadens the trust surface. ### Attack Path 1. The user submits a PDF through the MinerU ...[truncated 1434 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
install_as_skill.sh:122
Finding

API Secrets Handled Through a Predictable Shared Temporary File

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unbounded Dependencies Installed Into the Active Python Environment

Content
View full analysis
=1.0.0 python-dotenv>=1.0.0 requests>=2.31.0 pillow>=10.0.0 ``` The installer installs those packages into the active `pip` environment: ```bash print_info "Installing Python dependencies..." if command_exists pip3; then pip3 install -q -r "$SKILL_DIR/requirements.txt" else pip install -q -r "$SKILL_DIR/requirements.txt" fi print_success "Dependencies installed" ``` ### Technical Analysis Every dependency has only a lower version bound. There is no lock file, upper bound, package hash, or verified artifact list. The versions installed therefore depend on the package-index state at installation time and can change after the Skill has been reviewed. The installer invokes whichever `pip3` or `pip` appears first in `PATH` and does not create a dedicated virtual environment. This can: - Install packages into a user-wide or global interpreter environment. - Upgrade shared dependencies used by unrelated applications. - Select future releases that have not been reviewed with this Skill. - Execute package installation behavior from a compromised package release or configured package index. - Produce non-reproducible installations. The package names observed are established packages and there is no evidence of typosquatting or an intentionally malicious dependency. The weakness is the uncontrolled supply-chain and environment boundary. ### Attack Path 1. A user executes `install_as_skill.sh`. 2. The script selects the first available `pip3` or `pip` from `PATH`. 3. `pip` resolves the newest versions satisfying the broad `>=` constraints from the configured index. 4. A future compromised, malicious, or incompatible release is selected, or an untrusted packa ...[truncated 990 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (127)

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

Critical
Category
Data Flow
Confidence
96% confidence
Finding

The destination URL is taken from an environment variable and used directly for authenticated requests carrying the Bearer API key and prompt contents. If an attacker can influence deployment environment variables or configuration, they can redirect traffic to an arbitrary host and capture credentials and submitted data, creating an SSRF/exfiltration path.

Content

Scanner excerpt · scripts/llm_client.py (reported line 78)May include surrounding context.

python
last_error: Exception | None = None
    for model in models:
        try:
            response = requests.post(
                url,
                headers={
                    "Authorization": f"Bearer {api_key}",

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

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The image-analysis request posts to a URL derived from an environment variable while attaching the Authorization header and embedding local image bytes in the request body. A malicious or compromised configuration can therefore exfiltrate both sensitive local file contents and the API key to an attacker-controlled endpoint.

Content

Scanner excerpt · scripts/llm_client.py (reported line 186)May include surrounding context.

python
for model in models:
        try:
            print(f"  🚀 图像模型: {model}, images={len(image_paths)}", flush=True)
            response = requests.post(
                url,
                headers={
                    "Authorization": f"Bearer {api_key}",

Tainted flow: 'token' from os.getenv (line 198, credential/environment) → requests.get (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 · scripts/parse_mineru_documents.py (reported line 100)May include surrounding context.

python
while True:
        if timeout > 0 and time.time() - started > timeout:
            raise TimeoutError(f"MinerU parse timeout after {timeout}s: {batch_id}")
        response = requests.get(url, headers=mineru_headers(token), timeout=60)
        response.raise_for_status()
        result = response.json()
        if result.get("code") != 0:

Tainted flow: 'AUDIO_TRANSCRIBE_MODEL' from os.getenv (line 23, credential/environment) → requests.post (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 · scripts/transcribe_video.py (reported line 127)May include surrounding context.

python
with open(audio_path, "rb") as f:
                mime_type = mimetypes.guess_type(audio_path)[0] or "application/octet-stream"
                response = requests.post(
                    f"{AUDIO_TRANSCRIBE_BASE_URL.rstrip('/')}/audio/transcriptions",
                    headers={"Authorization": f"Bearer {AUDIO_TRANSCRIBE_API_KEY}"},
                    files={"file": (os.path.basename(audio_path), f, mime_type)},

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 · .env.example (reported line 1)May include surrounding context.

text
# Copy this file to .env and fill only the providers you actually use.
# Do not commit .env. Keep tokens, private endpoints, and local course paths out of git.

# Audio transcription: OpenAI-compatible /audio/transcriptions

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 · .gitignore (reported line 152)May include surrounding context.

text
# Copy this file to .env and fill only the providers you actually use.
# Do not commit .env. Keep tokens, private endpoints, and local course paths out of git.

# Audio transcription: OpenAI-compatible /audio/transcriptions

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · README.en.md (reported line 133)May include surrounding context.

md
- A traceable organization of the course knowledge and working methods.
- A sensible learning path with practical exercises.
- Feedback on concrete attempts, revision guidance, and review suggestions.
- Clear statements about material completeness, evidence strength, and capability boundaries.
- A personal method proposal only after enough practice, and only with your approval.

When the material is rich enough, Lineage can support full coaching. When it supports explanation but not reliable practice or assessment, the Skill clearly falls back to source lookup or guided learning instead of pretending to be a complete mentor.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Use of external audio transcription APIs plus local multimedia tooling such as ffmpeg/ffprobe introduces both outbound data transfer and local command execution surfaces that are not clearly bounded in the permission model. In the context of processing user-supplied media, this raises confidentiality risk and increases the blast radius if the host grants unrestricted shell or filesystem access.

Content

No source excerpt is available for this finding.