Back to skill

Security audit

Skill Forge

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a coherent skill-building toolkit, but its session hook can contact cloud endpoints with a persistent anonymous ID even when cloud sync is documented as off.

Review before installing. Expect local method-level telemetry files to be created by default, and treat cloud sync controls carefully because the current session-start path can still send the persistent anonymous ID to the configured aggregate endpoint. Install only if you are comfortable with the forge/publish tooling, local skill-directory scanning, and cloud feedback-loop model; otherwise disable/remove the session hook or patch download_signals.py to require .cloud_optin=on before any network request.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/download_signals.py:124
Finding

Cloud opt-out bypass discloses a persistent identifier

Content
View full analysis

Vulnerability Details

File Location: scripts/session_hook.py:174-190 and scripts/download_signals.py:124-139
Vulnerability Type: Privacy and authorization-gate bypass
Risk Level: Medium

Technical Analysis

The documented workflow states that cloud synchronization is disabled by default and requires explicit opt-in. However, the mandatory session-start hook invokes both cloud helpers without first checking .cloud_optin:

python
# scripts/session_hook.py:174-190
# 1) Upload previously accumulated signals
try:
    subprocess.run([sys.executable, os.path.join(HERE, "upload_signals.py")],
                   capture_output=True, timeout=120)
except Exception:
    pass

# 2) Pull cloud history for this skill
try:
    subprocess.run([sys.executable, os.path.join(HERE, "download_signals.py"),
                    "pull", "--dir", skill_dir], capture_output=True, timeout=120)
except Exception:
    pass

The upload helper creates a persistent anonymous identifier before enforcing the cloud-upload setting:

python
# scripts/upload_signals.py:122-139
def bootstrap(skill_dir):
    """Deterministically create state files."""
    created = []
    optin = os.path.join(skill_dir, ".optin")
    if not os.path.exists(optin):
        if write_state_file(optin, "on"):
            created.append(".optin")
    anon = os.path.join(skill_dir, ".anon_id")
    if not os.path.exists(anon):
        import uuid
        if write_state_file(anon, str(uuid.uuid4())):
            created.append(".anon_id")
    cloud = os.path.join(skill_dir, ".cloud_optin")
    if not os.path.exists(cloud):
        if write_state_file(cloud, "off"):
            created.append(".cloud_optin")
    return created

Although upload_signals.py later respects .cloud_optin=off, the download helper does not check that setting. It sends the persistent identifier to the configured aggregation endpoi ...[truncated 2094 chars]

Remediation
View remediation

Remediation Suggestions

  1. Enforce cloud authorization directly in download_signals.cmd_pull before reading the identifier, resolving the endpoint, or making any request:

    python
    cloud_optin = _read_file(os.path.join(skill_dir, ".cloud_optin"))
    if cloud_optin != "on":
        print("[download] Cloud synchronization is disabled; skipping")
        return 0
    
  2. Add defense in depth to session_hook.cmd_start: invoke upload and download helpers only when .cloud_optin is exactly on.

  3. Keep the default fail-closed. Missing, malformed, or unreadable .cloud_optin must be treated as disabled.

  4. Consider separating the local-recording identifier from the cloud identifier. Create the cloud identifier only after explicit cloud opt-in, preventing local-only operation from provisioning a remotely usable tracking value.

  5. Add regression tests covering:

    • .cloud_optin=off;
    • a missing .cloud_optin;
    • .cloud_optin=on;
    • an environment-supplied aggregation endpoint;
    • verification that no network request occurs in either disabled state.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (179)

Tainted flow: 'req' from os.environ.get (line 346, 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 · scripts.bak.20260827235547/recast_scan.py (reported line 350)May include surrounding context.

python
"Authorization": "Bearer " + key,
                "Content-Type": "application/json",
            })
            with urllib.request.urlopen(req, timeout=20) as resp:
                obj = json.loads(resp.read().decode("utf-8"))
            vecs.append(obj["data"][0]["embedding"])
        # 平均余弦

Tainted flow: 'req' from os.environ.get (line 346, 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 · scripts/recast_scan.py (reported line 350)May include surrounding context.

python
"Authorization": "Bearer " + key,
                "Content-Type": "application/json",
            })
            with urllib.request.urlopen(req, timeout=20) as resp:
                obj = json.loads(resp.read().decode("utf-8"))
            vecs.append(obj["data"][0]["embedding"])
        # 平均余弦

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation appears to be a narrow SKILL.md/changelog compliance validator while claiming broad forge/review/merge/recast powers. Misrepresenting validator scope can cause users to treat passing results as comprehensive certification, which is unsafe in security-sensitive release contexts.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.