Back to skill

Security audit

Key‑Safe Skill Generator (Zero-Exposure Edition)

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently documents credential-aware skill generation, and the flagged unsafe snippets are explicitly prohibited examples.

Review generated scripts before execution and import sealed capsules only from trusted sources: encryption does not restrict their permissions. Keep credential values out of prompts and result files. Quote the dependency requirement when installing, and confirm the required MGC version is available.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied shell code performs a filesystem write and stores a plaintext credential, contradicting both the documentation-only scope and the declared credential-handling model. The '# WRONG' comment labels the command but does not prevent its execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

As supplied as executable shell code, the chunk performs environment setup and launches a CLI, which exceeds the explicitly documentation-only purpose. Although these commands concern the named product, they are operational actions rather than specifications or templates. The snippet does not establish any credential access, encryption, sealing, or other claimed functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

As executable code, the statement accesses SMTP configuration instead of merely providing guidance. The 'WRONG' comment labels the pattern as undesirable but does not prevent execution. If this is only a fenced, non-executed negative example in SKILL.md, it would be consistent with the educational purpose; the supplied chunk alone does not establish that context.

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 · SKILL.md (reported line 771)May include surrounding context.

bash
# WRONG
echo "password=secret" > credentials.txt

Correct: store it in MGC and read it at runtime.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · SKILL.md (reported line 210)May include surrounding context.

md
with open(TOKEN_FILE, "r") as f:
        token = f.read().strip()

    resp = requests.post(
        f"{MGC_BASE_URL}/api/mgc/sensitive/get",
        json={"info_type": info_type, "info_owner": info_owner},
        headers={"X-MGC-Token": token, "Content-Type": "application/json"},

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · SKILL.md (reported line 638)May include surrounding context.

md
raise RuntimeError("MGC token file missing")
    with open(TOKEN_FILE, "r") as f:
        token = f.read().strip()
    resp = requests.post(
        f"{MGC_BASE_URL}/api/mgc/sensitive/get",
        json={"info_type": info_type, "info_owner": info_owner},
        headers={"X-MGC-Token": token, "Content-Type": "application/json"},